re-add yasi-applets
9
src/yasi_applets/main/__init__.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from flask import Blueprint
|
||||
|
||||
bp = Blueprint('main', __name__,
|
||||
template_folder='',
|
||||
static_folder='static',
|
||||
static_url_path='/main/static')
|
||||
|
||||
from yasi_applets.main import routes
|
||||
|
||||
18
src/yasi_applets/main/help.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="modal is-active">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-content">
|
||||
|
||||
<div style="background-color: #424242; padding: 15px; border-radius: 15px; boders: none; color: white;">
|
||||
<h1 class="is-size-4"> Help </h1>
|
||||
<br/><p class="title is-6"><span class="tag is-danger">The help system is not yet implemented.</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="columns">
|
||||
<a href="/welcome"><div class="column"><button class="button is-link">Continue</button></div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
17
src/yasi_applets/main/menu.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="modal is-active">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-content">
|
||||
|
||||
<div style="background-color: #424242; padding: 15px; border-radius: 15px; borders: none; color: white;">
|
||||
<h1 class="is-size-4"> Main menu </h1>
|
||||
|
||||
<br />
|
||||
<p> There's nothing yet to do here.</p>
|
||||
<br />
|
||||
|
||||
<div class="columns">
|
||||
<a href="/welcome"><div class="column"><button class="button is-link">Continue</button></div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
19
src/yasi_applets/main/quit.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="modal is-active">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-content">
|
||||
|
||||
<div style="background-color: #424242; padding: 15px; border-radius: 15px; boders: none; color: white;">
|
||||
<h1 class="is-size-4"> Exit system installer </h1>
|
||||
<br /><p class="title is-6"><span class="tag is-danger">Quitting is not yet implemented.</span>
|
||||
|
||||
<br />
|
||||
|
||||
<p> ALT+F4 will bring up a dialog that works though. </p>
|
||||
|
||||
<br />
|
||||
<div class="columns">
|
||||
<a href="/welcome"><div class="column"><button class="button is-link">Continue</button></div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
49
src/yasi_applets/main/routes.py
Normal file
@@ -0,0 +1,49 @@
|
||||
from yasi_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')
|
||||
1
src/yasi_applets/main/static/bulma.css
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/share/bulma/css/bulma.css
|
||||
1
src/yasi_applets/main/static/fork-awesome.css
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/share/fonts-fork-awesome/css/fork-awesome.css
|
||||
1
src/yasi_applets/main/static/htmx.min.js
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/share/javascript/htmx/htmx.min.js
|
||||
BIN
src/yasi_applets/main/static/icons/highvoltage.png
Normal file
|
After Width: | Height: | Size: 121 KiB |
BIN
src/yasi_applets/main/static/icons/keyboard.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
53
src/yasi_applets/main/static/icons/keyboard.svg
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
width="16"
|
||||
height="16"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
sodipodi:docname="keyboard.svg"
|
||||
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="namedview2"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="52.375"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:window-width="1236"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-x="662"
|
||||
inkscape:window-y="199"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" />
|
||||
<g
|
||||
font-weight="400"
|
||||
fill="#474747"
|
||||
id="g2"
|
||||
style="fill:#c0bfbc">
|
||||
<path
|
||||
d="M3.702 1C2.17 1 .984 2.32.984 3.844v8.344c0 1.524 1.185 2.843 2.718 2.843h8.58c1.532 0 2.75-1.32 2.75-2.844V3.845c0-1.525-1.218-2.844-2.75-2.844zm.782 1.031c3.526.256 5.317.134 7.047 0 .754-.058 1.532.616 1.532 1.438v7.375c0 .665-.532 1.095-1.188 1.187-2.836.397-4.753.44-7.673 0-.655-.099-1.187-.522-1.187-1.187V3.5c0-.822.714-1.524 1.469-1.469z"
|
||||
style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none;fill:#c0bfbc"
|
||||
color="#bebebe"
|
||||
font-family="Bitstream Vera Sans"
|
||||
overflow="visible"
|
||||
id="path1" />
|
||||
<path
|
||||
d="M10.564 5.977l-2.939.044.016 1 2.879-.043c.2.018.33.076.396.135.067.06.105.121.105.293l-.008.604H8.517l.037.002a1.457 1.457 0 00-1.164.43 1.558 1.558 0 00-.416 1.023c-.013.367.092.75.352 1.053.26.303.687.496 1.162.482h3.482l.051-3.59v-.004c0-.402-.16-.786-.435-1.035-.276-.249-.63-.364-.998-.393zM8.48 9.01h2.519l-.014.99H8.457c-.22.007-.302-.051-.371-.133a.553.553 0 01-.112-.367.587.587 0 01.141-.371c.079-.083.163-.134.363-.12zm2.862-5.985l-3 1 .316.95 3-1z"
|
||||
style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none;fill:#c0bfbc"
|
||||
color="#000"
|
||||
font-family="sans-serif"
|
||||
overflow="visible"
|
||||
id="path2" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
BIN
src/yasi_applets/main/static/icons/language.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
1
src/yasi_applets/main/static/icons/language.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M192 64C209.7 64 224 78.3 224 96L224 128L352 128C369.7 128 384 142.3 384 160C384 177.7 369.7 192 352 192L342.4 192L334 215.1C317.6 260.3 292.9 301.6 261.8 337.1C276 345.9 290.8 353.7 306.2 360.6L356.6 383L418.8 243C423.9 231.4 435.4 224 448 224C460.6 224 472.1 231.4 477.2 243L605.2 531C612.4 547.2 605.1 566.1 589 573.2C572.9 580.3 553.9 573.1 546.8 557L526.8 512L369.3 512L349.3 557C342.1 573.2 323.2 580.4 307.1 573.2C291 566 283.7 547.1 290.9 531L330.7 441.5L280.3 419.1C257.3 408.9 235.3 396.7 214.5 382.7C193.2 399.9 169.9 414.9 145 427.4L110.3 444.6C94.5 452.5 75.3 446.1 67.4 430.3C59.5 414.5 65.9 395.3 81.7 387.4L116.2 370.1C132.5 361.9 148 352.4 162.6 341.8C148.8 329.1 135.8 315.4 123.7 300.9L113.6 288.7C102.3 275.1 104.1 254.9 117.7 243.6C131.3 232.3 151.5 234.1 162.8 247.7L173 259.9C184.5 273.8 197.1 286.7 210.4 298.6C237.9 268.2 259.6 232.5 273.9 193.2L274.4 192L64.1 192C46.3 192 32 177.7 32 160C32 142.3 46.3 128 64 128L160 128L160 96C160 78.3 174.3 64 192 64zM448 334.8L397.7 448L498.3 448L448 334.8z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
8
src/yasi_applets/main/static/icons/tab-new-symbolic.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="#2e3436">
|
||||
<path d="m 3 0 c -1.644531 0 -3 1.355469 -3 3 v 10 c 0 1.644531 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355469 3 -3 v -10 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 10 c 0.570312 0 1 0.429688 1 1 v 10 c 0 0.570312 -0.429688 1 -1 1 h -10 c -0.570312 0 -1 -0.429688 -1 -1 v -10 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
|
||||
<path d="m 4 7 h 8 v 2 h -8 z m 0 0"/>
|
||||
<path d="m 9 4 v 8 h -2 v -8 z m 0 0"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 585 B |
BIN
src/yasi_applets/main/static/slide1.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
37
src/yasi_applets/main/static/system-installer-blippie.css
Normal file
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
}
|
||||
41
src/yasi_applets/main/static/system-installer-dark.css
Normal file
@@ -0,0 +1,41 @@
|
||||
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;
|
||||
}
|
||||
37
src/yasi_applets/main/static/system-installer-light.css
Normal file
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
}
|
||||
1
src/yasi_applets/main/static/system-installer.css
Symbolic link
@@ -0,0 +1 @@
|
||||
system-installer-dark.css
|
||||