re-add yasi-applets

This commit is contained in:
Jonathan Carter
2025-08-23 22:33:58 +02:00
parent 69d6ba277d
commit 652bbba9c0
62 changed files with 1852 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
from yasi_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']) + "<br>" + 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()