From 9409ba9689468c8b4ea9371b22eb2ba11354b847 Mon Sep 17 00:00:00 2001 From: David Czihak Date: Sat, 9 May 2026 14:26:55 +0200 Subject: Fix: Add inherit option to bool workspace options Instead of a checkbox, the boolean workspace options now show three radio buttons, adding the option to inherit the value from the global option --- Scripts/main.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Scripts/main.js') diff --git a/Scripts/main.js b/Scripts/main.js index 60fd4aa..3ff3fa2 100644 --- a/Scripts/main.js +++ b/Scripts/main.js @@ -88,14 +88,12 @@ function getConfigValue(key) { */ function getBooleanConfigValue(key, fallback) { const workspaceValue = nova.workspace.config.get(key); - if (typeof workspaceValue === "boolean") { - return workspaceValue; - } + if (workspaceValue === "enabled") return true; + if (workspaceValue === "disabled") return false; + if (typeof workspaceValue === "boolean") return workspaceValue; const globalValue = nova.config.get(key); - if (typeof globalValue === "boolean") { - return globalValue; - } + if (typeof globalValue === "boolean") return globalValue; return fallback; } -- cgit v1.3