diff --git a/src/applets/disks/__init__.py b/src/applets/disks/__init__.py deleted file mode 100644 index 060d3aa..0000000 --- a/src/applets/disks/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('disks', __name__, - template_folder='') - -from applets.disks import routes - diff --git a/src/applets/disks/__pycache__/__init__.cpython-312.pyc b/src/applets/disks/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index bc17290..0000000 Binary files a/src/applets/disks/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/src/applets/disks/__pycache__/routes.cpython-312.pyc b/src/applets/disks/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index 12ba9b5..0000000 Binary files a/src/applets/disks/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/src/applets/disks/disks.html b/src/applets/disks/disks.html deleted file mode 100644 index 5af5b2f..0000000 --- a/src/applets/disks/disks.html +++ /dev/null @@ -1,155 +0,0 @@ -{% extends "layout.html" %} -{% block body %} - -
- -

How would you like to install Debian?

- -
- -
-
- -
-


Proposed layout:

-
- - - - - - - - - - -
-
-

- {{ disk['name'] }} ({{(disk['size']/1024000000)|round(0)|int }} GB) - Serial: {{ disk['serial'] }} -

-{% for child in disk['children'] %} - -
-
-

{{ child['name'] }} ({{ (child['size']/1024000000)|round(2) }} GiB)

-

{{ child['mountpoint'] }} - {{ child['fstype'] }} -

-
-
-
-{% endfor %} - {% if disk['maj:min'] == "252:0" %} -
-
-

{{ disk['name'] }} ({{ (disk['size']/1024000000)|round(2) }} GiB)

-

/dev/{{ disk['name'] }} - swap -

