MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / runAction

Function runAction

deployments/desktop/static/desktop.js:1704–1720  ·  view source on GitHub ↗
(action, busyText = ui().status.busy, options = {})

Source from the content-addressed store, hash-verified

1702 }
1703
1704 async function runAction(action, busyText = ui().status.busy, options = {}) {
1705 const actionButton = options.button || state.lastActionButton;
1706 try {
1707 setActionButtonBusy(actionButton, true);
1708 setStatus(busyText);
1709 await action();
1710 setStatus(ui().status.ready);
1711 flashButtonFeedback(actionButton, "success");
1712 } catch (error) {
1713 setStatus(ui().status.error);
1714 console.error(error);
1715 flashButtonFeedback(actionButton, "error");
1716 if (!error.paperflowToastShown) showFeedbackToast("error", ui().common.operationFailed, error.message || String(error));
1717 } finally {
1718 setActionButtonBusy(actionButton, false);
1719 }
1720 }
1721
1722 async function api(path, options = {}) {
1723 if (DEMO_MODE) return demoApi(path, options);

Callers 4

setViewFunction · 0.70
ensureReportContextMenuFunction · 0.70
bindEventsFunction · 0.70
desktop.jsFile · 0.70

Calls 5

uiFunction · 0.85
setActionButtonBusyFunction · 0.85
flashButtonFeedbackFunction · 0.85
showFeedbackToastFunction · 0.85
setStatusFunction · 0.70

Tested by

no test coverage detected