From ca90cbac2a29c2dded3d39412a26d16415f85dc0 Mon Sep 17 00:00:00 2001 From: Ingan121 Date: Tue, 26 Aug 2025 20:17:48 +0900 Subject: [PATCH] * Don't show the reload button when editing profiles of another site * Fix typo in the codebase --- panel/panel.js | 6 ++++-- util.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/panel/panel.js b/panel/panel.js index f8f8f39..41c6b55 100644 --- a/panel/panel.js +++ b/panel/panel.js @@ -447,9 +447,11 @@ async function applyConfig() { // If Vineless is globally disabled, per-site enabled config is completely ignored // Enable both global and per-site when switching the per-site one to enabled, if global was disabled if (scope === "global" || (config.enabled && !await SettingsManager.getGlobalEnabled())) { - await SettingsManager.setGlobalEnalbed(config.enabled); + await SettingsManager.setGlobalEnabled(config.enabled); + } + if (!siteScopeLabel.dataset.hostOverride) { + reloadButton.classList.remove('hidden'); } - reloadButton.classList.remove('hidden'); updateIcon(); } diff --git a/util.js b/util.js index 0d9d385..62c49a7 100644 --- a/util.js +++ b/util.js @@ -408,7 +408,7 @@ export class SettingsManager { return config.enabled; } - static async setGlobalEnalbed(enabled) { + static async setGlobalEnabled(enabled) { const config = await SettingsManager.getProfile("global"); config.enabled = enabled; setIcon(`images/icon${enabled ? '' : '-disabled'}.png`);