From a1c87bebf3c16e48c287d547753afceeaf760da0 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Sat, 3 Jan 2026 18:42:59 -0600 Subject: [PATCH] fix(App): refine notification logic for incoming messages; enhance button formatting in changelog modal; improve icon color handling in user icon component --- meshchatx/src/frontend/components/App.vue | 2 +- .../frontend/components/ChangelogModal.vue | 16 +++++++-- .../src/frontend/components/LxmfUserIcon.vue | 16 +++++++-- .../components/MaterialDesignIcon.vue | 18 ++++++---- .../frontend/components/about/AboutPage.vue | 6 +++- .../components/debug/DebugLogsPage.vue | 36 +++++++++++++------ .../components/profile/ProfileIconPage.vue | 20 ++++++----- 7 files changed, 83 insertions(+), 31 deletions(-) diff --git a/meshchatx/src/frontend/components/App.vue b/meshchatx/src/frontend/components/App.vue index 21bd422..bb2bcb7 100644 --- a/meshchatx/src/frontend/components/App.vue +++ b/meshchatx/src/frontend/components/App.vue @@ -735,7 +735,7 @@ export default { // show notification for new messages if window is not focussed // only for incoming messages - if (!document.hasFocus() && json.lxmf_message?.is_incoming) { + if (!document.hasFocus() && json.lxmf_message?.is_incoming === true) { NotificationUtils.showNewMessageNotification( json.remote_identity_name, json.lxmf_message?.content diff --git a/meshchatx/src/frontend/components/ChangelogModal.vue b/meshchatx/src/frontend/components/ChangelogModal.vue index 619abb2..2d3ccf6 100644 --- a/meshchatx/src/frontend/components/ChangelogModal.vue +++ b/meshchatx/src/frontend/components/ChangelogModal.vue @@ -50,7 +50,13 @@
{{ error }}
- + Retry
@@ -131,7 +137,13 @@
{{ error }}
- + Retry
diff --git a/meshchatx/src/frontend/components/LxmfUserIcon.vue b/meshchatx/src/frontend/components/LxmfUserIcon.vue index 32a2ac2..30d1435 100644 --- a/meshchatx/src/frontend/components/LxmfUserIcon.vue +++ b/meshchatx/src/frontend/components/LxmfUserIcon.vue @@ -9,10 +9,10 @@
- +
diff --git a/meshchatx/src/frontend/components/MaterialDesignIcon.vue b/meshchatx/src/frontend/components/MaterialDesignIcon.vue index 3d9279d..aecdc35 100644 --- a/meshchatx/src/frontend/components/MaterialDesignIcon.vue +++ b/meshchatx/src/frontend/components/MaterialDesignIcon.vue @@ -29,7 +29,7 @@ export default { computed: { mdiIconName() { if (!this.iconName) return "mdiAccountOutline"; - + // if already starts with mdi and is camelCase, return as is if (this.iconName.startsWith("mdi") && /[A-Z]/.test(this.iconName)) { return this.iconName; @@ -41,7 +41,7 @@ export default { "mdi" + this.iconName .split("-") - .filter(word => word.length > 0) + .filter((word) => word.length > 0) .map((word) => { // capitalise first letter of each part return word.charAt(0).toUpperCase() + word.slice(1); @@ -50,12 +50,18 @@ export default { ); }, iconPath() { - if (!mdi) return ""; - - const path = mdi[this.mdiIconName]; + if (!mdi || Object.keys(mdi).length === 0) { + console.error("MDI library not loaded or empty"); + return ""; + } + + const name = this.mdiIconName; + const path = mdi[name]; + if (path) return path; - + // fallback logic + console.warn(`Icon not found: ${name} (original: ${this.iconName})`); return mdi["mdiHelpCircleOutline"] || mdi["mdiProgressQuestion"] || ""; }, }, diff --git a/meshchatx/src/frontend/components/about/AboutPage.vue b/meshchatx/src/frontend/components/about/AboutPage.vue index ab8ec20..16846f8 100644 --- a/meshchatx/src/frontend/components/about/AboutPage.vue +++ b/meshchatx/src/frontend/components/about/AboutPage.vue @@ -265,7 +265,11 @@ {{ $t("about.backend_dependencies") }}
-
+
{{ name.replace("_", " ") }} diff --git a/meshchatx/src/frontend/components/debug/DebugLogsPage.vue b/meshchatx/src/frontend/components/debug/DebugLogsPage.vue index 8382ba6..bc63f7b 100644 --- a/meshchatx/src/frontend/components/debug/DebugLogsPage.vue +++ b/meshchatx/src/frontend/components/debug/DebugLogsPage.vue @@ -21,7 +21,9 @@
-
+
@@ -34,7 +36,7 @@ @input="debouncedSearch" />
- +