(command: string, successLabel: string)
| 45 | } |
| 46 | |
| 47 | async 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 | |
| 56 | function closeSettingsWindow(): void { |
| 57 | void tryInvokeTauri<void>('close_settings_window').then(() => { }, () => window.close()); |
no test coverage detected