Better handling of idle with WS messages.
This commit is contained in:
@@ -16,7 +16,7 @@ import { sineIn } from 'svelte/easing';
|
||||
// *** Import other supporting libraries
|
||||
import { liveQuery } from "dexie";
|
||||
import { Drawer, Footer, Modal } from 'flowbite-svelte';
|
||||
import { listen, idle, onIdle } from 'svelte-idle'
|
||||
import { listen, idle, onIdle, restartCountdown } from 'svelte-idle'
|
||||
|
||||
import {
|
||||
// Brain,
|
||||
@@ -425,6 +425,7 @@ function handle_ws_recv(ws_recv_status: any) {
|
||||
goto(new_url_str, {replaceState: false});
|
||||
}
|
||||
// AE Download (event file ID)
|
||||
// This does not yet work with the native app caching.
|
||||
} else if (cmd.startsWith('ae_download:')) {
|
||||
log_lvl = 1;
|
||||
|
||||
@@ -471,7 +472,11 @@ function handle_ws_recv(ws_recv_status: any) {
|
||||
// We are assuming this is for digital posters and needs to be opened in the modal.
|
||||
|
||||
$events_sess.launcher.modal__open_event_file_id = null;
|
||||
|
||||
clearInterval(idle_timer_interval);
|
||||
saver_looping = false;
|
||||
restartCountdown();
|
||||
|
||||
$events_slct.event_file_id = obj_id;
|
||||
|
||||
$events_sess.launcher.modal__title = $events_sess.launcher.modal__title ?? '*';
|
||||
@@ -520,6 +525,10 @@ function handle_ws_recv(ws_recv_status: any) {
|
||||
// $events_sess.launcher.event_file_open.open_status = 'close';
|
||||
}
|
||||
|
||||
clearInterval(idle_timer_interval);
|
||||
saver_looping = false;
|
||||
restartCountdown();
|
||||
|
||||
// WORKING! AE Refresh (now)
|
||||
} else if (cmd.startsWith('ae_refresh:')) {
|
||||
console.log();
|
||||
|
||||
@@ -181,7 +181,7 @@ import { events_loc, events_sess, events_slct, events_trigger, events_trig } fro
|
||||
type="number"
|
||||
min={3000}
|
||||
bind:value={$events_loc.launcher.idle_timer}
|
||||
class="input input-sm w-24 text-right"
|
||||
class="input input-sm w-28 text-right"
|
||||
>
|
||||
</label>
|
||||
|
||||
@@ -194,7 +194,7 @@ import { events_loc, events_sess, events_slct, events_trigger, events_trig } fro
|
||||
type="number"
|
||||
min={500}
|
||||
bind:value={$events_loc.launcher.idle_cycle}
|
||||
class="input input-sm w-24 text-right"
|
||||
class="input input-sm w-28 text-right"
|
||||
>
|
||||
</label>
|
||||
|
||||
@@ -207,7 +207,7 @@ import { events_loc, events_sess, events_slct, events_trigger, events_trig } fro
|
||||
type="number"
|
||||
min={750}
|
||||
bind:value={$events_loc.launcher.idle_loop_period}
|
||||
class="input input-sm w-24 text-right"
|
||||
class="input input-sm w-28 text-right"
|
||||
>
|
||||
</label>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user