fix(launcher): poster session display — metadata, image modal, file paths
1. launcher_presentation_view: accept session_type prop from parent
instead of relying on event_session_type_code on file objects (which
is not reliably populated in Dexie). Use session_type to correctly
set hide_meta, session_type, and open_method on the file container.
2. launcher_session_view: pass session_type={type_code} to
Launcher_presentation_view; restore Launcher_presenter_view_posters
in the presenter list for poster mode (hide_name=true). Some events
store poster files at the PRESENTER level (for_id=event_presenter_id)
— particularly group/company presenters — so both paths must render.
3. launcher/+layout.svelte: fix poster modal image 403. The img src was
using the event_file download endpoint which requires auth headers a
plain img tag cannot send. Switched to the hosted_file endpoint with
key=account_id, which is browser-compatible. Also guarded on
modal__event_file_obj.hosted_file_id for safer access.
4. launcher_cfg_screen_saver: rename section title to 'Poster Screen Saver'.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Launcher_Cfg_Section
|
<Launcher_Cfg_Section
|
||||||
title="Digital Screen Saver"
|
title="Poster Screen Saver"
|
||||||
icon="fa-id-badge"
|
icon="fa-id-badge"
|
||||||
bind:state={$events_loc.launcher.section_state__screen_saver}
|
bind:state={$events_loc.launcher.section_state__screen_saver}
|
||||||
{on_expand}
|
{on_expand}
|
||||||
|
|||||||
@@ -870,11 +870,16 @@
|
|||||||
Close Remote Poster Display Only
|
Close Remote Poster Display Only
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{#if $events_sess.launcher.modal__open_event_file_id}
|
{#if $events_sess.launcher.modal__event_file_obj?.hosted_file_id}
|
||||||
|
<!-- WHY: Use hosted_file endpoint (not event_file) — the event_file download
|
||||||
|
endpoint requires auth headers that a plain <img> tag cannot send (→ 403).
|
||||||
|
The hosted_file endpoint accepts key=account_id as a query param and is
|
||||||
|
the proven browser-compatible path for direct file display. -->
|
||||||
<img
|
<img
|
||||||
src="{$ae_api.base_url}/v3/action/event_file/{$events_sess.launcher
|
src="{$ae_api.base_url}/v3/action/hosted_file/{$events_sess.launcher
|
||||||
.modal__open_event_file_id}/download?filename={$events_slct
|
.modal__event_file_obj.hosted_file_id}/download?return_file=true&filename={encodeURIComponent(
|
||||||
.event_file_obj.filename}&key={$ae_api.account_id}"
|
$events_sess.launcher.modal__event_file_obj.filename ?? ''
|
||||||
|
)}&key={$ae_api.account_id}"
|
||||||
alt="Poster"
|
alt="Poster"
|
||||||
class="min-h-28 min-w-md max-h-full max-w-full"
|
class="min-h-28 min-w-md max-h-full max-w-full"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
interface Props {
|
interface Props {
|
||||||
lq__event_presentation_obj: any;
|
lq__event_presentation_obj: any;
|
||||||
|
session_type?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { lq__event_presentation_obj }: Props = $props();
|
let { lq__event_presentation_obj, session_type = '' }: Props = $props();
|
||||||
|
|
||||||
import { liveQuery } from 'dexie';
|
import { liveQuery } from 'dexie';
|
||||||
import { db_events } from '$lib/ae_events/db_events';
|
import { db_events } from '$lib/ae_events/db_events';
|
||||||
@@ -67,17 +68,13 @@
|
|||||||
event_file_id={event_file_obj.event_file_id}
|
event_file_id={event_file_obj.event_file_id}
|
||||||
{event_file_obj}
|
{event_file_obj}
|
||||||
hide_created_on={false}
|
hide_created_on={false}
|
||||||
hide_meta={event_file_obj?.event_session_type_code == 'poster'}
|
hide_meta={session_type == 'poster'}
|
||||||
bind:hide_draft={
|
bind:hide_draft={
|
||||||
$events_loc.launcher.hide_content__draft_files
|
$events_loc.launcher.hide_content__draft_files
|
||||||
}
|
}
|
||||||
show_bak_download={$ae_loc.trusted_access}
|
show_bak_download={$ae_loc.trusted_access}
|
||||||
session_type={event_file_obj?.event_session_type_code ??
|
session_type={session_type || 'oral'}
|
||||||
'oral'}
|
open_method={session_type == 'poster' ? 'modal' : null}
|
||||||
open_method={event_file_obj?.event_session_type_code ==
|
|
||||||
'poster'
|
|
||||||
? 'modal'
|
|
||||||
: null}
|
|
||||||
modal_title={lq__event_presentation_obj?.name}
|
modal_title={lq__event_presentation_obj?.name}
|
||||||
bind:modal__title={$events_sess.launcher.modal__title}
|
bind:modal__title={$events_sess.launcher.modal__title}
|
||||||
bind:modal__open_event_file_id={
|
bind:modal__open_event_file_id={
|
||||||
|
|||||||
@@ -414,9 +414,17 @@
|
|||||||
<!-- Presentation-level files -->
|
<!-- Presentation-level files -->
|
||||||
<Launcher_presentation_view
|
<Launcher_presentation_view
|
||||||
lq__event_presentation_obj={event_presentation_obj}
|
lq__event_presentation_obj={event_presentation_obj}
|
||||||
|
session_type={type_code}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- The presenter list -->
|
<!-- The presenter list -->
|
||||||
|
<!-- WHY: In poster mode, presenter names are already shown inline
|
||||||
|
in the presentation header above, so hide_name=true.
|
||||||
|
We still render Launcher_presenter_view_posters here because
|
||||||
|
some events store files at the PRESENTER level (for_id=event_presenter_id)
|
||||||
|
rather than the presentation level — particularly group/company presenters.
|
||||||
|
The component renders nothing if there are no presenter-level files,
|
||||||
|
so this has no visual cost for events that use presentation-level files. -->
|
||||||
|
|
||||||
{#if $lq__event_presenter_obj_li && $lq__event_presenter_obj_li.length}
|
{#if $lq__event_presenter_obj_li && $lq__event_presenter_obj_li.length}
|
||||||
<ul class="event_presentation_presenter_list">
|
<ul class="event_presentation_presenter_list">
|
||||||
@@ -442,15 +450,10 @@
|
|||||||
lq__event_presenter_obj={event_presenter_obj}
|
lq__event_presenter_obj={event_presenter_obj}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- {index} -->
|
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
{:else}
|
|
||||||
<span class="event_launcher_no_presenters"
|
|
||||||
>No presenters to display</span
|
|
||||||
>
|
|
||||||
{/if}
|
{/if}
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
Reference in New Issue
Block a user