From ed2ddb0a77f5d7c25bae9fc4e2fa87a198523ebd Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Wed, 10 Dec 2025 21:18:21 +0200 Subject: [PATCH] list debian deps --- README.md | 6 ++ src/yasi-webclient | 8 ++- src/yasi_applets/disks/disks.html | 30 ++++++--- src/yasi_applets/disks/routes.py | 2 +- src/yasi_applets/main/header.html | 1 - src/yasi_applets/main/routes.py | 23 +++++++ .../main/static/icons/keyboard.svg | 53 --------------- .../main/static/icons/language.png | Bin 22178 -> 0 bytes .../main/static/icons/language.svg | 1 - .../main/static/system-installer-dark.css | 9 ++- src/yasi_applets/users/routes.py | 4 +- .../welcome/locales/af/LC_MESSAGES/welcome.mo | Bin 753 -> 1080 bytes .../welcome/locales/af/LC_MESSAGES/welcome.po | 27 ++++++++ src/yasi_applets/welcome/routes.py | 25 +++++-- src/yasi_applets/welcome/welcome.html | 62 +++++++++++------- 15 files changed, 156 insertions(+), 95 deletions(-) delete mode 100644 src/yasi_applets/main/static/icons/keyboard.svg delete mode 100644 src/yasi_applets/main/static/icons/language.png delete mode 100644 src/yasi_applets/main/static/icons/language.svg diff --git a/README.md b/README.md index da8a68b..bf086bc 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,12 @@ Recommended: - sass-stylesheets-bulma (needed if the web front-end is to be used) - libxapp-gtk3-module +On Debian-based systems, you should get everything with the following: + +``` +apt install python3-flask python3-command-runner python3-pytest python3-dmm gettext libjs-htmx sass-stylesheets-bulma fonts-fork-awesome +``` + ## Development **Please Note:** This project is in early development, and if you have stumbled across this page, please note that it is nowhere near ready for production use yet. Hopefully that changes over the next few months! diff --git a/src/yasi-webclient b/src/yasi-webclient index d415514..373bc59 100755 --- a/src/yasi-webclient +++ b/src/yasi-webclient @@ -15,13 +15,14 @@ window = webview.create_window('System Installer', LOCATION, transparent=True, easy_drag=False, frameless=True, width=1050, focus=True, zoomable=True, confirm_close=True, resizable=True, shadow=True, - text_select=False + text_select=False, draggable=False ) webview.settings = { 'ALLOW_DOWNLOADS': False, 'ALLOW_FILE_URLS': False, - 'DRAG_REGION_SELECTOR': 'pywebview-drag-region', + 'DRAG_REGION_SELECTOR': '.pywebview-drag-region', + 'DRAG_REGION_DIRECT_TARGET_ONLY': True, 'OPEN_EXTERNAL_LINKS_IN_BROWSER': True, 'OPEN_DEVTOOLS_IN_DEBUG': True, 'IGNORE_SSL_ERRORS': False, @@ -30,4 +31,5 @@ webview.settings = { } window.events.closed += on_closed -webview.start(icon='/usr/share/icons/yasi.png') +#webview.start(icon='/usr/share/icons/yasi.png') +webview.start() diff --git a/src/yasi_applets/disks/disks.html b/src/yasi_applets/disks/disks.html index aef73d7..9d61cb8 100644 --- a/src/yasi_applets/disks/disks.html +++ b/src/yasi_applets/disks/disks.html @@ -24,8 +24,8 @@ Edit existing partitions - --> +


Current layout:

@@ -66,7 +66,7 @@ --> -{% for disk in blockdevs["blockdevices"] if disk["name"] != "zram0" and disk["name"] != "loop0" and disk["name"] != "sr0" %} +{% for disk in blockdevs["blockdevices"] if disk["name"] != "zram0" and "loop" not in disk["name"] and disk["name"] != "sr0" %} +
+

+ New GPT Partition Table +