-
-
- {% endif %} -
-
- - - - - -
-{% endfor %} - - - - -
-
- - - - - -{% endblock %} diff --git a/src/applets/disks/disks_partition.html b/src/applets/disks/disks_partition.html deleted file mode 100644 index 2e77737..0000000 --- a/src/applets/disks/disks_partition.html +++ /dev/null @@ -1,88 +0,0 @@ - diff --git a/src/applets/disks/routes.py b/src/applets/disks/routes.py deleted file mode 100644 index 3208526..0000000 --- a/src/applets/disks/routes.py +++ /dev/null @@ -1,65 +0,0 @@ -from applets.disks import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint -import dmm.lsblk as lsblk -from flask import current_app - -@bp.route('/disks') -def disks(): - """ - Disks screen for the webui. - """ - blockdevs = lsblk.list_block_devices() - print(lsblk.list_block_devices()) - menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ") - next_step_url = menu[menu.index("disks")+1] - if menu[menu.index("disks")] == 1: - previous_step_url = False - else: - previous_step_url = menu[menu.index("disks")-1] - - add_disks_button = '  ' - add_swap_button = '  ' - bottom_menu = add_disks_button + add_swap_button - build_summary() - - return render_template('disks.html', blockdevs=blockdevs, - 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, - bottom_menu = bottom_menu) - - -@bp.route('/disks/partition/') -def disks_partition(part): - """ - Partition modal for the webui partition screen. - """ - print("Partition is: " + part) - partition = part - return render_template('disks_partition.html', - menu=current_app.config['CONFIG']['settings']['menu'], - partition=partition) - - -def build_menu(): - """ - Define menu items and paths. - """ - # proper one once translations are done: - #current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10) - current_app.config['CONFIG']['settings']['menu']['disks'] = ("Disks", "/disks", 30) - - -def build_summary(): - """ - Write up a summary of what this module will do. - """ - current_app.config['CONFIG']['Summary']['disks'] = {} - current_app.config['CONFIG']['Summary']['disks']['heading'] = "Disks and Partitions" - current_app.config['CONFIG']['Summary']['disks']['bleh'] = current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'] - current_app.config['CONFIG']['Summary']['disks']['text'] = "Pre-configured disk layout." - return("ok?") - -build_menu() diff --git a/src/applets/hardware/__init__.py b/src/applets/hardware/__init__.py deleted file mode 100644 index 2ee4eff..0000000 --- a/src/applets/hardware/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('hardware', __name__, - template_folder='') - -from applets.hardware import routes - diff --git a/src/applets/hardware/hardware.html b/src/applets/hardware/hardware.html deleted file mode 100644 index ea84634..0000000 --- a/src/applets/hardware/hardware.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "layout.html" %} -{% block body %} - -

Would you like fries with that?

- -
- -
- -Real-time Clock - -
-

Date / time. / timezone


- -
-
-
- -
- -Firmware - -
-

Install additional firmware.


- -
-
-
- - -{% endblock %} diff --git a/src/applets/hardware/routes.py b/src/applets/hardware/routes.py deleted file mode 100644 index e51488c..0000000 --- a/src/applets/hardware/routes.py +++ /dev/null @@ -1,65 +0,0 @@ -from applets.hardware import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint -from flask import current_app - -@bp.route('/hardware') -def webui_hardware(): - """ - Hardware screen for the webui. - """ - menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ") - next_step_url = menu[menu.index("hardware")+1] - if menu[menu.index("hardware")] == 1: - previous_step_url = False - else: - previous_step_url = menu[menu.index("hardware")-1] - - sources_button = '  ' - blends_button = '  ' - bottom_menu = sources_button + blends_button - build_summary() - - return render_template('hardware.html', - 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, - bottom_menu = bottom_menu, - popcon=current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']) - - -@bp.route('/hardware/settings', methods=['GET', 'POST']) -def hardware_settings(): - """ - Receive settings for the hardware applet. - """ - if request.method == 'POST': - popcon = "popcon" in request.form - current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'] = popcon - print(current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']) - build_summary() - return ('', 204) - - -def build_menu(): - """ - Define menu items and paths. - """ - # proper one once translations are done: - #current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10) - current_app.config['CONFIG']['settings']['menu']['hardware'] = ("Hardware", "/hardware", 40) - - -def build_summary(): - """ - Write up a summary of what this module will do. - """ - current_app.config['CONFIG']['Summary']['hardware'] = {} - current_app.config['CONFIG']['Summary']['hardware']['heading'] = "Hardware" - current_app.config['CONFIG']['Summary']['hardware']['bleh'] = current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'] - current_app.config['CONFIG']['Summary']['hardware']['text'] = "Participate in Popularity Contest: " + str(current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']) + "
No desktop environment selected." - return("ok?") - - -build_menu() diff --git a/src/applets/install/__init__.py b/src/applets/install/__init__.py deleted file mode 100644 index b6bc108..0000000 --- a/src/applets/install/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('install', __name__, - template_folder='') - -from applets.install import routes - diff --git a/src/applets/install/__pycache__/__init__.cpython-312.pyc b/src/applets/install/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 7d1050b..0000000 Binary files a/src/applets/install/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/src/applets/install/__pycache__/__init__.cpython-313.pyc b/src/applets/install/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 8b9f337..0000000 Binary files a/src/applets/install/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/src/applets/install/__pycache__/routes.cpython-312.pyc b/src/applets/install/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index 7d838eb..0000000 Binary files a/src/applets/install/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/src/applets/install/__pycache__/routes.cpython-313.pyc b/src/applets/install/__pycache__/routes.cpython-313.pyc deleted file mode 100644 index bf059ee..0000000 Binary files a/src/applets/install/__pycache__/routes.cpython-313.pyc and /dev/null differ diff --git a/src/applets/install/install.html b/src/applets/install/install.html deleted file mode 100644 index 3184fc4..0000000 --- a/src/applets/install/install.html +++ /dev/null @@ -1,52 +0,0 @@ -{% extends "layout.html" %} -{% block body %} - -
-

- - Installing... - -

- -
- -
-

- Installing system, the rest of the process is automated. -

- -

- -


- -
- - -
- -
- - -
-
- - -
- -
-
Initializing...
-
- - - - - -{% endblock %} diff --git a/src/applets/install/routes.py b/src/applets/install/routes.py deleted file mode 100644 index b343f2b..0000000 --- a/src/applets/install/routes.py +++ /dev/null @@ -1,109 +0,0 @@ -from applets.install import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint, jsonify -from flask import current_app - -import subprocess -import threading - - -status = { - "status": "idle", # idle | running | finished - "output": "", - "exit_code": None, - "lines": [] -} - - -@bp.route('/install',methods=['GET', 'POST', 'PUT']) -def install_index(): - """ - The page you'd get if you access the root of - this app in a browser. - """ - install_start() - return render_template('install.html') - - -@bp.route('/install-start',methods=['GET', 'POST', 'PUT']) -def install_start(): - """ - Trigger the installation process - """ - print("The installation process is starting!... in theory at least") - if status["status"] == "running": - return jsonify({"status": "already running"}), 409 # Conflict - threading.Thread(target=run_script).start() - return jsonify({"status": "started"}) - print("did it finish?") - - -def run_script(): - global status - status["status"] = "running" - - process = subprocess.Popen( - ["bash", "/data/jonathan/devel/highvoltage/system-installer/daemon/src/fake-install-shell.sh"], - stdout = subprocess.PIPE, - stderr = subprocess.STDOUT, - text = True) - - lines = [] - for line in iter(process.stdout.readline,''): - #lines.append(line.strip()) - #status["output"] = "\n".join(lines) - status["lines"].append(line.strip()) - - process.wait() - status["status"] = 'finished' - status["exit_code"] = process.returncode - - print(lines) - print("status:", status["status"], "code:", status["exit_code"]) - - -@bp.route('/install/status', methods=['GET', 'POST']) -def install_status(): - """ - Update on the status of the installation process. - """ - - # Keep track of the last line posted, so that we can include - # any new lines not provided to the UI yet - last_line = int(request.args.get("last_line", 0)) - new_lines = status["lines"][last_line:] - - if not new_lines and status["status"] == "finished": - return "" # Empty response = HTMX will stop polling - - lines_html = "" - for i, line in enumerate(new_lines, start=last_line + 1): - lines_html += f'
{line}
' - - return { - "output": status['output'], - "status": status['status'], - "lines": lines_html, - "last_line": f'' - } - - -@bp.route('/install/cancel', methods=["POST"]) -def install_cancel(): - """ - Cancel the installation process. - """ - if status["status"] != "running" or not status["process"]: - return Response("No running script", status=400) - process["process"].terminate() - process["status"] = "cancelled" - process["exit_code"] = -1 - return Response("Cancelled", status=200) - - -@bp.route('/settings',methods=['GET', 'POST', 'PUT']) -def settings(): - """ - Manage settings for the installation module. - """ - print("Settings") diff --git a/src/applets/main/__init__.py b/src/applets/main/__init__.py deleted file mode 100644 index febc0ae..0000000 --- a/src/applets/main/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('main', __name__, - template_folder='') - -from applets.main import routes - diff --git a/src/applets/main/__pycache__/__init__.cpython-312.pyc b/src/applets/main/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index edf656d..0000000 Binary files a/src/applets/main/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/src/applets/main/__pycache__/routes.cpython-312.pyc b/src/applets/main/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index 0b560e7..0000000 Binary files a/src/applets/main/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/src/applets/main/help.html b/src/applets/main/help.html deleted file mode 100644 index 66cbf3c..0000000 --- a/src/applets/main/help.html +++ /dev/null @@ -1,18 +0,0 @@ - diff --git a/src/applets/main/menu.html b/src/applets/main/menu.html deleted file mode 100644 index dbe1f8f..0000000 --- a/src/applets/main/menu.html +++ /dev/null @@ -1,17 +0,0 @@ - diff --git a/src/applets/main/quit.html b/src/applets/main/quit.html deleted file mode 100644 index 5c4b96e..0000000 --- a/src/applets/main/quit.html +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/src/applets/main/routes.py b/src/applets/main/routes.py deleted file mode 100644 index da1a1cf..0000000 --- a/src/applets/main/routes.py +++ /dev/null @@ -1,49 +0,0 @@ -from applets.welcome import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint -# we use this neat little trick to get config data from the main app -from flask import current_app -import gettext -import dmm.lsblk as lsblk - -@bp.route('/') -def index(): - """ - The page you'd get if you access the root of - this app in a browser. - """ - return ("Welcome to System Installer Daemon POC
" - "Version: Unavailable") - - -@bp.route('/api/v0') -def apihome(): - """ - Not sure what this function should do, but have - a feeling that it should exist. - """ - return ("0") - - -@bp.route('/main/help',methods=['GET', 'POST', 'PUT']) -def main_welcome(): - """ - Manages the main help system. - """ - return render_template('help.html') - - -@bp.route('/main/quit',methods=['GET', 'POST', 'PUT']) -def main_quit(): - """ - Manages the quit dialog. - """ - return render_template('quit.html') - - -@bp.route('/main/menu',methods=['GET', 'POST', 'PUT']) -def main_menu(): - """ - Manages the main menu. - """ - return render_template('menu.html') diff --git a/src/applets/software/__init__.py b/src/applets/software/__init__.py deleted file mode 100644 index d09ae64..0000000 --- a/src/applets/software/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('software', __name__, - template_folder='') - -from applets.software import routes - diff --git a/src/applets/software/__pycache__/__init__.cpython-312.pyc b/src/applets/software/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 34974b6..0000000 Binary files a/src/applets/software/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/src/applets/software/__pycache__/routes.cpython-312.pyc b/src/applets/software/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index ea3eeb4..0000000 Binary files a/src/applets/software/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/src/applets/software/routes.py b/src/applets/software/routes.py deleted file mode 100644 index cc58537..0000000 --- a/src/applets/software/routes.py +++ /dev/null @@ -1,81 +0,0 @@ -from applets.software import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint -from flask import current_app - -@bp.route('/software') -def webui_software(): - """ - Software screen for the webui. - """ - menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ") - next_step_url = menu[menu.index("software")+1] - if menu[menu.index("software")] == 1: - previous_step_url = False - else: - previous_step_url = menu[menu.index("software")-1] - - sources_button = '  ' - blends_button = '  ' - bottom_menu = sources_button + blends_button - # Leave out useless buttons until they do more - bottom_menu = '' - build_summary() - - return render_template('software.html', - 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, - bottom_menu = bottom_menu, - popcon=current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'], - desktop=current_app.config['CONFIG']['recipe']['install_desktop_environment']['packages']) - - -@bp.route('/software/settings', methods=['GET', 'POST']) -def software_settings(): - """ - Receive settings for the software applet. - """ - if request.method == 'POST': - popcon = "popcon" in request.form - current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'] = popcon - print(current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']) - build_summary() - return ('', 204) - - -@bp.route('/software/select-desktop', methods=['GET', 'POST']) -def software_select_desktop(): - """ - Select a desktop environment for installation - """ - if request.method == 'POST': - desktop = request.form['software-desktop'] - print(desktop) - current_app.config['CONFIG']['recipe']['install_desktop_environment']['packages'] = desktop - build_summary() - return ('', 204) - - -def build_menu(): - """ - Define menu items and paths. - """ - # proper one once translations are done: - #current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10) - current_app.config['CONFIG']['settings']['menu']['software'] = ("Software", "/software", 40) - - -def build_summary(): - """ - Write up a summary of what this module will do. - """ - current_app.config['CONFIG']['Summary']['software'] = {} - current_app.config['CONFIG']['Summary']['software']['heading'] = "Software" - current_app.config['CONFIG']['Summary']['software']['bleh'] = current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'] - current_app.config['CONFIG']['Summary']['software']['text'] = "Participate in Popularity Contest: " + str(current_app.config['CONFIG']['recipe']['popcon']['enable_popcon']) + "
Desktop environment selected: " + str(current_app.config['CONFIG']['recipe']['install_desktop_environment']['packages']) - return("ok?") - - -build_menu() diff --git a/src/applets/software/software.html b/src/applets/software/software.html deleted file mode 100644 index 13fc4f5..0000000 --- a/src/applets/software/software.html +++ /dev/null @@ -1,80 +0,0 @@ -{% extends "layout.html" %} -{% block body %} - -

Would you like fries with that?

- -
- Popularity Contest -

-

The Popularity Contest (popcon) is a programme where anonymous data is sent back to Debian, tracking the number of packages installed. More information can be obtained at https://popcon.debian.org.


- - -
- -
-

Desktop Environment

-
-

Would you like to install a graphical environment for this system?

- -
- -
- -
- - - - - - - -{% endblock %} diff --git a/src/applets/summary/__init__.py b/src/applets/summary/__init__.py deleted file mode 100644 index 29a4944..0000000 --- a/src/applets/summary/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('summary', __name__, - template_folder='') - -from applets.summary import routes - diff --git a/src/applets/summary/__pycache__/__init__.cpython-312.pyc b/src/applets/summary/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 7d1050b..0000000 Binary files a/src/applets/summary/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/src/applets/summary/__pycache__/routes.cpython-312.pyc b/src/applets/summary/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index 7d838eb..0000000 Binary files a/src/applets/summary/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/src/applets/summary/routes.py b/src/applets/summary/routes.py deleted file mode 100644 index 42237e9..0000000 --- a/src/applets/summary/routes.py +++ /dev/null @@ -1,42 +0,0 @@ -from applets.summary import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint -from flask import current_app - -@bp.route('/summary',methods=['GET', 'POST', 'PUT']) -def summary_index(): - """ - The page you'd get if you access the root of - this app in a browser. - """ - build_menu() - menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ") - previous_step_url = menu[menu.index("summary")-1] - next_step_url = "install" - - config = current_app.config['CONFIG'] - print (current_app.config['CONFIG']['Summary']) - html = (str(current_app.config['CONFIG']['Summary']['welcome']) + "
" + str(current_app.config['CONFIG']['Summary']['software'])) - summary = config['Summary'] - - return render_template('summary.html', - 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, - config=config, - html=html, - summary=summary) - - -def build_menu(): - """ - Define menu items and paths. - """ - # proper one once translations are done: - #current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10) - current_app.config['CONFIG']['settings']['menu']['summary'] = ("Summary", "/summary", 60) - - -build_menu() - diff --git a/src/applets/summary/summary.html b/src/applets/summary/summary.html deleted file mode 100644 index 375f30e..0000000 --- a/src/applets/summary/summary.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "layout.html" %} -{% block body %} - -

Ready to install! Please review all changes.

- -

This is the last chance to back out before committing to install, please ensure all the details are correct.

- -
- -{% for module in summary %} - -

{{ summary[module]['heading'] }}

- - -{{ summary[module]['text']|safe }} - -

- -{% endfor %} - -

- - - - - - - -{% endblock %} diff --git a/src/applets/users/__init__.py b/src/applets/users/__init__.py deleted file mode 100644 index a655a07..0000000 --- a/src/applets/users/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('users', __name__, - template_folder='') - -from applets.users import routes - diff --git a/src/applets/users/__pycache__/__init__.cpython-312.pyc b/src/applets/users/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 527cb29..0000000 Binary files a/src/applets/users/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/src/applets/users/__pycache__/routes.cpython-312.pyc b/src/applets/users/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index f7ea782..0000000 Binary files a/src/applets/users/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/src/applets/users/locales/af/LC_MESSAGES/users.mo b/src/applets/users/locales/af/LC_MESSAGES/users.mo deleted file mode 100644 index a3f474d..0000000 Binary files a/src/applets/users/locales/af/LC_MESSAGES/users.mo and /dev/null differ diff --git a/src/applets/users/locales/af/LC_MESSAGES/users.po b/src/applets/users/locales/af/LC_MESSAGES/users.po deleted file mode 100644 index 480f0a5..0000000 --- a/src/applets/users/locales/af/LC_MESSAGES/users.po +++ /dev/null @@ -1,65 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-06-20 15:48+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: routes.py:33 -msgid "Let's set up an initial user." -msgstr "Kom on stel 'n gebruiker op." - -msgid "Users" -msgstr "Gebruikers" - -#: routes.py:34 -msgid "Full Name" -msgstr "Volle Naam" - -#: routes.py:35 -msgid "Username" -msgstr "Gebruikersnaam" - -#: routes.py:36 -msgid "This username is available" -msgstr "Hierdie gebruikersnaam is nie beskikbaar nie." - -#: routes.py:37 -msgid "This username is not available" -msgstr "Hierdie gebruikersnaam is nie beskikbaar nie." - -#: routes.py:38 -msgid "This username is reserved by the system" -msgstr "Hierdie gebruikersnaam is reserveerd deur vir die sisteem." - -#: routes.py:39 -msgid "The username must be one word, lowercase, with no special characters" -msgstr "Die gebruikersnaam moet een woord wees, kleinletters, met geen spesiale karakters." - -#: routes.py:40 -msgid "Password" -msgstr "Wagwoord" - -#: routes.py:41 -msgid "Password (confirm)" -msgstr "Wagwoord (bevestig)" - -#: routes.py:42 -msgid "These passwords do now match" -msgstr "Hierdie wagwoorde is nie dieselfde nie" - -#: routes.py:43 -msgid "This password is too short" -msgstr "Hierdie wagwoord is te kort" diff --git a/src/applets/users/locales/users.pot b/src/applets/users/locales/users.pot deleted file mode 100644 index beefb58..0000000 --- a/src/applets/users/locales/users.pot +++ /dev/null @@ -1,62 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-06-20 15:48+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: routes.py:33 -msgid "Let's set up an initial user." -msgstr "" - -#: routes.py:34 -msgid "Full Name" -msgstr "" - -#: routes.py:35 -msgid "Username" -msgstr "" - -#: routes.py:36 -msgid "This username is available" -msgstr "" - -#: routes.py:37 -msgid "This username is not available" -msgstr "" - -#: routes.py:38 -msgid "This username is reserved by the system" -msgstr "" - -#: routes.py:39 -msgid "The username must be one word, lowercase, with no special characters" -msgstr "" - -#: routes.py:40 -msgid "Password" -msgstr "" - -#: routes.py:41 -msgid "Password (confirm)" -msgstr "" - -#: routes.py:42 -msgid "These passwords do now match" -msgstr "" - -#: routes.py:43 -msgid "This password is too short" -msgstr "" diff --git a/src/applets/users/routes.py b/src/applets/users/routes.py deleted file mode 100644 index c9a42b3..0000000 --- a/src/applets/users/routes.py +++ /dev/null @@ -1,126 +0,0 @@ -from applets.software import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint -import gettext -# we use this neat little trick to get config data from the main app -from flask import current_app - -# Set up Gettext -def set_language(LANG): - """ - Sets language for this applet - """ - translations = gettext.translation("users", './applets/users/locales', - fallback=True, languages=[LANG]) - translations.install() - _ = translations.gettext - -set_language('') - - -@bp.route('/users') -def users_root(): - """ - Users screen for the webui. - """ - set_language(current_app.config['CONFIG']['settings']['language']) - string_dict = build_stringlist() - build_menu() - menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ") - next_step_url = menu[menu.index("users")+1] - if menu[menu.index("users")] == 1: - previous_step_url = False - else: - previous_step_url = menu[menu.index("users")-1] - - root_button = '  ' - ldap_button = '  ' - ad_button = '  ' - csv_button = '  ' - bottom_menu = root_button + ldap_button + ad_button + csv_button - bottom_menu = "" - - initial_user = current_app.config['CONFIG']['recipe']['users']['users'][0] - - build_summary() - - return render_template('users.html', string_dict=string_dict, - 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, - bottom_menu=bottom_menu, - initial_user=initial_user) - - -@bp.route('/users/user-check/', methods=['GET', 'POST', 'PUT']) -def check_user(): - if request.method == 'POST': - username = request.form["username"] - fullname = request.form["fullname"] - current_app.config['CONFIG']['recipe']['users']['users'][0]['username'] = username - current_app.config['CONFIG']['recipe']['users']['users'][0]['fullname'] = fullname - if username in ["root", "games"]: - return('

That username is not available

') - else: - return('

That username is available

') - build_summary() - return("") - - -@bp.route('/users/password-check/', methods=['GET', 'POST', 'PUT']) -def check_password(): - if request.method == 'POST': - password = request.form["password"] - password_confirm = request.form["password_confirm"] - current_app.config['CONFIG']['recipe']['users']['users'][0]['password'] = password - current_app.config['CONFIG']['recipe']['users']['users'][0]['password_confirm'] = password_confirm - if password != password_confirm: - return('

Passwords do not match

') - else: - return('

Passwords match

') - build_summary() - return("") - - -def build_stringlist(): - """ - Return all the strings that is used in this applet. - """ - string_dict = {} - string_dict['menu_item'] = _("Users") - string_dict['initial_user_text'] = _("Let's set up an initial user.") - string_dict['full_name'] = _("Full Name") - string_dict['user_name'] = _("Username") - string_dict['user_name_hint'] = _("One word, all lowercase") - string_dict['user_name_available'] = _("This username is available") - string_dict['user_name_not_available'] = _("This username is not available") - string_dict['user_name_reserved'] = _("This username is reserved by the system") - string_dict['user_name_characters'] = _("The username must be one word, lowercase, with no special characters") - string_dict['password'] = _("Password") - string_dict['password_confirm'] = _("Password (confirm)") - string_dict['password_nomatch'] = _("These passwords do now match") - string_dict['password_tooshort'] = _("This password is too short") - return string_dict - - -def build_menu(): - """ - Define menu items and paths. - """ - current_app.config['CONFIG']['settings']['menu']['users'] = (build_stringlist()['menu_item'], "/users", 20) - print(current_app.config['CONFIG']['settings']['menu']) - - -def build_summary(): - """ - Write up a summary of what this module will do. - """ - current_app.config['CONFIG']['Summary']['users'] = {} - current_app.config['CONFIG']['Summary']['users']['heading'] = "Users and Identity" - current_app.config['CONFIG']['Summary']['users']['bleh'] = current_app.config['CONFIG']['recipe']['popcon']['enable_popcon'] - current_app.config['CONFIG']['Summary']['users']['settings'] = current_app.config['CONFIG']['recipe']['users']['users'] - current_app.config['CONFIG']['Summary']['users']['text'] = "Add primary user with the username: " + str(current_app.config['CONFIG']['recipe']['users']['users'][0]['username']) - return("ok?") - -build_menu() diff --git a/src/applets/users/users.html b/src/applets/users/users.html deleted file mode 100644 index d07fc8b..0000000 --- a/src/applets/users/users.html +++ /dev/null @@ -1,73 +0,0 @@ -{% extends "layout.html" %} -{% block body %} - -

{{ string_dict['initial_user_text'] }}

- -
- -
- - - -
- -
- -
- - - - - -
-
- -
- -
- - - - - -
-
-

{{ string_dict['user_name_hint'] }}

-
-
- -
- -
- - - - -
-
- -
- -
- - - - -
-

-
-
-
- - - -
- - - - -{% endblock %} diff --git a/src/applets/webui/__init__.py b/src/applets/webui/__init__.py deleted file mode 100644 index bd67c43..0000000 --- a/src/applets/webui/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('webui', __name__) - -from applets.webui import routes - diff --git a/src/applets/webui/routes.py b/src/applets/webui/routes.py deleted file mode 100644 index 6526907..0000000 --- a/src/applets/webui/routes.py +++ /dev/null @@ -1,94 +0,0 @@ -from applets.webui import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint - - -@bp.route('/webui') -def webui_index(): - """ - The page you'd get if you access the root of - this app in a browser. - """ - return (""" - - - - - - -
-
- 1 -



