feat: Add browser documentation

This commit is contained in:
2026-04-29 17:15:01 +02:00
parent d261bac0ed
commit 3d81c34159
29 changed files with 19981 additions and 40 deletions

View File

@@ -477,6 +477,35 @@ export function setupSystemHandlers(): void {
return { opened: true };
});
ipcMain.handle('open-docusaurus-docs', async () => {
let snapshot = getLocalApiSnapshot();
if (snapshot.status !== 'running' || !snapshot.baseUrl || !snapshot.docusaurusEnabled) {
const currentSettings = getDesktopSettingsSnapshot();
updateDesktopSettings({
localApi: {
...currentSettings.localApi,
enabled: true,
docusaurusEnabled: true
}
});
await applyLocalApiSettings();
snapshot = getLocalApiSnapshot();
}
if (snapshot.status !== 'running' || !snapshot.baseUrl) {
return { opened: false, reason: snapshot.error ?? 'Local documentation server is not running' };
}
if (!snapshot.docusaurusEnabled) {
return { opened: false, reason: 'Docusaurus docs are disabled' };
}
await shell.openExternal(`${snapshot.baseUrl}/docusaurus/`);
return { opened: true };
});
ipcMain.handle('relaunch-app', () => {
app.relaunch();
app.exit(0);