Merge remote-tracking branch 'refs/remotes/origin/5.1.1' into 511

This commit is contained in:
2021-07-18 13:11:56 +10:00
2 changed files with 26 additions and 17 deletions

View File

@ -23,10 +23,10 @@ init python:
## The colors of text in the interface. ## The colors of text in the interface.
## An accent color used throughout the interface to label and highlight text. ## An accent color used throughout the interface to label and highlight text.
define gui.accent_color = '#FF00FC' define gui.accent_color = '#A2029F'
## The color used for a text button when it is neither selected nor hovered. ## The color used for a text button when it is neither selected nor hovered.
define gui.idle_color = '#FFFE00' define gui.idle_color = '#D5D507'
## The small color is used for small text, which needs to be brighter/darker to ## The small color is used for small text, which needs to be brighter/darker to
## achieve the same effect. ## achieve the same effect.

View File

@ -16,6 +16,9 @@ init python:
else: else:
persistent.updateresult = pendingVersion persistent.updateresult = pendingVersion
def ToggleAutoUpdate():
persistent.autoup = not persistent.autoup
################################################################################ ################################################################################
## Initialization ## Initialization
################################################################################ ################################################################################
@ -665,34 +668,40 @@ screen updates():
xoffset 80 xoffset 80
xmaximum 1100 xmaximum 1100
label "[config.name!t]" label "[config.name!t]"
text _("Version [config.version!t]\n") text _("Version [config.version!t]")
if updater.can_update(): if updater.can_update():
label _("{color=#00FF00}Update directory exists, updating is possible!{/color}") label _("{color=#00FF00}{size=32}Update directory exists, updating is possible!\n{/size}{/color}")
else: else:
label _("{color=#FF0000}Update directory does not exist or is corrupt!{/color}") label _("{color=#FF0000}{size=32}Update directory does not exist or is corrupt!\n{/size}{/color}")
textbutton _("Enable Automatic Updates") action [Notify("Toggling Automatic Updates..."), ToggleVariable("persistent.autoup", True, False)]
text _("Automatic Updates: [persistent.autoup!t]\n") label _("Auto Update:")
textbutton _("Check for Update!") action [Notify("Checking for update..."), Function(UpdateCheck)] label _("{color=#FFFFFF}{size=32}Automatic Updates: [persistent.autoup!t]{/size}{/color}")
label _("Update Check Result:\n") textbutton _("{size=36}Toggle Automatic Updates\n{/size}") action [Notify("Toggling Automatic Updates..."), Function(ToggleAutoUpdate)]
text _("[persistent.updateresult!t]\n")
if persistent.updateresult != "No new version is available": label _("Update Checker:")
textbutton _("Update Now!") action updater.Update(persistent.updateWebServer, force=False) label _("{color=#FFFFFF}{size=32}[persistent.updateresult!t]{/size}{/color}")
else: textbutton _("{size=36}Check for Update\n{/size}") action [Notify("Checking for update..."), Function(UpdateCheck)]
textbutton _("Update Now!") action Notify("Nothing to update to!")
label _("Update Server:\n") label _("Updater:")
label _("{color=#FFFFFF}{size=32}Server URL (click to edit):{/size}{/color}")
default input_on = False default input_on = False
button: button:
key_events True key_events True
if input_on: if input_on:
input: input:
default "[persistent.updateWebServer!t]" size 24 color '#FFFFFF' default "[persistent.updateWebServer!t]" size 36 color '#FFFFFF'
value FieldInputValue(persistent, 'updateWebServer') value FieldInputValue(persistent, 'updateWebServer')
length 49 length 49
copypaste True copypaste True
else: else:
text persistent.updateWebServer size 24 color '#FFFF00' text persistent.updateWebServer size 36 color '#FFFF00'
action ToggleScreenVariable('input_on') action ToggleScreenVariable('input_on')
style_prefix "quick" style_prefix "quick"
if persistent.updateresult != "No new version is available":
textbutton _("{size=36}Update Now!\n{/size}") action updater.Update(persistent.updateWebServer, force=False)
else:
textbutton _("{size=36}Update Now!\n{/size}") action Notify("Nothing to update to!")
use extrasnavigation use extrasnavigation
## Load and Save screens ####################################################### ## Load and Save screens #######################################################