diff --git a/com.pdma.notion-timer.sdPlugin/bin/plugin.js b/com.pdma.notion-timer.sdPlugin/bin/plugin.js index 1cb3255..2c24e22 100644 --- a/com.pdma.notion-timer.sdPlugin/bin/plugin.js +++ b/com.pdma.notion-timer.sdPlugin/bin/plugin.js @@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) { } // src/plugin.ts -var CURRENT_VERSION = "1.0.28"; +var CURRENT_VERSION = "1.0.29"; var GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild"; var SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4= diff --git a/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig b/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig index c594fd6..8af79b6 100644 --- a/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig +++ b/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig @@ -1,2 +1 @@ -$q Pܯ -NFw|}c("*ur_6JL`(A \ No newline at end of file +JﳋU(ą8MJvHXJOzCC/6 \ No newline at end of file diff --git a/com.pdma.notion-timer.sdPlugin/manifest.json b/com.pdma.notion-timer.sdPlugin/manifest.json index 9676b64..e251193 100644 --- a/com.pdma.notion-timer.sdPlugin/manifest.json +++ b/com.pdma.notion-timer.sdPlugin/manifest.json @@ -2,7 +2,7 @@ "Author": "Pete Marfleet", "Description": "Toggle Notion time tracking for a project with a single button press.", "Name": "Notion Timer", - "Version": "1.0.28", + "Version": "1.0.29", "SDKVersion": 2, "Software": { "MinimumVersion": "5.0" }, "OS": [{ "Platform": "mac", "MinimumVersion": "10.11" }], diff --git a/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html b/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html index 3ce944c..1e28e8f 100644 --- a/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html +++ b/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html @@ -162,6 +162,7 @@ var credSaveTimer = null; var credConfigured = false; var globalUserId = ""; + var cachedUsers = []; function setStatus(msg, cls) { var el = document.getElementById("statusText"); @@ -201,15 +202,15 @@ } } - function populateUsers(users, savedUserId) { + function populateUsers(users, userId) { + cachedUsers = users; var sel = document.getElementById("userId"); - var current = savedUserId || sel.value; sel.innerHTML = ''; users.forEach(function(u) { var opt = document.createElement("option"); opt.value = u.id; opt.textContent = u.name; - if (u.id === current) opt.selected = true; + if (u.id === userId) opt.selected = true; sel.appendChild(opt); }); } @@ -266,11 +267,9 @@ var s = jsn.payload.settings || {}; document.getElementById("notionToken").value = s.notionToken || ""; globalUserId = s.userId || ""; - if (globalUserId) { - var sel = document.getElementById("userId"); - if (sel.querySelector('option[value="' + globalUserId + '"]')) { - sel.value = globalUserId; - } + if (globalUserId && cachedUsers.length > 0) { + // Users already loaded — re-populate with correct selection + populateUsers(cachedUsers, globalUserId); } credConfigured = !!(s.notionToken && s.userId); diff --git a/notion-timer.streamDeckPlugin b/notion-timer.streamDeckPlugin index 88049f7..abcf72f 100644 Binary files a/notion-timer.streamDeckPlugin and b/notion-timer.streamDeckPlugin differ diff --git a/src/plugin.ts b/src/plugin.ts index 2ed1f7b..2a77f8c 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,4 +1,4 @@ -const CURRENT_VERSION = "1.0.28"; +const CURRENT_VERSION = "1.0.29"; const GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/stable-rebuild"; const SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4= diff --git a/version.json b/version.json index 78b5920..97dc089 100644 --- a/version.json +++ b/version.json @@ -1 +1 @@ -{ "version": "1.0.28" } +{ "version": "1.0.29" }