- [Here Mouse, Mouse!] -



- 2 -
- - Welcome to System Installer Daemon POC
- This is the WebUI Index - """) - - -@bp.route('/webui/welcome') -def webui_welcome(): - """ - Welcome screen for the webui. - - It's job right now is to: - - - Obtain the language - - Check basic system eligibility - """ - return render_template('welcome.html') - - -@bp.route('/webui/users') -def webui_users(): - """ - Users screen for the webui. - - It's job right now is to: - - - Set up an initial user - - More functions will follow at a later stage - """ - return render_template('users.html') - - -@bp.route('/webui/disks') -def webui_disks(): - """ - Disks screen for the webui. - """ - return render_template('disks.html') - - -@bp.route('/webui/disks/partition/') -def webui_disks_partition(part): - """ - Partition modal for the webui partition screen. - """ - return render_template('disks_partition.html') - - -@bp.route('/webui/software') -def webui_software(): - """ - Software screen for the webui. - """ - return render_template('software.html') - - -@bp.route('/webui/summary') -def webui_summary(): - """ - Summary screen for the webui. - """ - return render_template('summary.html') diff --git a/src/applets/welcome/__init__.py b/src/applets/welcome/__init__.py deleted file mode 100644 index 78a1509..0000000 --- a/src/applets/welcome/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from flask import Blueprint - -bp = Blueprint('welcome', __name__, - template_folder='') - -from applets.welcome import routes diff --git a/src/applets/welcome/__pycache__/__init__.cpython-312.pyc b/src/applets/welcome/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index ac1fc3a..0000000 Binary files a/src/applets/welcome/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/src/applets/welcome/__pycache__/routes.cpython-312.pyc b/src/applets/welcome/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index 5203f8d..0000000 Binary files a/src/applets/welcome/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/src/applets/welcome/img/banner.jpg b/src/applets/welcome/img/banner.jpg deleted file mode 100644 index e9fabed..0000000 Binary files a/src/applets/welcome/img/banner.jpg and /dev/null differ diff --git a/src/applets/welcome/img/banner.png b/src/applets/welcome/img/banner.png deleted file mode 100644 index 51df1e4..0000000 Binary files a/src/applets/welcome/img/banner.png and /dev/null differ diff --git a/src/applets/welcome/locales/af/LC_MESSAGES/welcome.mo b/src/applets/welcome/locales/af/LC_MESSAGES/welcome.mo deleted file mode 100644 index 1c850e9..0000000 Binary files a/src/applets/welcome/locales/af/LC_MESSAGES/welcome.mo and /dev/null differ diff --git a/src/applets/welcome/locales/af/LC_MESSAGES/welcome.po b/src/applets/welcome/locales/af/LC_MESSAGES/welcome.po deleted file mode 100644 index 2f33cb4..0000000 --- a/src/applets/welcome/locales/af/LC_MESSAGES/welcome.po +++ /dev/null @@ -1,33 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-15 21:52+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: UTF-8\n" - -#: routes.py:27 -msgid "Welcome! This setup program will install Debian on to your system." -msgstr "Welkom! Hierdie program sal jou deur die proses lei om Debian te installeer na jou sisteem." - -#: routes.py:28 -msgid "Please confirm the following details:" -msgstr "Bevestig asseblief die volgende:" - -#: routes.py:29 -msgid "Language:" -msgstr "Taal:" - -#: routes.py:30 -msgid "Keyboard Layout:" -msgstr "Knoppies Uitleg:" - -#: routes.py:31 -msgid "Time Zone:" -msgstr "Tyd Zone:" diff --git a/src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.mo b/src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.mo deleted file mode 100644 index bffd36d..0000000 Binary files a/src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.mo and /dev/null differ diff --git a/src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.po b/src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.po deleted file mode 100644 index 821daeb..0000000 --- a/src/applets/welcome/locales/en-za/LC_MESSAGES/welcome.po +++ /dev/null @@ -1,33 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-15 21:52+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: en-za\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: UTF-8\n" - -#: routes.py:27 -msgid "Welcome! This setup program will install Debian on to your system." -msgstr "Howzit! This setup program will install Debian on to your system." - -#: routes.py:28 -msgid "Please confirm the following details:" -msgstr "Please confirm the following details:" - -#: routes.py:29 -msgid "Language:" -msgstr "Language:" - -#: routes.py:30 -msgid "Keyboard Layout:" -msgstr "Keyboard Layout:" - -#: routes.py:31 -msgid "Time Zone:" -msgstr "Time Zone:" diff --git a/src/applets/welcome/locales/en/LC_MESSAGES/welcome.mo b/src/applets/welcome/locales/en/LC_MESSAGES/welcome.mo deleted file mode 100644 index 5fde0b8..0000000 Binary files a/src/applets/welcome/locales/en/LC_MESSAGES/welcome.mo and /dev/null differ diff --git a/src/applets/welcome/locales/en/LC_MESSAGES/welcome.po b/src/applets/welcome/locales/en/LC_MESSAGES/welcome.po deleted file mode 100644 index 21ecfc6..0000000 --- a/src/applets/welcome/locales/en/LC_MESSAGES/welcome.po +++ /dev/null @@ -1,33 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-15 21:52+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: en\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: UTF-8\n" - -#: routes.py:27 -msgid "Welcome! This setup program will install Debian on to your system." -msgstr "Welcomen! This setup program will install Debian on to your system." - -#: routes.py:28 -msgid "Please confirm the following details:" -msgstr "Please confirmen the following details:" - -#: routes.py:29 -msgid "Language:" -msgstr "Language:" - -#: routes.py:30 -msgid "Keyboard Layout:" -msgstr "Keyboard Layout:" - -#: routes.py:31 -msgid "Time Zone:" -msgstr "Time Zone:" diff --git a/src/applets/welcome/locales/fr/LC_MESSAGES/welcome.mo b/src/applets/welcome/locales/fr/LC_MESSAGES/welcome.mo deleted file mode 100644 index 6e9bcab..0000000 Binary files a/src/applets/welcome/locales/fr/LC_MESSAGES/welcome.mo and /dev/null differ diff --git a/src/applets/welcome/locales/fr/LC_MESSAGES/welcome.po b/src/applets/welcome/locales/fr/LC_MESSAGES/welcome.po deleted file mode 100644 index e0a9dce..0000000 --- a/src/applets/welcome/locales/fr/LC_MESSAGES/welcome.po +++ /dev/null @@ -1,33 +0,0 @@ -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-15 21:52+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: UTF-8\n" - -#: routes.py:27 -msgid "Welcome! This setup program will install Debian on to your system." -msgstr "Bienvienue! This setup program will install Debian on to your system." - -#: routes.py:28 -msgid "Please confirm the following details:" -msgstr "Please confirmen the following details:" - -#: routes.py:29 -msgid "Language:" -msgstr "Language:" - -#: routes.py:30 -msgid "Keyboard Layout:" -msgstr "Keyboard Layout:" - -#: routes.py:31 -msgid "Time Zone:" -msgstr "Time Zone:" diff --git a/src/applets/welcome/locales/welcome.pot b/src/applets/welcome/locales/welcome.pot deleted file mode 100644 index 5081e1e..0000000 --- a/src/applets/welcome/locales/welcome.pot +++ /dev/null @@ -1,38 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-15 21:52+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: routes.py:27 -msgid "Welcome! This setup program will install Debian on to your system." -msgstr "" - -#: routes.py:28 -msgid "Please confirm the following details:" -msgstr "" - -#: routes.py:29 -msgid "Language:" -msgstr "" - -#: routes.py:30 -msgid "Keyboard Layout:" -msgstr "" - -#: routes.py:31 -msgid "Time Zone:" -msgstr "" diff --git a/src/applets/welcome/routes.py b/src/applets/welcome/routes.py deleted file mode 100644 index e1a56f2..0000000 --- a/src/applets/welcome/routes.py +++ /dev/null @@ -1,114 +0,0 @@ -from applets.welcome import bp -from flask import Flask, request, session, redirect, \ - url_for, render_template, flash, Blueprint -# we use this neat little trick to get config data from the main app -from flask import current_app -import gettext -import dmm.lsblk as lsblk -import dmm.timezone as timezone - -# Set up Gettext -def set_language(LANG): - """ - Sets language for this applet - """ - translations = gettext.translation("welcome", './applets/welcome/locales', - fallback=True, languages=[LANG]) - translations.install() - _ = translations.gettext - - -@bp.route('/welcome',methods=['GET', 'POST', 'PUT']) -def welcome_index(): - """ - The page you'd get if you access the root of - this app in a browser. - """ - set_language(current_app.config['CONFIG']['settings']['language']) - if request.method == 'POST': - if "lang" in request.form.keys(): - current_app.config['CONFIG']['settings']['language'] = request.form["lang"] - LANG = current_app.config['CONFIG']['settings']['language'] - set_language(LANG) - FORMLANG = request.form["lang"] - if "keyboard" in request.form.keys(): - print(request.form["keyboard"]) - if "timezone" in request.form.keys(): - print(request.form["timezone"]) - global lang - lang = current_app.config['CONFIG']['settings']['language'] - blkid = lsblk.list_scsi_devices() - string_dict = build_stringlist() - build_menu() - build_summary() - menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ") - next_step_url = menu[menu.index("welcome")+1] - previous_step_url = menu[menu.index("welcome")-1] - - print("index is: " , menu.index("welcome")) - if menu.index("welcome") == 0: - previous_step_url = False - else: - previous_step_url = menu[menu.index("users")-1] - - print("next is: " + next_step_url) - print("previous is: " , previous_step_url) - power_button = '' - internet_button = '  ' - bottom_menu = power_button + internet_button - - return render_template('welcome.html', - string_dict=string_dict, selected_lang=lang, - menu=current_app.config['CONFIG']['settings']['menu'], - menu_order=current_app.config['CONFIG']['settings']['menu_order'].split(), - timezones=timezone.list_timezones()[1].split("\n"), - previous_step=previous_step_url, - next_step=next_step_url, - bottom_menu=bottom_menu) - - -def build_stringlist(): - """ - Return all the strings that is used in this applet." - """ - string_dict = {} - string_dict['menu_item'] = _("Welcome") - 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:") - lang_dict = {} - lang_dict['af'] = _("Afrikaans") - lang_dict['en'] = _("English (International)") - lang_dict['en-us'] = _("English (United States)") - lang_dict['en-uk'] = _("English (United Kingdom)") - lang_dict['en-za'] = _("English (South Africa)") - string_dict['lang_list'] = lang_dict - return string_dict - -def build_menu(): - """ - Define menu items and paths. - """ - current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10) - - -def build_summary(): - """ - Write up a summary of what this module will do. - """ - html = ("Basic settings

