diff --git a/src/yasi-webclient b/src/yasi-webclient index 9291489..ce1bdb1 100755 --- a/src/yasi-webclient +++ b/src/yasi-webclient @@ -4,6 +4,14 @@ import webview LOCATION = "http://localhost:9274/welcome" +class Api(): + def log(self, value): + print(value) + + def close(self): + window.destroy() + + def on_closed(): """ Actions to take when System Installer is closed. @@ -14,8 +22,8 @@ def on_closed(): window = webview.create_window('System Installer', LOCATION, transparent=True, easy_drag=False, frameless=True, width=1050, height=650, focus=True, zoomable=True, - confirm_close=True, resizable=True, shadow=True, - text_select=False, draggable=False + confirm_close=False, resizable=True, shadow=True, + text_select=False, draggable=True, js_api=Api() ) webview.settings = { @@ -30,6 +38,13 @@ webview.settings = { 'SHOW_DEFAULT_MENUS': True } + +def custom_logic(window): + pass + #window.toggle_fullscreen() + #window.evaluate_js('alert("Nice one brother")') + #window.destroy() + window.events.closed += on_closed #webview.start(icon='/usr/share/icons/yasi.png') -webview.start() +webview.start(custom_logic, window) diff --git a/src/yasi_applets/disks/__pycache__/routes.cpython-313.pyc b/src/yasi_applets/disks/__pycache__/routes.cpython-313.pyc index 2171935..3a33872 100644 Binary files a/src/yasi_applets/disks/__pycache__/routes.cpython-313.pyc and b/src/yasi_applets/disks/__pycache__/routes.cpython-313.pyc differ diff --git a/src/yasi_applets/disks/routes.py b/src/yasi_applets/disks/routes.py index 964c120..3260693 100644 --- a/src/yasi_applets/disks/routes.py +++ b/src/yasi_applets/disks/routes.py @@ -19,9 +19,12 @@ def disks_welcome(): blockdevs = lsblk.list_block_devices() return render_template('disks_welcome.html', - menu=current_app.config['CONFIG']['settings']['menu'], - menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(), - previous_step = previous_step_url, + menu=current_app.config['CONFIG'] + ['settings']['menu'], + menu_order=current_app.config['CONFIG'] + ['settings'] + ['menu_order'].split(), + previous_step=previous_step_url, next_step=next_step_url, blockdevs=blockdevs ) @@ -41,8 +44,11 @@ def disks_choose_disk_erase(): blockdevs = lsblk.list_block_devices() return render_template('disks_erase_menu.html', - menu=current_app.config['CONFIG']['settings']['menu'], - menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(), + menu=current_app.config['CONFIG'] + ['settings']['menu'], + menu_order=current_app.config['CONFIG'] + ['settings'] + ['menu_order'].split(), previous_step = previous_step_url, next_step=next_step_url, blockdevs=blockdevs ) diff --git a/src/yasi_applets/main/header.html b/src/yasi_applets/main/header.html index 5135f41..8673acb 100644 --- a/src/yasi_applets/main/header.html +++ b/src/yasi_applets/main/header.html @@ -21,7 +21,7 @@ than a proper webapp.
- +
diff --git a/src/yasi_applets/main/help.html b/src/yasi_applets/main/help.html index b8b4d3c..3e7617d 100644 --- a/src/yasi_applets/main/help.html +++ b/src/yasi_applets/main/help.html @@ -11,8 +11,8 @@

Some keyboard tips:



diff --git a/src/yasi_applets/main/menu.html b/src/yasi_applets/main/menu.html index dbe1f8f..6bf89d1 100644 --- a/src/yasi_applets/main/menu.html +++ b/src/yasi_applets/main/menu.html @@ -2,7 +2,8 @@