From 21fad1a69806384a7e9535aa83867a7c47fc0893 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Fri, 22 May 2026 14:12:12 -0400 Subject: [PATCH] fix(launcher): restore open_in_os win routing, fix cfg_json in IDB, fix display state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit open_in_os = 'win': get_launch_profile() now maps pptx→pptxwin, ppt→pptwin, odp→odpwin, pdf→pdfwin when open_in_os is 'win', routing to the Windows-variant launch profiles (Parallels/CrossOver). Was never wired in native mode — feature was silently lost in the MasterKey→Launcher port. cfg_json missing from properties_to_save: the per-file display override was always read as undefined from Dexie because cfg_json was never saved. Added cfg_json to properties_to_save so display_override and any other cfg fields persist correctly. NOTE: IDB_CONTENT_VERSIONS for event_file is not yet wired; existing devices need a manual cache clear to pick up the new field. Display override button: removed $ae_loc.is_native gate — must be configurable from any device ahead of the event, not only on the podium Mac. Display toggle persistence: quick_display_mode now reads from and writes to $events_loc.launcher.display_mode so the last-set state survives page reloads instead of always defaulting to 'extend'. Co-Authored-By: Claude Sonnet 4.6 --- src/lib/ae_events/ae_events__event_file.ts | 1 + .../(launcher)/launcher_file_cont.svelte | 21 ++++++++++++++++--- .../(launcher)/menu_launcher_controls.svelte | 11 ++++++++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/lib/ae_events/ae_events__event_file.ts b/src/lib/ae_events/ae_events__event_file.ts index 28cc6919..1650c694 100644 --- a/src/lib/ae_events/ae_events__event_file.ts +++ b/src/lib/ae_events/ae_events__event_file.ts @@ -539,6 +539,7 @@ export const properties_to_save = [ 'filename', 'extension', 'open_in_os', + 'cfg_json', 'lu_file_purpose_id', 'lu_event_file_purpose_name', 'file_purpose', diff --git a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte index e1fe40db..05f1a1e4 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte @@ -136,8 +136,22 @@ function get_launch_profile( null; const local_profiles = ($events_loc as any).launcher?.launch_profiles ?? null; const display_override = file_obj?.cfg_json?.display_override ?? null; + + // open_in_os = 'win' routes to the Windows-variant profile for apps that have one. + // These profiles target Windows PowerPoint / LibreOffice / Acrobat running via Parallels or CrossOver. + const WIN_EXTENSION_MAP: Record = { + pptx: 'pptxwin', + ppt: 'pptwin', + odp: 'odpwin', + pdf: 'pdfwin' + }; + const effective_extension = + file_obj?.open_in_os === 'win' + ? (WIN_EXTENSION_MAP[extension] ?? extension) + : extension; + return resolve_launch_profile( - extension, + effective_extension, display_override, device_profiles, local_profiles @@ -714,10 +728,11 @@ function prevent_default(fn: (event: T) => void) { {/if} - {#if $ae_loc.trusted_access && $ae_loc.is_native} + {#if $ae_loc.trusted_access} + Stored in event_file.cfg_json.display_override. Cycles null → extend → mirror → null. + Settable from any device — takes effect when the file is opened in native mode. -->