diff --git a/com.pdma.notion-timer.sdPlugin/bin/plugin.js b/com.pdma.notion-timer.sdPlugin/bin/plugin.js
index a77ea86..d9052d3 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.19";
+var CURRENT_VERSION = "1.0.20";
var GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/master";
var SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
@@ -6573,14 +6573,18 @@ var TimerToggle = class extends SingletonAction {
await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: [], error: "Enter your Notion API token above.", version: CURRENT_VERSION });
return;
}
- const [projects, usersResult] = await Promise.all([
+ let usersResult = [];
+ let usersError;
+ const [projects] = await Promise.all([
fetchProjects(global.notionToken, global.projectsDbId),
- fetchUsers(global.notionToken).catch((err) => {
+ fetchUsers(global.notionToken).then((u) => {
+ usersResult = u;
+ }).catch((err) => {
plugin_default.logger.error("Failed to fetch users:", err);
- return [];
+ usersError = err instanceof Error ? err.message : String(err);
})
]);
- await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: projects, users: usersResult, version: CURRENT_VERSION });
+ await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: projects, users: usersResult, usersError, 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), version: CURRENT_VERSION });
diff --git a/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig b/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig
index 7773024..ec2ed0d 100644
Binary files a/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig and b/com.pdma.notion-timer.sdPlugin/bin/plugin.js.sig differ
diff --git a/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html b/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html
index 4dffcb6..639a739 100644
--- a/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html
+++ b/com.pdma.notion-timer.sdPlugin/ui/property-inspector.html
@@ -127,6 +127,7 @@
+
Shared across all buttons. Select once per device.
@@ -304,9 +305,17 @@
if (payload.version) {
document.getElementById("versionText").textContent = "v" + payload.version;
}
- if (payload.users) {
+ if (payload.users !== undefined) {
var savedUserId = document.getElementById("userId").value;
populateUsers(payload.users, savedUserId);
+ var userErr = document.getElementById("userError");
+ if (payload.usersError) {
+ userErr.textContent = "Could not load names: " + payload.usersError;
+ } else if (payload.users.length === 0) {
+ userErr.textContent = "No users found — check the integration has \u201cRead user information\u201d enabled.";
+ } else {
+ userErr.textContent = "";
+ }
}
if (payload.error) {
setStatus(payload.error, "error");
diff --git a/notion-timer.streamDeckPlugin b/notion-timer.streamDeckPlugin
index fd3bf06..0d08405 100644
Binary files a/notion-timer.streamDeckPlugin and b/notion-timer.streamDeckPlugin differ
diff --git a/package.json b/package.json
index bec2286..a4edeaa 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"description": "Notion time tracking toggle for Stream Deck",
"scripts": {
"build": "esbuild src/plugin.ts --bundle --platform=node --target=node20 --outfile=com.pdma.notion-timer.sdPlugin/bin/plugin.js --external:electron && node scripts/sign.js",
- "package": "npm run build && zip -r notion-timer.streamDeckPlugin com.pdma.notion-timer.sdPlugin && echo 'Packaged: notion-timer.streamDeckPlugin'",
+ "package": "npm run build && rm -f notion-timer.streamDeckPlugin && zip -r notion-timer.streamDeckPlugin com.pdma.notion-timer.sdPlugin && echo 'Packaged: notion-timer.streamDeckPlugin'",
"dev": "esbuild src/plugin.ts --bundle --platform=node --target=node20 --outfile=com.pdma.notion-timer.sdPlugin/bin/plugin.js --external:electron --watch",
"sign": "node scripts/sign.js",
"link": "ln -sf \"$(pwd)/com.pdma.notion-timer.sdPlugin\" \"$HOME/Library/Application Support/com.elgato.StreamDeck/Plugins/com.pdma.notion-timer.sdPlugin\"",
diff --git a/src/plugin.ts b/src/plugin.ts
index 15481e0..4f86c3e 100644
--- a/src/plugin.ts
+++ b/src/plugin.ts
@@ -1,4 +1,4 @@
-const CURRENT_VERSION = "1.0.19";
+const CURRENT_VERSION = "1.0.20";
const GITEA_BASE = "https://gitea.pdmarf.co.uk/pdm/stream_deck_notion_timer/raw/branch/master";
const SIGNING_PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAN7ko8TUpuPzPAJuKAZCRjV0c4ZSlou5d9pUAF6o12b4=
@@ -176,14 +176,16 @@ class TimerToggle extends SingletonAction {
await streamDeck.ui.sendToPropertyInspector({ event: "projects", data: [], error: "Enter your Notion API token above.", version: CURRENT_VERSION });
return;
}
- const [projects, usersResult] = await Promise.all([
+ let usersResult: Awaited> = [];
+ let usersError: string | undefined;
+ const [projects] = await Promise.all([
fetchProjects(global.notionToken, global.projectsDbId),
- fetchUsers(global.notionToken).catch((err) => {
+ fetchUsers(global.notionToken).then((u) => { usersResult = u; }).catch((err) => {
streamDeck.logger.error("Failed to fetch users:", err);
- return [];
+ usersError = err instanceof Error ? err.message : String(err);
}),
]);
- await streamDeck.ui.sendToPropertyInspector({ event: "projects", data: projects, users: usersResult, version: CURRENT_VERSION });
+ await streamDeck.ui.sendToPropertyInspector({ event: "projects", data: projects, users: usersResult, usersError, version: CURRENT_VERSION });
} catch (err) {
streamDeck.logger.error("Failed to fetch projects:", err);
await streamDeck.ui.sendToPropertyInspector({ event: "projects", data: [], error: String(err), version: CURRENT_VERSION });
diff --git a/version.json b/version.json
index bac3891..a04ad19 100644
--- a/version.json
+++ b/version.json
@@ -1 +1 @@
-{ "version": "1.0.19" }
+{ "version": "1.0.20" }