From 60e39d2d23805d1293894d2994aa96bc48955a5b Mon Sep 17 00:00:00 2001 From: tza Date: Wed, 6 Apr 2022 13:06:21 +0300 Subject: [PATCH] updated to reflect changes in the loader --- plugin_template.py => main.py | 9 +++++---- main_view.html | 11 +++++++++++ tile_view.html | 0 3 files changed, 16 insertions(+), 4 deletions(-) rename plugin_template.py => main.py (68%) create mode 100644 main_view.html create mode 100644 tile_view.html diff --git a/plugin_template.py b/main.py similarity index 68% rename from plugin_template.py rename to main.py index 2c64ecb..dfff8e9 100644 --- a/plugin_template.py +++ b/main.py @@ -7,11 +7,12 @@ class Plugin: # If the plugin should be reloaded from a call to /plugins/reload or a file change hot_reload = False - # The HTML that will be loaded when selecting the plugin in the list - main_view_html = "

Hello World

" + # The HTML file that will be loaded when selecting the plugin in the list + main_view_html = "main_view.html" - # The HTML that will be used to display a widget in the plugin main page - tile_view_html = "" + # The HTML file that will be used to display a widget in the plugin main page + # Comment this out if you don't plan to use a tile view. This will make a button with your plugin name appear + tile_view_html = "tile_view.html" # A normal method. It can be called from JavaScript using call_plugin_function("method_1", argument1, argument2) async def method_1(self, *args): diff --git a/main_view.html b/main_view.html new file mode 100644 index 0000000..b3a11a8 --- /dev/null +++ b/main_view.html @@ -0,0 +1,11 @@ + + + + + + + + +

Hello World

+ + \ No newline at end of file diff --git a/tile_view.html b/tile_view.html new file mode 100644 index 0000000..e69de29