From 0b307ce12b1a3a1d5847a3c259fc4d2fe61eff4b Mon Sep 17 00:00:00 2001 From: Charlie Powell <31997505+cp2004@users.noreply.github.com> Date: Wed, 14 Apr 2021 22:12:25 +0100 Subject: [PATCH] :lipstick: Add about dialog --- octoprint_wled/__init__.py | 7 ++ .../templates/settings/about.jinja2 | 64 +++++++++++++++++++ octoprint_wled/templates/wled_settings.jinja2 | 5 ++ 3 files changed, 76 insertions(+) create mode 100644 octoprint_wled/templates/settings/about.jinja2 diff --git a/octoprint_wled/__init__.py b/octoprint_wled/__init__.py index 73ca164..2237aeb 100644 --- a/octoprint_wled/__init__.py +++ b/octoprint_wled/__init__.py @@ -21,6 +21,7 @@ class WLEDPlugin( wled: Optional[WLED] api: Optional[api.PluginAPI] events: Optional[events.PluginEventHandler] + progress: Optional[progress.PluginProgressHandler] lights_on: bool = True def initialize(self) -> None: @@ -155,6 +156,12 @@ def get_assets(self) -> Dict[str, List[str]]: "css": ["dist/wled.css"], } + # TemplatePlugin + def get_template_vars(self): + return { + "version": self._plugin_version, + } + # Software Update hook def get_update_information(self) -> dict: return { diff --git a/octoprint_wled/templates/settings/about.jinja2 b/octoprint_wled/templates/settings/about.jinja2 new file mode 100644 index 0000000..d8d8805 --- /dev/null +++ b/octoprint_wled/templates/settings/about.jinja2 @@ -0,0 +1,64 @@ +
Version {{ plugin_wled_version }} - Release notes
+ +Some useful links for you:
+A great way to say thanks, and encourage more great features. Sponsor what you want, one time or monthly!