{% for partition in partitions %} -
+
+
diff --git a/src/yasi_applets/disks/routes.py b/src/yasi_applets/disks/routes.py index 258be85..a91526b 100644 --- a/src/yasi_applets/disks/routes.py +++ b/src/yasi_applets/disks/routes.py @@ -30,7 +30,7 @@ def disks(): menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(), previous_step = previous_step_url, next_step=next_step_url, - partitions=current_app.config['CONFIG']['recipe']['create_partitions']['commands'], + partitions=current_app.config['CONFIG']['recipe']['create_partitions']['command_set'], format_partitions=current_app.config['CONFIG']['recipe']['format_partitions'], bottom_menu=bottom_menu) diff --git a/src/yasi_applets/main/header.html b/src/yasi_applets/main/header.html index d475749..5135f41 100644 --- a/src/yasi_applets/main/header.html +++ b/src/yasi_applets/main/header.html @@ -4,7 +4,6 @@
- \ No newline at end of file diff --git a/src/yasi_applets/main/static/system-installer-dark.css b/src/yasi_applets/main/static/system-installer-dark.css index 054cc0a..3d9ef3d 100644 --- a/src/yasi_applets/main/static/system-installer-dark.css +++ b/src/yasi_applets/main/static/system-installer-dark.css @@ -10,6 +10,7 @@ body { overflow: hidden; min-width: 1050px; min-height: 600px; + user-select: none; } html, body {margin: 0; height: 100%; overflow: hidden;} @@ -23,6 +24,7 @@ html, body {margin: 0; height: 100%; overflow: hidden;} position: absolute; top: 0px; bottom: 0px; + user-select: none; } .applet a:link a:hover a:active { @@ -36,7 +38,7 @@ html, body {margin: 0; height: 100%; overflow: hidden;} .applet { width: 100%; - height: 442px; + height: 512px; overflow-y: scroll; overflow-x: hidden; overflow: -moz-scrollbars-none; @@ -45,3 +47,8 @@ html, body {margin: 0; height: 100%; overflow: hidden;} .radio:hover { color: #f1f1f1; } + +.pywebview-drag-region { + width: 100%; + height: 85px; +} diff --git a/src/yasi_applets/users/routes.py b/src/yasi_applets/users/routes.py index 719cd62..f917f96 100644 --- a/src/yasi_applets/users/routes.py +++ b/src/yasi_applets/users/routes.py @@ -10,7 +10,7 @@ def set_language(LANG): """ Sets language for this applet """ - translations = gettext.translation("users", './applets/users/locales', + translations = gettext.translation("users", '/usr/share/yasi-daemon/yasi_applets/users/locales', fallback=True, languages=[LANG]) translations.install() _ = translations.gettext @@ -101,6 +101,8 @@ def build_stringlist(): string_dict['password_confirm'] = _("Password (confirm)") string_dict['password_nomatch'] = _("These passwords do now match") string_dict['password_tooshort'] = _("This password is too short") + string_dict['next_text'] = _("Next") + string_dict['back_text'] = _("Back") return string_dict diff --git a/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.mo b/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.mo index 1c850e9840c44960e503443ebba5b09ff569aa70..49c441b0f3703bebe785ac21f66a76601f2d96cd 100644 GIT binary patch delta 565 zcmYL_yGz4h6vc0At5xd*7eO70AdW7@p<@w53O;CRK`9d3+ZggHNlNTcx;YA^6csO8Z zC}bIwK^0Jf>rp+3>TNKC`UxnDT!OOLb;R3<_n<8B2o6(+=ov5jD7=Emr8N8}l+YAP z{*XwP5Xo&sn?jC+L2t5t*6bkFc;!}i&=*{AN+d}5Q2{qA6SW!nkZ zrJ_^!1Jz|JHZ4naTcqd~XZ9SMb5!!!^{C8d)v@^I`yiH8*llW5G+F`w4=vbEqoK2x zDe1n+T8SzP?&!2*au>VugW7+8UH3XoO+(pf+nq`w' else: - power_button = '' + power_button = """""" return str(power_button) @@ -135,12 +137,21 @@ def build_stringlist(): """ string_dict = {} string_dict['menu_item'] = _("Welcome") + # In the future, these will be loaded from their own modules + string_dict['menu_item_users'] = _("Users") + string_dict['menu_item_disks'] = _("Disks") + string_dict['menu_item_software'] = _("Software") + string_dict['menu_item_summary'] = _("Summary") string_dict['welcome_text'] = _("Welcome! This setup program will install Debian on to your system.") string_dict['confirm_text'] = _("Please confirm the following details:") string_dict['language_text'] = _("Language:") string_dict['keylayout_text'] = _("Keyboard Layout:") string_dict['timezone_text'] = _("Time Zone:") string_dict['basicsettings_text'] = _("Basic Settings:") + string_dict['power_text'] = _("Power") + string_dict['internet_text'] = _("Internet") + string_dict['next_text'] = _("Next") + string_dict['back_text'] = _("Back") lang_dict = {} lang_dict['af'] = _("Afrikaans") lang_dict['en'] = _("English (International)") @@ -157,6 +168,12 @@ def build_menu(): """ current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10) + #TODO: temporary hack: We need an automated way to translate all menu items + current_app.config['CONFIG']['settings']['menu']['users'] = (build_stringlist()['menu_item_users'], "/users", 20) + current_app.config['CONFIG']['settings']['menu']['disks'] = (build_stringlist()['menu_item_disks'], "/disks", 30) + current_app.config['CONFIG']['settings']['menu']['software'] = (build_stringlist()['menu_item_software'], "/software", 40) + current_app.config['CONFIG']['settings']['menu']['summary'] = (build_stringlist()['menu_item_summary'], "/summary", 50) + def build_summary(): """ diff --git a/src/yasi_applets/welcome/welcome.html b/src/yasi_applets/welcome/welcome.html index b5f8a26..e415ebf 100644 --- a/src/yasi_applets/welcome/welcome.html +++ b/src/yasi_applets/welcome/welcome.html @@ -5,34 +5,52 @@ src="/welcome/static/img/banner.png" alt="Debian Image banner" /> + +
+
+
+
+ + + +

{{ string_dict['welcome_text'] }}

{{ string_dict['confirm_text'] }}


-
- {{ string_dict['language_text'] }} -