fix: poster WS remote control - push open and resolve file obj
- launcher_file_cont: poster 'Open Poster' click now sends ae_open:event_file command to remote display when controller=local_push and WS is connected - +layout.svelte handle_ws_recv: ae_open: handler now looks up the file obj from Dexie after setting modal__open_event_file_id, so the remote modal has the hosted_file_id needed to render the poster image (was showing 'No image selected' on remote device)
This commit is contained in:
@@ -340,6 +340,14 @@
|
||||
restartCountdown();
|
||||
$events_slct.event_file_id = obj_id;
|
||||
$events_sess.launcher.modal__open_event_file_id = obj_id;
|
||||
// Look up the file object from Dexie so the modal can render the image.
|
||||
// The remote device has no event_file_obj in scope — only the ID was sent over WS.
|
||||
db_events.file.get(obj_id).then((file_obj: any) => {
|
||||
if (file_obj) {
|
||||
$events_sess.launcher.modal__event_file_obj = file_obj;
|
||||
$events_sess.launcher.modal__title = file_obj.filename ?? '';
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (cmd.startsWith('ae_close:')) {
|
||||
if (cmd.split(':')[1] == 'event_file_modal') {
|
||||
|
||||
@@ -265,6 +265,11 @@
|
||||
if (!modal__title) modal__title = event_file_obj.filename;
|
||||
$events_slct.event_file_id = event_file_id;
|
||||
$events_slct.event_file_obj = event_file_obj;
|
||||
// Push the open command to the remote display when in local_push mode
|
||||
if ($events_loc.launcher.controller == 'local_push' && $events_sess.launcher.ws_connect_status == 'connected') {
|
||||
$events_sess.launcher.controller_cmd = `ae_open:event_file=${event_file_id}`;
|
||||
$events_sess.launcher.controller_trigger_send = true;
|
||||
}
|
||||
}}
|
||||
>
|
||||
{#snippet label()}
|
||||
|
||||
Reference in New Issue
Block a user