More work on the WebSockets. Improved status and WS triggers. Better online/offline status.

This commit is contained in:
Scott Idem
2025-10-16 14:48:10 -04:00
parent 3d6b7c412c
commit 8d15a5ba0b
6 changed files with 189 additions and 25 deletions

View File

@@ -44,7 +44,7 @@ let {
}: Props = $props();
// *** Import Svelte specific
import { preventDefault } from 'svelte/legacy';
// import { preventDefault } from 'svelte/legacy';
import { onMount, tick } from 'svelte';
import { fade, scale, fly } from 'svelte/transition';
@@ -250,6 +250,14 @@ async function handle_open_file() {
// $events_loc.launcher.poster_src = `/event/file/${event_file_id}/download`;
// $events_loc.launcher.modal_title = modal_title;
// }
function preventDefault(fn) {
return function (event) {
event.preventDefault();
fn.call(this, event);
};
}
</script>
@@ -375,6 +383,7 @@ async function handle_open_file() {
});
}
}}
class:preset-tonal-success={$events_slct.event_file_id == event_file_id}
class="
btn btn-sm md:btn-md lg:btn-lg
preset-tonal-primary border border-primary-500