Files
system-installer-daemon/src/applets/main/routes.py
Jonathan Carter 9f8f89fde2 More UI work
2025-08-16 14:22:13 +02:00

50 lines
1.1 KiB
Python

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 <br />"
"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')