From 37d4b317b90c0e7ffb8f9ac47e58263f0c53db7d Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Wed, 7 Jan 2026 19:13:20 -0600 Subject: [PATCH] feat(ui): enhance user interface and functionality across multiple components - Updated sidebar width in App.vue for better layout. - Added navigation option for RNPath trace in CommandPalette.vue. - Included Italian language support in LanguageSelector.vue. - Improved Toast.vue to handle loading state for toasts and update existing toasts. - Enhanced AboutPage.vue with download buttons for snapshots and backups. - Refined InterfacesPage.vue to improve layout and filtering capabilities. - Introduced MiniChat.vue for a compact chat interface on the map. - Updated ConversationDropDownMenu.vue to include telemetry trust toggle. - Enhanced ConversationViewer.vue with better telemetry handling and error notifications. - Added RNPathTracePage.vue for tracing paths to destination hashes. - Improved ToolsPage.vue to include RNPath trace functionality. --- meshchatx/src/frontend/components/App.vue | 2 +- .../frontend/components/CommandPalette.vue | 8 + .../frontend/components/LanguageSelector.vue | 1 + meshchatx/src/frontend/components/Toast.vue | 45 +- .../frontend/components/about/AboutPage.vue | 54 +- .../components/interfaces/InterfacesPage.vue | 200 ++-- .../src/frontend/components/map/MapPage.vue | 913 ++++++++++++++---- .../src/frontend/components/map/MiniChat.vue | 189 ++++ .../messages/ConversationDropDownMenu.vue | 96 +- .../messages/ConversationViewer.vue | 590 +++++++++-- .../components/messages/MessagesPage.vue | 29 +- .../components/messages/MessagesSidebar.vue | 136 ++- .../components/messages/PaperMessageModal.vue | 33 +- .../src/frontend/components/ping/PingPage.vue | 8 + .../src/frontend/components/rncp/RNCPPage.vue | 23 +- .../components/settings/SettingsPage.vue | 328 ++++++- .../components/tools/PaperMessagePage.vue | 7 +- .../components/tools/RNPathTracePage.vue | 377 ++++++++ .../frontend/components/tools/ToolsPage.vue | 63 +- 19 files changed, 2691 insertions(+), 411 deletions(-) create mode 100644 meshchatx/src/frontend/components/map/MiniChat.vue create mode 100644 meshchatx/src/frontend/components/tools/RNPathTracePage.vue diff --git a/meshchatx/src/frontend/components/App.vue b/meshchatx/src/frontend/components/App.vue index fa2fe5c..3d15485 100644 --- a/meshchatx/src/frontend/components/App.vue +++ b/meshchatx/src/frontend/components/App.vue @@ -129,7 +129,7 @@ class="fixed inset-y-0 left-0 z-[70] transform transition-all duration-300 ease-in-out sm:relative sm:z-0 sm:flex sm:translate-x-0" :class="[ isSidebarOpen ? 'translate-x-0' : '-translate-x-full', - isSidebarCollapsed ? 'w-16' : 'w-72', + isSidebarCollapsed ? 'w-16' : 'w-80', ]" >
+
@@ -70,24 +75,58 @@ export default { }, methods: { add(toast) { + // Check if a toast with the same key already exists + if (toast.key) { + const existingIndex = this.toasts.findIndex((t) => t.key === toast.key); + if (existingIndex !== -1) { + const existingToast = this.toasts[existingIndex]; + + // Clear existing timeout if it exists + if (existingToast.timer) { + clearTimeout(existingToast.timer); + } + + // Update existing toast + existingToast.message = toast.message; + existingToast.type = toast.type || "info"; + existingToast.duration = toast.duration !== undefined ? toast.duration : 5000; + + if (existingToast.duration > 0) { + existingToast.timer = setTimeout(() => { + this.remove(existingToast.id); + }, existingToast.duration); + } else { + existingToast.timer = null; + } + return; + } + } + const id = this.counter++; const newToast = { id, + key: toast.key, message: toast.message, type: toast.type || "info", - duration: toast.duration || 5000, + duration: toast.duration !== undefined ? toast.duration : 5000, + timer: null, }; - this.toasts.push(newToast); if (newToast.duration > 0) { - setTimeout(() => { + newToast.timer = setTimeout(() => { this.remove(id); }, newToast.duration); } + + this.toasts.push(newToast); }, remove(id) { const index = this.toasts.findIndex((t) => t.id === id); if (index !== -1) { + const toast = this.toasts[index]; + if (toast.timer) { + clearTimeout(toast.timer); + } this.toasts.splice(index, 1); } }, diff --git a/meshchatx/src/frontend/components/about/AboutPage.vue b/meshchatx/src/frontend/components/about/AboutPage.vue index 96f440f..00343b3 100644 --- a/meshchatx/src/frontend/components/about/AboutPage.vue +++ b/meshchatx/src/frontend/components/about/AboutPage.vue @@ -402,7 +402,7 @@ > {{ appInfo.is_connected_to_shared_instance - ? "Shared Instance" + ? `Shared Instance: ${appInfo.shared_instance_address || "unknown"}` : "Main Instance" }} @@ -659,6 +659,14 @@
+
-
-
-
-
- {{ $t("interfaces.manage") }} -
-
- {{ $t("interfaces.title") }} -
-
- {{ $t("interfaces.description") }} -
+
+
+
+ {{ $t("interfaces.manage") }}
-
+
+ {{ $t("interfaces.title") }} +
+
+ {{ $t("interfaces.description") }} +
+
{{ $t("interfaces.add_interface") }} @@ -52,56 +50,34 @@ {{ $t("interfaces.export_all") }} -
+
-
-
+ +
+
+ -
-
- -
-
-