feat(launcher): restore Kill Apps button in Native OS config
Kills the standard conference presentation app set between sessions:
Microsoft PowerPoint, Keynote, Adobe Acrobat Reader DC, VLC, soffice.
- Calls native.kill_processes({ process_name_li }) via existing relay
- Process list overridable per device via event_device.other_json.launcher.kill_process_li
- Button lives in Native OS config > System Actions (edit mode only)
- Reuses system_status for feedback — shows which apps are being killed
- Original list recovered from git history of legacy architecture docs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,10 @@
|
||||
`run_osascript` / `run_cmd` directly with per-step error handling. Complete.
|
||||
- [x] **[Launcher] Slide control scripts in Svelte config** — AppleScript post_scripts live in
|
||||
`ae_launcher__default_launch_profiles.ts`. VLC focus-stealing fix applied. Complete.
|
||||
- [ ] **[Launcher] `kill_processes` target list in config** — Implement UI for manual "Kill Apps"
|
||||
button and auto-cleanup on file open.
|
||||
- [x] **[Launcher] Kill Apps button** — "Kill Apps" button added to Native OS config (System
|
||||
Actions, edit mode only). Kills PowerPoint, Keynote, Adobe Acrobat Reader DC, VLC, soffice.
|
||||
List overridable via `event_device.other_json.launcher.kill_process_li`. Auto-cleanup on file
|
||||
open (deferred — manual button sufficient for CMSC).
|
||||
- [ ] **[Launcher] End-to-end test on macOS** — test pptx and key opens on a real podium Mac.
|
||||
- [ ] **[Launcher/Electron] Wallpaper stops applying after several changes (post-CMSC)** —
|
||||
Append timestamp/random suffix to temp filename so macOS always sees a new path.
|
||||
|
||||
@@ -17,7 +17,8 @@ import {
|
||||
RefreshCw,
|
||||
SkipBack,
|
||||
SkipForward,
|
||||
Square
|
||||
Square,
|
||||
XCircle
|
||||
} from '@lucide/svelte';
|
||||
interface Props {
|
||||
on_expand?: () => void;
|
||||
@@ -69,6 +70,27 @@ async function handle_display_mode(mode: 'extend' | 'mirror') {
|
||||
setTimeout(() => (system_status = ''), 4000);
|
||||
}
|
||||
|
||||
// Process names sent to kill_processes() when the operator hits "Kill Apps".
|
||||
// Covers the standard conference presentation app set — PowerPoint, Keynote, Acrobat, VLC, LibreOffice.
|
||||
// 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'
|
||||
];
|
||||
|
||||
async function handle_kill_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;
|
||||
system_status = `Killing: ${process_name_li.join(', ')}...`;
|
||||
await native.kill_processes({ process_name_li });
|
||||
system_status = 'Kill signal sent';
|
||||
setTimeout(() => (system_status = ''), 4000);
|
||||
}
|
||||
|
||||
// Modal state for dangerous actions
|
||||
let show_power_confirm = $state<{ action: string; label: string } | null>(null);
|
||||
</script>
|
||||
@@ -240,6 +262,16 @@ let show_power_confirm = $state<{ action: string; label: string } | null>(null);
|
||||
disabled={!$ae_loc.site_header_image_path}>
|
||||
<Image size="0.85em" class="mr-1 shrink-0" /> Reset Wallpaper
|
||||
</button>
|
||||
<!-- Kill running presentation apps — PowerPoint, Keynote, Acrobat, VLC, LibreOffice.
|
||||
Use between sessions to ensure a clean slate. List is overridable via
|
||||
event_device.other_json.launcher.kill_process_li. -->
|
||||
<button
|
||||
type="button"
|
||||
onclick={handle_kill_apps}
|
||||
class="btn btn-xs preset-tonal-error hover:preset-filled-error-500 justify-start"
|
||||
title="Kill presentation apps: {DEFAULT_KILL_LIST.join(', ')}">
|
||||
<XCircle size="0.85em" class="mr-1 shrink-0" /> Kill Apps
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-1">
|
||||
|
||||
Reference in New Issue
Block a user