Try to make header moving work

This commit is contained in:
Jonathan Carter
2025-08-26 15:58:32 +02:00
parent 08f232bf51
commit dcbc8dd062
3 changed files with 19 additions and 7 deletions

View File

@@ -54,8 +54,8 @@ if DEV_MODE == "1":
if __name__ == '__main__': if __name__ == '__main__':
serve(app, serve(app,
host='0.0.0.0', host='127.0.0.1',
port=8080, port=9274,
url_scheme='http', url_scheme='http',
expose_tracebacks=DEV_MODE) expose_tracebacks=DEV_MODE)

View File

@@ -2,7 +2,7 @@
import webview import webview
LOCATION = "http://localhost:8080/welcome" LOCATION = "http://localhost:9274/welcome"
def on_closed(): def on_closed():
""" """
@@ -12,9 +12,21 @@ def on_closed():
window = webview.create_window('System Installer', LOCATION, window = webview.create_window('System Installer', LOCATION,
transparent=True, easy_drag=False, frameless=True, transparent=True, easy_drag=True, frameless=True,
width=1050, focus=True, zoomable=True, width=1050, focus=True, zoomable=True,
confirm_close=True, resizable=True) confirm_close=True, resizable=True,
)
webview.settings = {
'ALLOW_DOWNLOADS': False,
'ALLOW_FILE_URLS': False,
'DRAG_REGION_SELECTOR': 'pywebview-drag-region',
'OPEN_EXTERNAL_LINKS_IN_BROWSER': True,
'OPEN_DEVTOOLS_IN_DEBUG': True,
'IGNORE_SSL_ERRORS': False,
'REMOTE_DEBUGGING_PORT': None,
'SHOW_DEFAULT_MENUS': True
}
window.events.closed += on_closed window.events.closed += on_closed
webview.start() webview.start(icon='/usr/share/icons/yasi.png')

View File

@@ -4,7 +4,7 @@
<!-- drag region class: --> <!-- drag region class: -->
<div id="titlebar" class="pywebview-drag-region" style="padding: 15px; margin: -15px; padding-bottom: 30px;"> <div id="titlebar" class="pywebview-drag-region" style="padding: 15px; margin: -15px; padding-bottom: 30px;">
<a hx-get="/main/menu" hx-swap="outerHTML"/> <button class="button is-link"> </button </a> <a hx-get="/main/menu" hx-swap="outerHTML"/> <button class="button is-link"> <i class="fa fa-bars" aria-hidden="true"></i> </button> </a>
{% for item in menu_order %} {% for item in menu_order %}
<a href="{{ menu[item][1]}}"> <button class="button is-{% if request.path == menu[item][1] %}info{% else %}dark{% endif %}"> {{ menu[item][0]}} </button></a> <a href="{{ menu[item][1]}}"> <button class="button is-{% if request.path == menu[item][1] %}info{% else %}dark{% endif %}"> {{ menu[item][0]}} </button></a>