From d51ca37ace065e59cb6e1c98efca7ed10816e1d1 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Sun, 5 Oct 2025 18:37:37 +0300 Subject: [PATCH] added the ability to reconnect --- ui/app/components/Connection.vue | 16 +++++++++++++ ui/app/components/Simple.vue | 17 +++++++++++-- ui/app/layouts/default.vue | 22 +++++++++++++++-- ui/app/stores/SocketStore.ts | 41 ++++++++++++++++++++++++++++---- 4 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 ui/app/components/Connection.vue diff --git a/ui/app/components/Connection.vue b/ui/app/components/Connection.vue new file mode 100644 index 00000000..0e5ac902 --- /dev/null +++ b/ui/app/components/Connection.vue @@ -0,0 +1,16 @@ + + + diff --git a/ui/app/components/Simple.vue b/ui/app/components/Simple.vue index b90805cc..a24e7dc9 100644 --- a/ui/app/components/Simple.vue +++ b/ui/app/components/Simple.vue @@ -6,8 +6,9 @@
@@ -542,6 +543,18 @@ const showMessage = (item: StoreItem) => { } return (item.msg?.length || 0) > 0 } + +const connectionStatusColor = computed(() => { + switch (socketStore.connectionStatus) { + case 'connected': + return 'has-text-success' + case 'connecting': + return 'has-text-warning fa-spin' + case 'disconnected': + default: + return 'has-text-danger' + } +})