From 361e122e2beaff942ee94fbb64024c41500f2073 Mon Sep 17 00:00:00 2001 From: Francesco Molitierno Date: Wed, 16 Dec 2020 00:31:41 +0100 Subject: [PATCH] impl https://github.com/Ansuel/tch-nginx-gui/issues/945 --- decompressed/gui_file/www/cards/001_modgui.lp | 2 +- decompressed/gui_file/www/docroot/modals/modgui-modal.lp | 2 +- decompressed/gui_file/www/gateway-snippets/header.lp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/decompressed/gui_file/www/cards/001_modgui.lp b/decompressed/gui_file/www/cards/001_modgui.lp index ef73104d6..1f9f65fec 100644 --- a/decompressed/gui_file/www/cards/001_modgui.lp +++ b/decompressed/gui_file/www/cards/001_modgui.lp @@ -48,7 +48,7 @@ ngx.print('\ '); local html = {} - html[#html + 1] = format(T"GUI Version %s", content.gui_version) + html[#html + 1] = format(T"GUI Version %s", content.gui_version:match("(.+)-"), content.gui_version) html[#html + 1] = '' html[#html + 1] = '
' html[#html + 1] = ''..content.outdated_ver_text..'' diff --git a/decompressed/gui_file/www/docroot/modals/modgui-modal.lp b/decompressed/gui_file/www/docroot/modals/modgui-modal.lp index 789ef3f49..386c532af 100644 --- a/decompressed/gui_file/www/docroot/modals/modgui-modal.lp +++ b/decompressed/gui_file/www/docroot/modals/modgui-modal.lp @@ -497,7 +497,7 @@ html[#html + 1] = ui_helper.createSwitch(T"GUI Auto Update", "update_autoupgrade html[#html + 1] = ui_helper.createInputText(T"Update Hours", "update_autoupgrade_hour", modgui_settings["update_autoupgrade_hour"],autoupgrade_mon_1) if content["outdated_ver"] == "1" then html[#html + 1] = ui_helper.createLabel(T"State", T"Update Found", basic) - html[#html + 1] = ui_helper.createLabel(T"New Version", content["new_ver"], basic) + html[#html + 1] = ui_helper.createLabel(T"New Version", format("%s", content["new_ver"], content["new_ver"]), basic) html[#html + 1] = ui_helper.createButton(T"Update GUI", T"Update", "icon-refresh", upgrade_gui) else html[#html + 1] = ui_helper.createLabel(T"State", T"No Update found", basic) diff --git a/decompressed/gui_file/www/gateway-snippets/header.lp b/decompressed/gui_file/www/gateway-snippets/header.lp index 689df2d19..d8d69a73c 100644 --- a/decompressed/gui_file/www/gateway-snippets/header.lp +++ b/decompressed/gui_file/www/gateway-snippets/header.lp @@ -206,7 +206,7 @@ ngx.print('\ if cui.outdated_ver == "0" then alert_style_upper.alert.class = "alert hide" end - html[#html + 1] = ui_helper.createAlertBlock(format(T'Update available! Version: %s',cui.new_ver),alert_style_upper) + html[#html + 1] = ui_helper.createAlertBlock(format(T'Update available! Version: %s',cui.new_ver,cui.new_ver),alert_style_upper) local autoupgrade_view = cui.autoupgrade_view if not ( autoupgrade_view == "none" ) and not ( autoupgrade_view == "" ) then