v1.0.51: stop chasing auto-refresh, tell the user to confirm manually instead
v1.0.49's panel-polling approach and v1.0.50's diagnostic logging did not produce a working auto-refresh in testing -- the panel still hung after the restarting message until a different button was clicked. Rather than keep guessing at Stream Deck's PI-reconnect lifecycle, removed the polling/debug scaffolding entirely and changed the final status message to explicitly instruct the user: 'Updated to vX. Click any other button above to confirm version update has been successful.'
This commit is contained in:
@@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) {
|
||||
}
|
||||
|
||||
// src/plugin.ts
|
||||
var CURRENT_VERSION = "1.0.50";
|
||||
var CURRENT_VERSION = "1.0.51";
|
||||
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=
|
||||
@@ -6512,7 +6512,7 @@ async function checkForUpdates(sendStatus) {
|
||||
}
|
||||
fs3.writeFileSync(__filename, newCode);
|
||||
plugin_default.logger.info(`Updated to ${version}, restarting\u2026`);
|
||||
await sendStatus?.(`Updated to v${version} \u2014 restarting\u2026`);
|
||||
await sendStatus?.(`Updated to v${version}. Click any other button above to confirm version update has been successful.`);
|
||||
await new Promise((resolve) => setTimeout(resolve, 200));
|
||||
process.exit(0);
|
||||
} catch (err) {
|
||||
@@ -6543,12 +6543,10 @@ function setRunningEntry(entryId, actionId) {
|
||||
plugin_default.settings.getGlobalSettings().then((stored) => plugin_default.settings.setGlobalSettings({ ...stored, runningEntryId: entryId, runningActionId: actionId })).catch((err) => plugin_default.logger.error("Failed to persist running state:", err));
|
||||
}
|
||||
async function sendProjectsToPI(tokenOverride) {
|
||||
plugin_default.logger.info(`[diag] sendProjectsToPI called, version=${CURRENT_VERSION}, hasToken=${!!tokenOverride}`);
|
||||
try {
|
||||
const global = await getGlobal();
|
||||
const token = tokenOverride ?? global.notionToken;
|
||||
if (!token) {
|
||||
plugin_default.logger.info("[diag] sendProjectsToPI: no token, sending error payload");
|
||||
await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: [], error: "Enter your Notion API token above.", version: CURRENT_VERSION });
|
||||
return;
|
||||
}
|
||||
@@ -6560,7 +6558,6 @@ async function sendProjectsToPI(tokenOverride) {
|
||||
})
|
||||
]);
|
||||
await plugin_default.ui.sendToPropertyInspector({ event: "projects", data: projects, users: usersResult, version: CURRENT_VERSION });
|
||||
plugin_default.logger.info(`[diag] sendProjectsToPI: sent projects payload, 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 });
|
||||
@@ -6638,8 +6635,7 @@ var TimerToggle = class extends SingletonAction {
|
||||
await Promise.all([ev.action.setState(0), ev.action.setTitle(title)]);
|
||||
}
|
||||
}
|
||||
async onPropertyInspectorDidAppear(ev) {
|
||||
plugin_default.logger.info(`[diag] onPropertyInspectorDidAppear fired for ${ev.action.id}, version=${CURRENT_VERSION}`);
|
||||
async onPropertyInspectorDidAppear(_ev) {
|
||||
await sendProjectsToPI();
|
||||
}
|
||||
async onKeyDown(ev) {
|
||||
@@ -6725,7 +6721,6 @@ TimerToggle = __decorateClass([
|
||||
var timerAction = new TimerToggle();
|
||||
plugin_default.actions.registerAction(timerAction);
|
||||
plugin_default.ui.onSendToPlugin(async (ev) => {
|
||||
plugin_default.logger.info(`[diag] onSendToPlugin received event=${ev.payload.event}, version=${CURRENT_VERSION}`);
|
||||
if (ev.payload.event === "saveSettings" && ev.payload.settings) {
|
||||
await ev.action.setSettings(ev.payload.settings);
|
||||
const title = buttonTitle(ev.payload.settings.projectName || "");
|
||||
|
||||
@@ -1 +1 @@
|
||||
u…o%]¹8®ú~/†l�bßϨRŸ1‚ôŽÜ®¸u»†Í%]çâ4Cñ®¥Ri1ü¢Â×05@KfíÙ#X
|
||||
…æË>· o“ˆ!óhŰù!HC1ÈÉÒÉ_gY’|vnû¦»÷1Ûá´¨*ò�˜M(ªºþ0C5ó=
|
||||
Reference in New Issue
Block a user