mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 00:37:49 +00:00
Added store button
This commit is contained in:
@@ -53,8 +53,22 @@ function addPluginInstallPrompt(artifact, version, request_id) {
|
||||
</svg>
|
||||
`;
|
||||
|
||||
const SHOP_ICON = `
|
||||
<button
|
||||
class="DialogButton _DialogLayout Secondary basicdialog_Button_1Ievp Focusable"
|
||||
style="width: auto; padding-left: 10px; padding-right: 10px; margin-right: 1rem; margin-left: auto; padding-top: 3px;"
|
||||
id="open_shop_button"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-bag-fill" viewBox="0 0 16 16">
|
||||
<path d="M8 1a2.5 2.5 0 0 1 2.5 2.5V4h-5v-.5A2.5 2.5 0 0 1 8 1zm3.5 3v-.5a3.5 3.5 0 1 0-7 0V4H1v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4h-3.5z"/>
|
||||
</svg>
|
||||
</button>
|
||||
`
|
||||
|
||||
function createTitle(text) {
|
||||
return `<div id="plugin_title" class="quickaccessmenu_Title_34nl5">${text}</div>`;
|
||||
return `
|
||||
<div id="plugin_title" class="quickaccessmenu_Title_34nl5">${text}${SHOP_ICON}</div>
|
||||
`;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user