summaryrefslogtreecommitdiff
path: root/plugin_loader/static/plugin_page.js
diff options
context:
space:
mode:
authormarios <marios8543@gmail.com>2022-04-18 15:57:51 +0300
committerGitHub <noreply@github.com>2022-04-18 15:57:51 +0300
commitfa776f0d0b7b4ca7071f0aa912be84e81caf6b61 (patch)
tree535f6f0bb71ab97f17a0ef21eb8f0491ae4ca87d /plugin_loader/static/plugin_page.js
parent4576fed01baac066a8550018a0922739cc2f8985 (diff)
downloaddecky-loader-1.2.0.tar.gz
decky-loader-1.2.0.zip
Callsigns (#37)v1.2.0
* 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 <werwolv98@gmail.com>
Diffstat (limited to 'plugin_loader/static/plugin_page.js')
-rw-r--r--plugin_loader/static/plugin_page.js32
1 files changed, 20 insertions, 12 deletions
diff --git a/plugin_loader/static/plugin_page.js b/plugin_loader/static/plugin_page.js
index 62c24bfe..0531f04e 100644
--- a/plugin_loader/static/plugin_page.js
+++ b/plugin_loader/static/plugin_page.js
@@ -19,20 +19,28 @@ function installPlugin(request_id) {
function addPluginInstallPrompt(artifact, version, request_id) {
let text = `
- <div id="plugin_install_prompt_${request_id}" style="display: block; background: #304375; border-radius: 5px;">
- <h3 style="padding-left: 1rem;">Install plugin</h3>
- <ul style="padding-left: 10px; padding-right: 10px; padding-bottom: 20px; margin: 0;">
- <li>${artifact}</li>
- <li>${version}</li>
- </ul>
- <div style="text-align: center; padding-bottom: 10px;">
- <button onclick="installPlugin('${request_id}')" style="display: inline-block; background-color: green;">Install</button>
- <button onclick="document.getElementById('plugin_install_list').removeChild(document.getElementById('plugin_install_prompt_${request_id}'))"
- style="display: inline-block; background-color: red;">Ignore</button>
- </div>
+ <link rel="stylesheet" href="/static/styles.css">
+
+ <div id="plugin_install_prompt_${request_id}" style="background-color: #0c131b; display: block; border: 1px solid #22262f; box-shadow: 0px 0px 8px #202020; width: calc(100% - 50px); padding: 0px 10px 10px 10px;">
+ <h3>Install Plugin?</h3>
+ <p style="font-size: 12px;">
+ ${artifact}
+ Version: ${version}
+ </p>
+ <button type="button" tabindex="0" class="DialogButton _DialogLayout Secondary basicdialog_Button_1Ievp Focusable"
+ onclick="installPlugin('${request_id}')">
+ Install
+ </button>
+ <p style="margin: 2px;"></p>
+ <button type="button" tabindex="0" class="DialogButton _DialogLayout Secondary basicdialog_Button_1Ievp Focusable"
+ onclick="document.getElementById('plugin_install_list').removeChild(document.getElementById('plugin_install_prompt_${request_id}'))">
+ Cancel
+ </button>
</div>
`;
- document.getElementById('plugin_install_list').innerHTML += text;
+ document.getElementById('plugin_install_list').innerHTML = text;
+
+ execute_in_tab('SP', false, 'FocusNavController.DispatchVirtualButtonClick(28)')
}
(function () {