From 31cf1bca4bc8186a2a4ad79593156f4b6d9fe179 Mon Sep 17 00:00:00 2001 From: Dmitry Ledentsov Date: Wed, 5 Jun 2024 23:04:50 +0200 Subject: [PATCH] signalling connection --- ui-src/index.html | 3 +++ ui-src/index.ts | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/ui-src/index.html b/ui-src/index.html index d5697c0..25798d3 100644 --- a/ui-src/index.html +++ b/ui-src/index.html @@ -39,6 +39,9 @@

Server-side updates & info

+
diff --git a/ui-src/index.ts b/ui-src/index.ts index c714aa0..27f4be0 100644 --- a/ui-src/index.ts +++ b/ui-src/index.ts @@ -43,6 +43,7 @@ async function subscribe( await subscribe(streamUrl, processingFunc); } else { hideDisconnectedAlert(); + flashConnectedAlert(); // Get and show the message const reader = response?.body?.getReader(); if (!reader) { @@ -247,3 +248,10 @@ function hideDisconnectedAlert() { function showDisconnectedAlert() { $("#offline-alert").show(); } + +function flashConnectedAlert() { + $("#connected-alert").show(); + $("#connected-alert").fadeTo(500, 50, function () { + $("#connected-alert").slideUp(500); + }); +}