MCPcopy
hub / github.com/koala73/worldmonitor / invokeDesktopAction

Function invokeDesktopAction

src/settings-main.ts:47–54  ·  view source on GitHub ↗
(command: string, successLabel: string)

Source from the content-addressed store, hash-verified

45}
46
47async function invokeDesktopAction(command: string, successLabel: string): Promise<void> {
48 const result = await tryInvokeTauri<string>(command);
49 if (result) {
50 setActionStatus(`${successLabel}: ${result}`, 'ok');
51 return;
52 }
53 setActionStatus(t('modals.settingsWindow.invokeFail', { command }), 'error');
54}
55
56function closeSettingsWindow(): void {
57 void tryInvokeTauri<void>('close_settings_window').then(() => { }, () => window.close());

Callers 1

renderDebugFunction · 0.85

Calls 2

tFunction · 0.90
setActionStatusFunction · 0.85

Tested by

no test coverage detected