diff --git a/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte b/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte index 0093d84e..d068f590 100644 --- a/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte +++ b/src/routes/events/[event_id]/(launcher)/menu_launcher_controls.svelte @@ -10,15 +10,20 @@ * * SECTIONS: * 1. Visibility toggles (edit mode only) — show/hide draft files and hidden sessions - * 2. Accessibility controls (always visible) — font size cycler and light/dark toggle + * 2. Accessibility controls (always visible) — Reset Apps, font size cycler, light/dark toggle * * WHY ALWAYS-VISIBLE ACCESSIBILITY CONTROLS: * Projector-connected screens, tablets, and phones at conference venues vary wildly * in lighting. Operators and presenters need quick one-tap access to font size and * theme mode without hunting through the system menu or requiring admin access. + * + * WHY RESET APPS IS ALWAYS VISIBLE: + * If a presentation app (PowerPoint, Keynote, etc.) hangs or stalls on stage, the + * presenter needs a one-tap way to force-close it and recover — without entering edit + * mode or navigating the config menu. This button is intentionally prominent. */ -import { Moon, Sun, Eye, EyeOff, Columns2, Copy } from '@lucide/svelte'; +import { Moon, Sun, Eye, EyeOff, Columns2, Copy, XCircle } from '@lucide/svelte'; import { ae_loc } from '$lib/stores/ae_stores'; import { events_loc } from '$lib/stores/ae_events_stores'; @@ -52,12 +57,35 @@ async function toggle_display_mode() { ($events_loc.launcher as any).display_mode = next; } } + +// Process names closed when presenter hits "Reset Apps". Covers the standard +// conference app set. Override per device via event_device.other_json.launcher.kill_process_li. +const DEFAULT_KILL_LIST = [ + 'Microsoft PowerPoint', + 'Keynote', + 'Adobe Acrobat Reader DC', + 'VLC', + 'soffice' +]; + +let reset_apps_status = $state(''); + +async function handle_reset_apps() { + const native_device = ($ae_loc as any).native_device ?? null; + const process_name_li: string[] = + native_device?.other_json?.launcher?.kill_process_li ?? DEFAULT_KILL_LIST; + reset_apps_status = 'Resetting...'; + await native.kill_processes({ process_name_li }); + reset_apps_status = 'Done'; + setTimeout(() => (reset_apps_status = ''), 3000); +}
{#if $ae_loc.edit_mode} - +
- + {/if} - + + + + +