feat: plugins v1.7
This commit is contained in:
@@ -18,6 +18,10 @@ import {
|
||||
updateDesktopSettings,
|
||||
type DesktopSettings
|
||||
} from '../desktop-settings';
|
||||
import {
|
||||
applyLocalApiSettings,
|
||||
getLocalApiSnapshot
|
||||
} from '../api';
|
||||
import {
|
||||
activateLinuxScreenShareAudioRouting,
|
||||
deactivateLinuxScreenShareAudioRouting,
|
||||
@@ -452,9 +456,27 @@ export function setupSystemHandlers(): void {
|
||||
await synchronizeAutoStartSetting(snapshot.autoStart);
|
||||
updateCloseToTraySetting(snapshot.closeToTray);
|
||||
await handleDesktopSettingsChanged();
|
||||
await applyLocalApiSettings();
|
||||
return snapshot;
|
||||
});
|
||||
|
||||
ipcMain.handle('get-local-api-status', () => getLocalApiSnapshot());
|
||||
|
||||
ipcMain.handle('open-local-api-docs', async () => {
|
||||
const snapshot = getLocalApiSnapshot();
|
||||
|
||||
if (snapshot.status !== 'running' || !snapshot.baseUrl) {
|
||||
return { opened: false, reason: 'Local API is not running' };
|
||||
}
|
||||
|
||||
if (!snapshot.scalarEnabled) {
|
||||
return { opened: false, reason: 'Scalar docs are disabled' };
|
||||
}
|
||||
|
||||
await shell.openExternal(`${snapshot.baseUrl}/docs`);
|
||||
return { opened: true };
|
||||
});
|
||||
|
||||
ipcMain.handle('relaunch-app', () => {
|
||||
app.relaunch();
|
||||
app.exit(0);
|
||||
|
||||
Reference in New Issue
Block a user