From b02b30656cc66e58484038b385ee5f48af00b4e2 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 31 Jan 2020 20:29:47 +0100 Subject: [PATCH] Using /#[plugin.name] as a URL hint for selecting a tab on load. Closes #83 --- platypush/backend/http/static/js/application.js | 5 +++++ platypush/backend/http/templates/plugins/media/index.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/platypush/backend/http/static/js/application.js b/platypush/backend/http/static/js/application.js index 76b231d2..ac2bf620 100644 --- a/platypush/backend/http/static/js/application.js +++ b/platypush/backend/http/static/js/application.js @@ -24,6 +24,11 @@ window.vm = new Vue({ }, created: function() { + m = window.location.href.match('/#([a-zA-Z0-9._]+)$'); + if (m) { + this.selectedPlugin = m[1]; + } + const self = this; setInterval(() => { self.now = new Date(); diff --git a/platypush/backend/http/templates/plugins/media/index.html b/platypush/backend/http/templates/plugins/media/index.html index a88eedd7..61889906 100644 --- a/platypush/backend/http/templates/plugins/media/index.html +++ b/platypush/backend/http/templates/plugins/media/index.html @@ -14,7 +14,7 @@ {% endif %} {% endfor %} -