diff --git a/main.py b/main.py
index 7ce295c..e9bc3f7 100644
--- a/main.py
+++ b/main.py
@@ -114,7 +114,52 @@ def page_login() -> None:
ui.add_head_html('''
''')
+ ui.add_body_html('''
+
+ ''')
+ async def alert():
+ await ui.run_javascript('''
+ // Show the prompt
+ deferredPrompt.prompt();
+ // Wait for the user to respond to the prompt
+ deferredPrompt.userChoice.then((choiceResult) => {
+ if (choiceResult.outcome === 'accepted') {
+ console.log('User accepted the A2HS prompt');
+ } else {
+ console.log('User dismissed the A2HS prompt');
+ }
+ deferredPrompt = null;
+ });''', respond=False)
+
with ui.card().classes('absolute-center items-center'):
+ ui.button('Install App', on_click=alert)
ui.image('assets/logo.svg')
ui.label('Let\'s Swing Admin').classes('text-2xl')
username = ui.input('Username').on('keydown.enter', try_login).classes('w-full')