v1.0.52: add Launch Nextcloud button

Spawns the Nextcloud.app binary directly (detached, no Terminal window)
since it doesn't register properly with launch services on some setups.
New action requires a one-time plugin reinstall (manifest changes don't
ship through the OTA updater, which only touches plugin.js + assets).
This commit is contained in:
pdmarf
2026-10-07 18:15:08 +01:00
parent 0b4345dad6
commit 4a7ed58410
8 changed files with 67 additions and 5 deletions
+22 -1
View File
@@ -6438,7 +6438,7 @@ async function stopTimer(token, entryId) {
}
// src/plugin.ts
var CURRENT_VERSION = "1.0.51";
var CURRENT_VERSION = "1.0.52";
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=
@@ -6718,8 +6718,29 @@ var TimerToggle = class extends SingletonAction {
TimerToggle = __decorateClass([
action({ UUID: "com.pdma.notion-timer.toggle" })
], TimerToggle);
var NEXTCLOUD_BIN = "/Applications/Nextcloud.app/Contents/MacOS/Nextcloud";
var LaunchNextcloud = class extends SingletonAction {
async onKeyDown(ev) {
try {
const { spawn } = await import("node:child_process");
const child = spawn(NEXTCLOUD_BIN, [], { detached: true, stdio: "ignore" });
child.once("error", (err) => {
plugin_default.logger.error("Failed to launch Nextcloud:", err);
});
child.unref();
await ev.action.showOk();
} catch (err) {
plugin_default.logger.error("Failed to launch Nextcloud:", err);
await ev.action.showAlert();
}
}
};
LaunchNextcloud = __decorateClass([
action({ UUID: "com.pdma.notion-timer.launch-nextcloud" })
], LaunchNextcloud);
var timerAction = new TimerToggle();
plugin_default.actions.registerAction(timerAction);
plugin_default.actions.registerAction(new LaunchNextcloud());
plugin_default.ui.onSendToPlugin(async (ev) => {
if (ev.payload.event === "saveSettings" && ev.payload.settings) {
await ev.action.setSettings(ev.payload.settings);
@@ -1 +1 @@
…æË>· o“ˆ!óhŰù!HC1ÈÉÒÉ_gY’|vnû¦»­÷1Ûá´¨*ò�˜M(ªºþ0C5ó=
IЬ╝Q╫┤Д■Ю╦ЩN╦°g╬░жКл┤╜Х р-│°вЙдmое╧В0Х·÷╕r([▌б▄√щ■v▓VwL∙┴╛