Archivstatus hervorgehoben Archivstatus aufhebbar für Admin Favicon eingefügt
45 lines
1.0 KiB
Python
45 lines
1.0 KiB
Python
# Zeiterfassung
|
|
|
|
from web_ui import *
|
|
from admin import *
|
|
from login import *
|
|
from users import *
|
|
from touchscreen import *
|
|
from definitions import *
|
|
from api import *
|
|
from homepage import *
|
|
|
|
import json
|
|
|
|
def main():
|
|
|
|
# Einstellungen einlesen
|
|
with open(f"{scriptpath}/settings.json") as json_file:
|
|
data = json.load(json_file)
|
|
|
|
port = int(data["port"])
|
|
secret = data["secret"]
|
|
|
|
homepage()
|
|
|
|
def startup_message():
|
|
|
|
message_string = f"{app_title} {app_version}"
|
|
underline = ""
|
|
for i in range(len(message_string)):
|
|
underline += "-"
|
|
print(message_string)
|
|
print(underline)
|
|
|
|
url_string = ""
|
|
for i in list(app.urls):
|
|
url_string += f"{i}, "
|
|
url_string = url_string[0:-2]
|
|
print("Weboberfläche erreichbar unter: " + url_string)
|
|
|
|
app.on_startup(startup_message)
|
|
ui.run(favicon="favicon.svg", port=port, storage_secret=secret, language='de-DE', show_welcome_message=False)
|
|
|
|
if __name__ in ("__main__", "__mp_main__"):
|
|
main()
|