some more ui work
This commit is contained in:
@@ -24,9 +24,6 @@
|
||||
|
||||
<div class="columns" width="100%">
|
||||
<div class="column"><p> Current layout: </p></div>
|
||||
<div style="position: static; right: 15px;">
|
||||
<div class="column is-link"><button class="button iis-info"> <img src="/static/icons/tab-new-symbolic.svg"> Add Disk or Filesystem </button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -2,6 +2,7 @@ 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():
|
||||
@@ -10,7 +11,23 @@ def disks():
|
||||
"""
|
||||
blockdevs = lsblk.list_block_devices()
|
||||
print(lsblk.list_block_devices())
|
||||
return render_template('disks.html', blockdevs=blockdevs)
|
||||
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 = ' <button class="button iis-info"> <img src="/static/icons/tab-new-symbolic.svg"> Add Disk or Filesystem </button>'
|
||||
add_swap_button = ' <button class="button iis-info"> <img src="/static/icons/tab-new-symbolic.svg"> Swap Configuration </button>'
|
||||
bottom_menu = add_disks_button + add_swap_button
|
||||
|
||||
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/<part>')
|
||||
@@ -18,6 +35,16 @@ def disks_partition(part):
|
||||
"""
|
||||
Partition modal for the webui partition screen.
|
||||
"""
|
||||
return render_template('disks_partition.html')
|
||||
return render_template('disks_partition.html',
|
||||
menu=current_app.config['CONFIG']['settings']['menu'])
|
||||
|
||||
|
||||
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)
|
||||
|
||||
build_menu()
|
||||
|
||||
7
src/applets/install/__init__.py
Normal file
7
src/applets/install/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp = Blueprint('install', __name__,
|
||||
template_folder='')
|
||||
|
||||
from applets.install import routes
|
||||
|
||||
BIN
src/applets/install/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/applets/install/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
src/applets/install/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
src/applets/install/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
src/applets/install/__pycache__/routes.cpython-312.pyc
Normal file
BIN
src/applets/install/__pycache__/routes.cpython-312.pyc
Normal file
Binary file not shown.
BIN
src/applets/install/__pycache__/routes.cpython-313.pyc
Normal file
BIN
src/applets/install/__pycache__/routes.cpython-313.pyc
Normal file
Binary file not shown.
12
src/applets/install/install.html
Normal file
12
src/applets/install/install.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block body %}
|
||||
|
||||
<p><b> Installing...</b></p>
|
||||
|
||||
<p> Or are we... </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
14
src/applets/install/routes.py
Normal file
14
src/applets/install/routes.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from applets.install import bp
|
||||
from flask import Flask, request, session, redirect, \
|
||||
url_for, render_template, flash, Blueprint
|
||||
from flask import current_app
|
||||
|
||||
@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.
|
||||
"""
|
||||
return render_template('install.html')
|
||||
|
||||
|
||||
@@ -1,11 +1,40 @@
|
||||
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.
|
||||
"""
|
||||
return render_template('software.html')
|
||||
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 = ' <button class="button iis-info"> <img src="/static/icons/tab-new-symbolic.svg"> Edit Sources </button>'
|
||||
blends_button = ' <button class="button iis-info"> <img src="/static/icons/tab-new-symbolic.svg"> Install a Blend </button>'
|
||||
bottom_menu = sources_button + blends_button
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
build_menu()
|
||||
|
||||
|
||||
@@ -5,13 +5,43 @@
|
||||
|
||||
<br>
|
||||
|
||||
<ul>
|
||||
<li>Would you like to participate in popcon?</li>
|
||||
<li>Desktop environment</li>
|
||||
<li>Server software</li>
|
||||
<li>Sources.list configuration (include install media?)</li>
|
||||
</ul>
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px; margin-bottom: 20px;">
|
||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
||||
Popularity Contest</span>
|
||||
<div style="padding-left: 15px; padding-right: 15px; background-color: #fff; color: #000;">
|
||||
<p>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. <br/><br/> <b>Would you like to participate in popcon?</b><p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
||||
Desktop Environment</span>
|
||||
<div style="padding: 15px; padding-top: 10px; padding-bottom: 5px; background-color: #fff; color: #000;">
|
||||
<p>
|
||||
<img src="/static/icons/console.png" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/gnome.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/kde.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/xfce.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/mate.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<img src="/static/icons/lxde.jpeg" width="48px" alt="" style="padding-right: 10px;" />
|
||||
<p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px; margin-bottom: 20px;">
|
||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
||||
Select software from Debian archives</span>
|
||||
<div style="padding-left: 15px; padding-right: 15px; padding-bottom: 5px; background-color: #fff; color: #000;">
|
||||
<p><b>Select packages or selections of packages from the Debian archives.</b></p>
|
||||
<button class="button is-dark">Games</button>
|
||||
<button class="button is-dark">Productivity</button>
|
||||
<button class="button is-dark">Creativity</button>
|
||||
<button class="button is-dark">Server</button>
|
||||
<button class="button is-dark">Development</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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():
|
||||
@@ -8,6 +9,28 @@ def summary_index():
|
||||
The page you'd get if you access the root of
|
||||
this app in a browser.
|
||||
"""
|
||||
return render_template('summary.html')
|
||||
build_menu()
|
||||
menu = current_app.config['CONFIG']['settings']['menu_order'].split(" ")
|
||||
previous_step_url = menu[menu.index("summary")-1]
|
||||
next_step_url = "install"
|
||||
|
||||
print("previous step url: ", previous_step_url)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
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()
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
<p><b> Ready to install! Please review all changes.</b></p>
|
||||
|
||||
<p> This is the last chance to back out before committing to instal, please ensure all the details are correct. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
BIN
src/applets/users/locales/af/LC_MESSAGES/users.mo
Normal file
BIN
src/applets/users/locales/af/LC_MESSAGES/users.mo
Normal file
Binary file not shown.
65
src/applets/users/locales/af/LC_MESSAGES/users.po
Normal file
65
src/applets/users/locales/af/LC_MESSAGES/users.po
Normal file
@@ -0,0 +1,65 @@
|
||||
# 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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\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"
|
||||
62
src/applets/users/locales/users.pot
Normal file
62
src/applets/users/locales/users.pot
Normal file
@@ -0,0 +1,62 @@
|
||||
# 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 <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\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 ""
|
||||
@@ -25,7 +25,25 @@ def users_root():
|
||||
set_language(current_app.config['CONFIG']['settings']['language'])
|
||||
string_dict = build_stringlist()
|
||||
build_menu()
|
||||
return render_template('users.html', string_dict=string_dict)
|
||||
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 = ' <button class="button is-light"> <img width="16px;" src="/static/icons/emblem-default-symbolic.svg"> Setup root user </button>'
|
||||
ldap_button = ' <button class="button is-light"> <img width="16px;" src="/static/icons/emblem-default-symbolic.svg"> Connect LDAP </button>'
|
||||
ad_button = ' <button class="button is-light"> <img width="16px;" src="/static/icons/emblem-default-symbolic.svg"> Connect AD </button>'
|
||||
csv_button = ' <button class="button is-light"> <img width="16px;" src="/static/icons/emblem-default-symbolic.svg"> Import CSV </button>'
|
||||
bottom_menu = root_button + ldap_button + ad_button + csv_button
|
||||
|
||||
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)
|
||||
|
||||
|
||||
def build_stringlist():
|
||||
@@ -47,6 +65,7 @@ def build_stringlist():
|
||||
string_dict['password_tooshort'] = _("This password is too short")
|
||||
return string_dict
|
||||
|
||||
|
||||
def build_menu():
|
||||
"""
|
||||
Define menu items and paths.
|
||||
@@ -54,3 +73,4 @@ def build_menu():
|
||||
current_app.config['CONFIG']['settings']['menu']['users'] = (build_stringlist()['menu_item'], "/users", 20)
|
||||
print(current_app.config['CONFIG']['settings']['menu'])
|
||||
|
||||
build_menu()
|
||||
|
||||
@@ -37,7 +37,29 @@ def welcome_index():
|
||||
blkid = lsblk.list_scsi_devices()
|
||||
string_dict = build_stringlist()
|
||||
build_menu()
|
||||
return render_template('welcome.html', string_dict=string_dict, selected_lang=lang)
|
||||
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 = '<button class="button is-dark"> <img width="16px;" src="/static/icons/greencheck.png"> Power: AC </button>'
|
||||
internet_button = ' <button class="button is-dark"> <img width="16px;" src="/static/icons/greencheck.png"> 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(),
|
||||
previous_step=previous_step_url,
|
||||
next_step=next_step_url,
|
||||
bottom_menu=bottom_menu)
|
||||
|
||||
|
||||
def build_stringlist():
|
||||
@@ -64,8 +86,11 @@ def build_menu():
|
||||
"""
|
||||
Define menu items and paths.
|
||||
"""
|
||||
print(current_app.config['CONFIG']['settings']['menu'])
|
||||
print(build_stringlist()['menu_item'])
|
||||
current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10)
|
||||
|
||||
set_language(current_app.config['CONFIG']['settings']['language'])
|
||||
build_menu
|
||||
|
||||
#for app in current_app.config['CONFIG']['settings']['apps'].split():
|
||||
#print(app)
|
||||
#current_app.config['CONFIG']['settings']['menu'][app] = (globals[app].build_stringlist()['menu_item'], "/" + app, 10)
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
<img style="width: 100%; border-radius: 8px;" src="/static/applets/welcome/img/banner.png" alt="Debian Image banner" />
|
||||
|
||||
<p><b> {{ string_dict['welcome_text'] }} </b></p>
|
||||
<p>{{ string_dict['confirm_text'] }} </p>
|
||||
<p>{{ string_dict['confirm_text'] }} </p> <br />
|
||||
|
||||
<div style="padding-left: 15px;">
|
||||
|
||||
<form action="/welcome" method="POST">
|
||||
<img src="/static/icons/keyboard.svg" /> {{ string_dict['language_text'] }}
|
||||
@@ -43,10 +45,10 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user