feat(launcher): auto-apply kiosk URL params on Launcher link for poster sessions
When on a Poster Session in Pres Mgmt, the Launcher nav link now appends ?iframe=true&launcher_menu=hide so the recipient opens a clean kiosk view without the site header or left session panel. - ae_comp__events_menu_nav: add events__launcher_extra_params prop; update launcher_sess_qry to merge extra params after session_id - session_page_menu: derive is_poster from type_code and pass the kiosk params into the Launcher link
This commit is contained in:
@@ -36,6 +36,9 @@
|
||||
let show_modal = $state(false);
|
||||
let show_help = $state(false);
|
||||
|
||||
// Detect poster sessions so the Launcher link auto-applies kiosk URL params
|
||||
let is_poster = $derived($lq__event_session_obj?.type_code === 'poster');
|
||||
|
||||
async function on_toggle(field: string, new_val: boolean) {
|
||||
await api.update_ae_obj_v3({
|
||||
api_cfg: $ae_api,
|
||||
@@ -91,6 +94,7 @@
|
||||
events__launcher_session_id={$lq__event_session_obj?.event_session_id && $ae_loc.administrator_access
|
||||
? $lq__event_session_obj?.event_session_id
|
||||
: null}
|
||||
events__launcher_extra_params={is_poster ? 'iframe=true&launcher_menu=hide' : ''}
|
||||
events__location_id={$lq__event_session_obj?.event_location_id && $ae_loc.trusted_access
|
||||
? $lq__event_session_obj?.event_location_id
|
||||
: null}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
events__launcher_session_id?: null | string; // event_session_id to pass to launcher as ?session_id=
|
||||
events__session_id?: null | string; // event_session_id — used for "Back to Session" link only
|
||||
events__session_search?: boolean; // event_id
|
||||
events__launcher_extra_params?: string; // extra URL params appended to the launcher link (e.g. 'iframe=true&launcher_menu=hide')
|
||||
}
|
||||
|
||||
let {
|
||||
@@ -31,6 +32,7 @@
|
||||
ae_core = false,
|
||||
events__launcher_id = null,
|
||||
events__launcher_session_id = null,
|
||||
events__launcher_extra_params = '',
|
||||
events__location_id = null,
|
||||
events__locations = false,
|
||||
events__reports = false,
|
||||
@@ -41,7 +43,12 @@
|
||||
|
||||
// Build launcher URL segments separately so the href template stays simple (avoids ternaries in href attr)
|
||||
let launcher_loc_seg = $derived(events__launcher_id ? `/${events__launcher_id}` : '');
|
||||
let launcher_sess_qry = $derived(events__launcher_session_id ? `?session_id=${events__launcher_session_id}` : '');
|
||||
let launcher_sess_qry = $derived.by(() => {
|
||||
const parts: string[] = [];
|
||||
if (events__launcher_session_id) parts.push(`session_id=${events__launcher_session_id}`);
|
||||
if (events__launcher_extra_params) parts.push(events__launcher_extra_params);
|
||||
return parts.length ? `?${parts.join('&')}` : '';
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- This is for common navigation links. -->
|
||||
|
||||
Reference in New Issue
Block a user