feat(launcher): implement Phase 5 system management UI and relay

- Expose new native handlers in electron_relay.ts (Wallpaper, Updates, Window Control, Power).
- Overhaul Native OS Management UI with controls for window states, display layouts, and power.
- Add Application Updates component with support for local and web sources.
- Include confirmation modal for dangerous system actions (shutdown/reboot).
- Update TODO.md to mark Phase 5 integration as completed.
This commit is contained in:
Scott Idem
2026-01-30 12:49:09 -05:00
parent 5a2eaa8fac
commit 8c7784802a
5 changed files with 340 additions and 56 deletions

View File

@@ -183,6 +183,43 @@ export async function control_presentation({
return { success: false, error: `Unsupported app or action: ${app}/${action}` };
}
// 4. System Management (Phase 5+)
export async function set_wallpaper({ path }: { path: string }) {
if (!native || !native.set_wallpaper) return { success: false, error: 'Native handler set_wallpaper not available' };
return await native.set_wallpaper({ path });
}
export async function update_app(args: { source: 'url' | 'file', url?: string, path?: string }) {
if (!native || !native.update_app) return { success: false, error: 'Native handler update_app not available' };
return await native.update_app(args);
}
export async function window_control({ action, value }: { action: string, value?: any }) {
if (!native || !native.window_control) return { success: false, error: 'Native handler window_control not available' };
return await native.window_control({ action, value });
}
export async function manage_recording({ action, options }: { action: 'start' | 'stop' | 'status', options?: any }) {
if (!native || !native.manage_recording) return { success: false, error: 'Native handler manage_recording not available' };
return await native.manage_recording({ action, options });
}
export async function set_display_layout({ mode, configStr }: { mode: 'mirror' | 'extend', configStr?: string }) {
if (!native || !native.set_display_layout) return { success: false, error: 'Native handler set_display_layout not available' };
return await native.set_display_layout({ mode, configStr });
}
export async function power_control({ action }: { action: 'shutdown' | 'reboot' | 'sleep' }) {
if (!native || !native.power_control) return { success: false, error: 'Native handler power_control not available' };
return await native.power_control({ action });
}
export async function open_external({ url, app }: { url: string, app?: 'chrome' | 'firefox' | 'default' }) {
if (!native || !native.open_external) return { success: false, error: 'Native handler open_external not available' };
return await native.open_external({ url, app });
}
/**
* List Tools (Self-Documentation)
* Returns a JSON manifest of all available native bridge functions.