v1.0.20: fix button icons and surface user-fetch errors

- Remove stale idle.svg/running.svg from zip (were shadowing the PNG
  icons added in v1.0.15, causing old grey icons to show instead of
  the Aurora timer images)
- Fix package script to always delete and recreate zip so removed files
  don't persist across builds
- Show a clear error in the name dropdown when fetchUsers fails (e.g.
  Notion integration missing "Read user information" capability)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
pdmarf
2026-04-23 20:39:51 +01:00
parent 3632300d08
commit 3df4468605
7 changed files with 28 additions and 13 deletions

View File

@@ -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<TimerSettings> {
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<ReturnType<typeof fetchUsers>> = [];
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 });