From bbcb04d89ae2e1b61a8b7615c3a07db55343d8f1 Mon Sep 17 00:00:00 2001 From: pdmarf <135653545+pdmarf@users.noreply.github.com> Date: Fri, 10 Apr 2026 19:55:16 +0100 Subject: [PATCH] Show version number in property inspector --- com.pdma.notion-timer.sdPlugin/bin/plugin.js | 8 ++++---- .../ui/property-inspector.html | 10 ++++++++++ src/plugin.ts | 8 ++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/com.pdma.notion-timer.sdPlugin/bin/plugin.js b/com.pdma.notion-timer.sdPlugin/bin/plugin.js index ba172fa..278cdbf 100644 --- a/com.pdma.notion-timer.sdPlugin/bin/plugin.js +++ b/com.pdma.notion-timer.sdPlugin/bin/plugin.js @@ -6433,7 +6433,7 @@ async function stopTimer(token, entryId) { } // src/plugin.ts -var CURRENT_VERSION = "1.0.1"; +var CURRENT_VERSION = "1.0.2"; var GITEA_BASE = "http://100.120.125.113:3000/pdm/stream_deck_notion_timer/raw/branch/master"; async function checkForUpdates() { try { @@ -6481,14 +6481,14 @@ var TimerToggle = class extends SingletonAction { try { const global = await getGlobal(); if (!isConfigured(global)) { - await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: [], error: "Configure Notion credentials in plugin settings first." }); + await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: [], error: "Configure Notion credentials in plugin settings first.", version: CURRENT_VERSION }); return; } const projects = await fetchProjects(global.notionToken, global.projectsDbId); - await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: projects }); + await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: projects, version: CURRENT_VERSION }); } catch (err) { plugin_default.logger.error("Failed to fetch projects:", err); - await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: [], error: String(err) }); + await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: [], error: String(err), version: CURRENT_VERSION }); } } async onKeyDown(ev) { diff --git a/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html b/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html index 8c48b05..e54c729 100644 --- a/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html +++ b/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html @@ -72,6 +72,12 @@ } #statusText.running { color: #4caf50; } #statusText.error { color: #e57373; } + #versionText { + font-size: 10px; + color: #444; + text-align: center; + padding-top: 8px; + } #credStatus { font-size: 11px; color: #888; @@ -116,6 +122,7 @@
+ @@ -243,6 +250,9 @@ $PI.onSendToPropertyInspector(ACTION_UUID, function(jsn) { var payload = jsn.payload; if (payload.event === "projects") { + if (payload.version) { + document.getElementById("versionText").textContent = "v" + payload.version; + } if (payload.error) { setStatus(payload.error, "error"); } else { diff --git a/src/plugin.ts b/src/plugin.ts index a798dc0..a7cd68b 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,4 +1,4 @@ -const CURRENT_VERSION = "1.0.1"; +const CURRENT_VERSION = "1.0.2"; const GITEA_BASE = "http://100.120.125.113:3000/pdm/stream_deck_notion_timer/raw/branch/master"; async function checkForUpdates(): Promise