Language: " + lang + "

") - if not 'Summary' in current_app.config['CONFIG']: - current_app.config['CONFIG']['Summary'] = {} - current_app.config['CONFIG']['Summary']['welcome'] = {} - current_app.config['CONFIG']['Summary']['welcome']['heading'] = "Basic Settings" - print(current_app.config['CONFIG']['Summary']['welcome']) - text = "Language: " + str(current_app.config['CONFIG']['settings']['language']) - current_app.config['CONFIG']['Summary']['welcome']['text'] = text - return(html) - - -set_language(current_app.config['CONFIG']['settings']['language']) -build_menu diff --git a/src/applets/welcome/welcome.html b/src/applets/welcome/welcome.html deleted file mode 100644 index 7b6ac45..0000000 --- a/src/applets/welcome/welcome.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "layout.html" %} -{% block body %} - -Debian Image banner - -

{{ string_dict['welcome_text'] }}

-

{{ string_dict['confirm_text'] }}


- -
- {{ string_dict['language_text'] }} - -
-
- -
- {{ string_dict['keylayout_text'] }} - -
-
- -{% endblock %} diff --git a/src/static/applets/welcome/img b/src/static/applets/welcome/img deleted file mode 120000 index 9fb9cd5..0000000 --- a/src/static/applets/welcome/img +++ /dev/null @@ -1 +0,0 @@ -../../../applets/welcome/img \ No newline at end of file diff --git a/src/static/bulma.css b/src/static/bulma.css deleted file mode 120000 index b0f56c8..0000000 --- a/src/static/bulma.css +++ /dev/null @@ -1 +0,0 @@ -/usr/share/bulma/css/bulma.css \ No newline at end of file diff --git a/src/static/htmx.min.js b/src/static/htmx.min.js deleted file mode 120000 index 5d13217..0000000 --- a/src/static/htmx.min.js +++ /dev/null @@ -1 +0,0 @@ -/usr/share/javascript/htmx/htmx.min.js \ No newline at end of file diff --git a/src/static/icons/avatar-default.svg b/src/static/icons/avatar-default.svg deleted file mode 100644 index 4e08bb5..0000000 --- a/src/static/icons/avatar-default.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/static/icons/blippie.png b/src/static/icons/blippie.png deleted file mode 100644 index 55f0ada..0000000 Binary files a/src/static/icons/blippie.png and /dev/null differ diff --git a/src/static/icons/console.jpeg b/src/static/icons/console.jpeg deleted file mode 100644 index dbfae2e..0000000 Binary files a/src/static/icons/console.jpeg and /dev/null differ diff --git a/src/static/icons/console.png b/src/static/icons/console.png deleted file mode 100644 index bcf7974..0000000 Binary files a/src/static/icons/console.png and /dev/null differ diff --git a/src/static/icons/debian.png b/src/static/icons/debian.png deleted file mode 100644 index 08ec2d0..0000000 Binary files a/src/static/icons/debian.png and /dev/null differ diff --git a/src/static/icons/emblem-default-symbolic.svg b/src/static/icons/emblem-default-symbolic.svg deleted file mode 100644 index 8334993..0000000 --- a/src/static/icons/emblem-default-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/static/icons/gnome.jpeg b/src/static/icons/gnome.jpeg deleted file mode 100644 index ecfdbc7..0000000 Binary files a/src/static/icons/gnome.jpeg and /dev/null differ diff --git a/src/static/icons/greencheck.png b/src/static/icons/greencheck.png deleted file mode 100644 index f0b2eb7..0000000 Binary files a/src/static/icons/greencheck.png and /dev/null differ diff --git a/src/static/icons/kde.jpeg b/src/static/icons/kde.jpeg deleted file mode 100644 index 5cf14c2..0000000 Binary files a/src/static/icons/kde.jpeg and /dev/null differ diff --git a/src/static/icons/keyboard.svg b/src/static/icons/keyboard.svg deleted file mode 100644 index ad577e3..0000000 --- a/src/static/icons/keyboard.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - diff --git a/src/static/icons/lxde.jpeg b/src/static/icons/lxde.jpeg deleted file mode 100644 index f5de15e..0000000 Binary files a/src/static/icons/lxde.jpeg and /dev/null differ diff --git a/src/static/icons/mate.jpeg b/src/static/icons/mate.jpeg deleted file mode 100644 index a4c9801..0000000 Binary files a/src/static/icons/mate.jpeg and /dev/null differ diff --git a/src/static/icons/tab-new-symbolic.svg b/src/static/icons/tab-new-symbolic.svg deleted file mode 100644 index 3d2119d..0000000 --- a/src/static/icons/tab-new-symbolic.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/static/icons/user-available-symbolic.svg b/src/static/icons/user-available-symbolic.svg deleted file mode 100644 index 2f56f2c..0000000 --- a/src/static/icons/user-available-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/static/icons/user-invisible-symbolic.svg b/src/static/icons/user-invisible-symbolic.svg deleted file mode 100644 index d59e53c..0000000 --- a/src/static/icons/user-invisible-symbolic.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/static/icons/xfce.jpeg b/src/static/icons/xfce.jpeg deleted file mode 100644 index d5a0409..0000000 Binary files a/src/static/icons/xfce.jpeg and /dev/null differ diff --git a/src/static/slide1.png b/src/static/slide1.png deleted file mode 100644 index 59f8bc0..0000000 Binary files a/src/static/slide1.png and /dev/null differ diff --git a/src/static/system-installer-blippie.css b/src/static/system-installer-blippie.css deleted file mode 100644 index de6ad4e..0000000 --- a/src/static/system-installer-blippie.css +++ /dev/null @@ -1,37 +0,0 @@ -html { - /* Overwrite the white that is set by bulma.css */ -body { - display: flex; - font-family: Noto Sans; - color: white; - overflow: hidden; - min-width: 1050px; - min-height: 600px; -} - -.frame { - border-radius: 10px; - background-color: #0f1933; - padding: 15px 15px 15px 15px; - width: 100%; - min-height: 600px; - position: absolute; - top: 0px; - bottom: 0px; -} - -.applet a:link a:hover a:active { - color: yellow; -} - -.applet { - width: 100%; - height: 470px; - bottom: 0px; - overflow-y: scroll; - overflow-x: hidden; -} - -.radio:hover { - color: #f1f1f1; -} diff --git a/src/static/system-installer-dark.css b/src/static/system-installer-dark.css deleted file mode 100644 index 576599a..0000000 --- a/src/static/system-installer-dark.css +++ /dev/null @@ -1,41 +0,0 @@ -html { - /* Overwrite the white that is set by bulma.css */ - background: transparent; -} - -body { - display: flex; - font-family: Sans; Roboto; Lato; Noto Sans; - color: white; - overflow: hidden; - min-width: 1050px; - min-height: 600px; -} - -html, body {margin: 0; height: 100%; overflow: hidden;} - -.frame { - border-radius: 10px; - background-color: #404040; - padding: 15px 15px 15px 15px; - width: 100%; - min-height: 600px; - position: absolute; - top: 0px; - bottom: 0px; -} - -.applet a:link a:hover a:active { - color: yellow; -} - -.applet { - width: 100%; - height: 442px; - overflow-y: scroll; - overflow-x: hidden; -} - -.radio:hover { - color: #f1f1f1; -} diff --git a/src/static/system-installer-light.css b/src/static/system-installer-light.css deleted file mode 100644 index 15f7acd..0000000 --- a/src/static/system-installer-light.css +++ /dev/null @@ -1,37 +0,0 @@ -html { - /* Overwrite the white that is set by bulma.css */ - background-color: transparent; -} - -body { - display: flex; - font-family: Noto Sans; - color: white; - overflow: hidden; - min-width: 1050px; - min-height: 600px; -} - -.frame { - border-radius: 10px; - background-color: #e9e8e4; - padding: 15px; - max-width: 1050px; -} - -.applet a:link a:hover a:active { - color: yellow; -} - -.applet { - color: #383838; - width: 1040px; - height: 470px; - overflow-y: scroll; - overflow-x: hidden; - padding-right: 20px; -} - -.radio:hover { - color: #404040; -} diff --git a/src/static/system-installer.css b/src/static/system-installer.css deleted file mode 120000 index 6db37bc..0000000 --- a/src/static/system-installer.css +++ /dev/null @@ -1 +0,0 @@ -system-installer-dark.css \ No newline at end of file diff --git a/src/system-installer-daemon b/src/system-installer-daemon index 91eb4ea..2371deb 100755 --- a/src/system-installer-daemon +++ b/src/system-installer-daemon @@ -38,7 +38,7 @@ if DEV_MODE: for APP in APPS.split(" "): print(f"Loading applet: {APP} ") # Dynamically import the blueprint module - module = importlib.import_module(f"applets.{APP}") + module = importlib.import_module(f"yasi_applets.{APP}") # Get the blueprint (bp) from the imported module bp = getattr(module, "bp") # Register the blueprint with the app diff --git a/src/templates/layout.html b/src/templates/layout.html index 583f402..00a09ed 100644 --- a/src/templates/layout.html +++ b/src/templates/layout.html @@ -3,12 +3,11 @@ - - - - - - + + + + +