From 96a11bdb9c9cbf89d45eb800e0572420be4bd929 Mon Sep 17 00:00:00 2001 From: tiny-craft <137850705+tiny-craft@users.noreply.github.com> Date: Fri, 25 Aug 2023 00:44:00 +0800 Subject: [PATCH] perf: add mark color to the border of icon in connection pane --- .../src/components/sidebar/BrowserTree.vue | 3 ++ .../src/components/sidebar/ConnectionPane.vue | 11 ----- .../src/components/sidebar/ConnectionTree.vue | 40 +++++++++++++------ main.go | 2 +- 4 files changed, 32 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/sidebar/BrowserTree.vue b/frontend/src/components/sidebar/BrowserTree.vue index 064ad13..5d18d55 100644 --- a/frontend/src/components/sidebar/BrowserTree.vue +++ b/frontend/src/components/sidebar/BrowserTree.vue @@ -62,6 +62,9 @@ const data = computed(() => { const backgroundColor = computed(() => { const { markColor: hex = '' } = connectionStore.serverProfile[props.server] || {} + if (isEmpty(hex)) { + return '' + } const { r, g, b } = parseHexColor(hex) return `rgba(${r}, ${g}, ${b}, 0.2)` }) diff --git a/frontend/src/components/sidebar/ConnectionPane.vue b/frontend/src/components/sidebar/ConnectionPane.vue index 26edc94..a5cf1f2 100644 --- a/frontend/src/components/sidebar/ConnectionPane.vue +++ b/frontend/src/components/sidebar/ConnectionPane.vue @@ -14,10 +14,6 @@ const themeVars = useThemeVars() const dialogStore = useDialogStore() const connectionStore = useConnectionStore() const filterPattern = ref('') - -const onDisconnectAll = () => { - connectionStore.closeAllConnection() -}