added first

This commit is contained in:
janis
2022-10-24 17:36:57 +02:00
parent 16995f6693
commit c0054df4f7
18 changed files with 155 additions and 14 deletions

View File

@@ -27,6 +27,7 @@ import math
import bin.autocomplete
returnOk = False
pl = bin.player.Player()
pa = bin.filepathanalysis.PathAnalysis()
cvr = bin.csv_parsers.CsvRead()
@@ -59,13 +60,15 @@ class invalidpathPU(Popup):
class LeavePU(Popup):
def check_pwd(self):
if self.ids.passw.text == config["Security"]["pwd"]:
self.manager.current = "Main"
self.manager.transition.direction = "right"
returnOk = true
self.dismiss()
else:
time.sleep(2)
self.ids.output.text = "Password wrong, please try again!"
def returnToFullscreen(self):
Window.fullscreen = True
###########
# SCREENS
@@ -278,6 +281,8 @@ class Main(MDScreen):
if self.manager.current == "Showcase":
if config["Security"]["pwdFSExit"] == "True":
self.open_leave_popup()
if returnOk:
Window.fullscreen = False
else:
self.manager.current = "Main"
self.manager.transition.direction = "right"
@@ -291,9 +296,22 @@ class Main(MDScreen):
class ShowcaseS(MDScreen):
def leave_screen(self):
if config["Security"]["pwdFSExit"] == "True":
self.disablefullscreen()
LeavePU().open()
if returnOk:
self.disablefullscreen()
else:
self.manager.current = "Main"
self.manager.transition.direction = "right"
def disablefullscreen(self):
Window.fullscreen = False
def reset(self):
returnOk = False
class RootScreen(ScreenManager):
pass