From 0d0e57e35aebdc847fbefe1d791f72cc0979fa5a Mon Sep 17 00:00:00 2001 From: tza Date: Tue, 10 May 2022 20:31:39 +0300 Subject: Added store button --- plugin_loader/static/plugin_page.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'plugin_loader/static/plugin_page.js') diff --git a/plugin_loader/static/plugin_page.js b/plugin_loader/static/plugin_page.js index 0531f04e..d571cfe3 100644 --- a/plugin_loader/static/plugin_page.js +++ b/plugin_loader/static/plugin_page.js @@ -53,8 +53,22 @@ function addPluginInstallPrompt(artifact, version, request_id) { `; + const SHOP_ICON = ` + + ` + function createTitle(text) { - return `
${text}
`; + return ` +
${text}${SHOP_ICON}
+ `; } function createPluginList() { @@ -79,7 +93,15 @@ function addPluginInstallPrompt(artifact, version, request_id) { inject(); document.getElementById("plugin_title").onclick = function() { reloadIframe(); - document.getElementById("plugin_title").innerText = "Plugins"; + document.getElementById("plugin_title").innerHTML = `Plugins ${SHOP_ICON}`; + } + document.getElementById("open_shop_button").onclick = function(ev) { + ev.stopPropagation(); + console.debug(JSON.stringify({ + "id": 1, + "method": "open_plugin_store", + "args": {} + })); } window.onmessage = function(ev) { let title = ev.data; -- cgit v1.2.3