From fa776f0d0b7b4ca7071f0aa912be84e81caf6b61 Mon Sep 17 00:00:00 2001 From: marios Date: Mon, 18 Apr 2022 15:57:51 +0300 Subject: Callsigns (#37) * Plugin callsigns, filechangehandler thread bug fix, plugin file perms - Plugins are now assigned a callsign (a random string), which they use for all internal identification, like resource fetching and method calls. This is to ensure that plugins only access their own resources and methods. - Made FileChangeHandler send off events to a queue, that is then consumed by the Loader, instead of calling import_plugin on its own, since that caused weird issues with the event loop and the thread watchdog is using. - Plugins are now owned by root and have read-only permissions. This is handled automatically. * Improved general look and feel of plugin tab * Make all plugin entries have the same padding between them * Make "No plugins installed" text look the same as "No new notifications" Co-authored-by: WerWolv --- plugin_loader/templates/plugin_view.html | 96 +++++++++++++++++--------------- 1 file changed, 51 insertions(+), 45 deletions(-) (limited to 'plugin_loader/templates/plugin_view.html') diff --git a/plugin_loader/templates/plugin_view.html b/plugin_loader/templates/plugin_view.html index 6016a7ae..9d7ba1bc 100644 --- a/plugin_loader/templates/plugin_view.html +++ b/plugin_loader/templates/plugin_view.html @@ -7,64 +7,70 @@ }); }, false); - function loadPlugin(name) { + function loadPlugin(callsign, name) { this.parent.postMessage("PLUGIN_LOADER__"+name, "https://steamloopback.host"); - location.href = `/plugins/load_main/${name}`; + location.href = `/plugins/load_main/${callsign}`; } {% if not plugins|length %} -
-
- No plugins installed :( +
+
+ No plugins installed +
-
{% endif %}
{% for plugin in plugins %} - {% if plugin.tile_view_html|length %} -
-
- - + {% if plugin.tile_view_html|length %} +
+
+ + +
-
{% else %} -
-
-
- +
+
+
+ +
-
{% endif %} - {% endfor %} + {% endfor %}
-- cgit v1.2.3