Try to make header moving work
This commit is contained in:
@@ -54,8 +54,8 @@ if DEV_MODE == "1":
|
||||
|
||||
if __name__ == '__main__':
|
||||
serve(app,
|
||||
host='0.0.0.0',
|
||||
port=8080,
|
||||
host='127.0.0.1',
|
||||
port=9274,
|
||||
url_scheme='http',
|
||||
expose_tracebacks=DEV_MODE)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import webview
|
||||
|
||||
LOCATION = "http://localhost:8080/welcome"
|
||||
LOCATION = "http://localhost:9274/welcome"
|
||||
|
||||
def on_closed():
|
||||
"""
|
||||
@@ -12,9 +12,21 @@ def on_closed():
|
||||
|
||||
|
||||
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,
|
||||
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
|
||||
webview.start()
|
||||
webview.start(icon='/usr/share/icons/yasi.png')
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- drag region class: -->
|
||||
<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 %}
|
||||
<a href="{{ menu[item][1]}}"> <button class="button is-{% if request.path == menu[item][1] %}info{% else %}dark{% endif %}"> {{ menu[item][0]}} </button></a>
|
||||
|
||||
Reference in New Issue
Block a user