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

@@ -98,6 +98,20 @@
/>
</button>
@if (isElectron()) {
<button
type="button"
class="grid h-8 w-8 place-items-center rounded-md transition-colors hover:bg-secondary"
title="Open Documentation"
(click)="openDocumentation()"
>
<ng-icon
name="lucideBookOpen"
class="h-4 w-4 text-muted-foreground"
/>
</button>
}
<div class="relative">
<button
type="button"
@@ -151,6 +165,20 @@
>
Plugin Store
</button>
<button
type="button"
(click)="openSettings()"
class="w-full rounded-md px-3 py-2 text-left text-sm text-foreground transition-colors hover:bg-secondary"
>
Settings
</button>
<button
type="button"
(click)="openDocumentation()"
class="w-full rounded-md px-3 py-2 text-left text-sm text-foreground transition-colors hover:bg-secondary"
>
Documentation
</button>
<div class="mx-2 my-1 h-px bg-border"></div>
<button
type="button"

View File

@@ -14,6 +14,7 @@ import {
lucideSquare,
lucideX,
lucideChevronLeft,
lucideBookOpen,
lucideHash,
lucideMenu,
lucidePackage,
@@ -39,6 +40,7 @@ import { RealtimeSessionFacade } from '../../../core/realtime';
import { ServerDirectoryFacade } from '../../../domains/server-directory';
import { PlatformService } from '../../../core/platform';
import { clearStoredCurrentUserId } from '../../../core/storage/current-user-storage';
import { SettingsModalService } from '../../../core/services/settings-modal.service';
import { LeaveServerDialogComponent } from '../../../shared';
import { Room } from '../../../shared-kernel';
import { VoiceWorkspaceService } from '../../../domains/voice-session';
@@ -58,6 +60,7 @@ import { ThemeNodeDirective } from '../../../domains/theme';
lucideSquare,
lucideX,
lucideChevronLeft,
lucideBookOpen,
lucideHash,
lucideMenu,
lucidePackage,
@@ -76,6 +79,7 @@ export class TitleBarComponent {
private webrtc = inject(RealtimeSessionFacade);
private platform = inject(PlatformService);
private voiceWorkspace = inject(VoiceWorkspaceService);
private settingsModal = inject(SettingsModalService);
private getWindowControlsApi() {
return this.electronBridge.getApi();
@@ -188,6 +192,27 @@ export class TitleBarComponent {
void this.router.navigate(['/plugin-store'], { queryParams: { returnUrl } });
}
openSettings(): void {
this._showMenu.set(false);
this.settingsModal.open('general');
}
async openDocumentation(): Promise<void> {
const api = this.electronBridge.getApi();
this._showMenu.set(false);
if (!api) {
return;
}
const result = await api.openDocusaurusDocs();
if (result && !result.opened) {
this.inviteStatus.set(result.reason ?? 'Unable to open documentation.');
}
}
/** Open the unified leave-server confirmation dialog. */
private openLeaveConfirm() {
this._showMenu.set(false);