tray icon and open on login

This commit is contained in:
Boof2015
2026-08-15 21:20:48 -04:00
parent 6debfb8b34
commit 5236a92763
23 changed files with 1940 additions and 60 deletions
+69
View File
@@ -0,0 +1,69 @@
export type LoginLaunchMode = 'show' | 'tray'
export type LoginItemStatus =
| 'unavailable'
| 'disabled'
| 'enabled'
| 'requires-approval'
| 'blocked'
| 'error'
export interface DesktopIntegrationPreferences {
closeToTray: boolean
loginLaunchMode: LoginLaunchMode
}
export interface DesktopIntegrationSnapshot extends DesktopIntegrationPreferences {
openAtLogin: boolean
loginItemStatus: LoginItemStatus
loginItemError: string | null
}
export interface TrayProfileOption {
id: string
name: string
}
export interface TrayAudioSourceOption {
id: string
label: string
isDefault?: boolean
}
export interface TrayRendererState {
profiles: TrayProfileOption[]
activeProfileId: string | null
hasUnsavedProfileChanges: boolean
captureStatus: 'idle' | 'connecting' | 'capturing' | 'error'
activeSourceLabel: string | null
captureMode: 'system' | 'device'
selectedSystemSourceId: string | null
selectedDeviceId: string | null
systemSources: TrayAudioSourceOption[]
inputSources: TrayAudioSourceOption[]
}
export type TrayRendererCommand =
| { type: 'load-profile'; profileId: string }
| { type: 'select-system-source'; sourceId: string }
| { type: 'select-input-source'; deviceId: string | null }
| { type: 'set-capture-running'; running: boolean }
| { type: 'open-settings' }
export const DEFAULT_DESKTOP_INTEGRATION_PREFERENCES: DesktopIntegrationPreferences = {
closeToTray: false,
loginLaunchMode: 'show',
}
export const DEFAULT_TRAY_RENDERER_STATE: TrayRendererState = {
profiles: [],
activeProfileId: null,
hasUnsavedProfileChanges: false,
captureStatus: 'idle',
activeSourceLabel: null,
captureMode: 'system',
selectedSystemSourceId: null,
selectedDeviceId: null,
systemSources: [],
inputSources: [],
}