From 390d995f53408b049389b72acddf5a0a7181ef8c Mon Sep 17 00:00:00 2001 From: Zedifus Date: Fri, 5 Aug 2022 02:56:26 +0100 Subject: [PATCH] Add flashing frontend notification Co-authored-by: andrew.charles.mcmanus@gmail.com --- app/classes/web/panel_handler.py | 2 +- app/classes/web/server_handler.py | 1 + app/frontend/templates/footer.html | 27 +++++++++++++++++++++------ 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/app/classes/web/panel_handler.py b/app/classes/web/panel_handler.py index d592f627..b5a07eb3 100644 --- a/app/classes/web/panel_handler.py +++ b/app/classes/web/panel_handler.py @@ -284,7 +284,7 @@ class PanelHandler(BaseHandler): page_data: t.Dict[str, t.Any] = { # todo: make this actually pull and compare version data - "update_available": False, + "update_available": self.helper.update_available, "serverTZ": tz, "version_data": self.helper.get_version_string(), "user_data": exec_user, diff --git a/app/classes/web/server_handler.py b/app/classes/web/server_handler.py index d7bd054d..df4ba684 100644 --- a/app/classes/web/server_handler.py +++ b/app/classes/web/server_handler.py @@ -92,6 +92,7 @@ class ServerHandler(BaseHandler): template = "public/404.html" page_data = { + "update_available": self.helper.update_available, "version_data": self.helper.get_version_string(), "user_data": exec_user, "user_role": exec_user_role, diff --git a/app/frontend/templates/footer.html b/app/frontend/templates/footer.html index fec76eba..98d10a57 100644 --- a/app/frontend/templates/footer.html +++ b/app/frontend/templates/footer.html @@ -1,12 +1,27 @@
- -{{ translate('footer', 'copyright', data['lang']) }} © 2021 - Crafty Controller. {{ translate('footer', 'allRightsReserved', data['lang']) }}. - -{{ translate('footer', 'version', data['lang']) }}: {{ data['version_data'] }} - + {{ translate('footer', 'copyright', data['lang']) }} © 2021 - Crafty Controller. {{ translate('footer', 'allRightsReserved', data['lang']) }}. +   {{ translate('footer', 'version', data['lang']) }}: {{ data['version_data'] }} + {% if data['update_available'] %} + Update Available! + {% end %}
- +