From e4e4fa8482f5fbd2ab8abc7ba3a6e68bcf0b865c Mon Sep 17 00:00:00 2001
From: t8y2 <1156263951@qq.com>
Date: Thu, 2 Jul 2026 12:35:51 +0800
Subject: [PATCH] fix(sidebar): apply comment font only on Windows
---
apps/desktop/src/components/sidebar/TreeItem.vue | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/apps/desktop/src/components/sidebar/TreeItem.vue b/apps/desktop/src/components/sidebar/TreeItem.vue
index eae8df97d5..a85254aabf 100644
--- a/apps/desktop/src/components/sidebar/TreeItem.vue
+++ b/apps/desktop/src/components/sidebar/TreeItem.vue
@@ -126,6 +126,7 @@ import { isTauriRuntime } from "@/lib/tauriRuntime";
import { copyToClipboard } from "@/lib/clipboard";
import { hasEnabledTransportLayers } from "@/lib/connectionTransport";
import { formatShortcut } from "@/lib/shortcutRegistry";
+import { isWindows } from "@/lib/platform";
import { rankSavedSqlHistory, type SavedSqlHistoryScope } from "@/lib/savedSqlHistory";
import { isSqlServerLinkedNode } from "@/lib/sqlServerLinkedServers";
import DatabaseIcon from "@/components/icons/DatabaseIcon.vue";
@@ -200,6 +201,7 @@ const settingsStore = useSettingsStore();
const savedSqlStore = useSavedSqlStore();
const { toast } = useToast();
const { highlight } = useSqlHighlighter();
+const useWindowsSidebarCommentFont = isWindows();
type StructureCopyFormat = "tsv" | "markdown";
type DuplicateStructureSource = TreeNode & { connectionId: string; database: string };
@@ -4517,8 +4519,8 @@ function treeItemMenuItems(): ContextMenuItem[] {
{{ t("editor.defaultDatabase") }}
-
-
+
+
{{ t("connection.readOnlyBadge") }}
@@ -4951,6 +4953,13 @@ function treeItemMenuItems(): ContextMenuItem[] {
text-rendering: auto;
}
+.sidebar-object-comment--windows {
+ font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
+ font-size: 12px;
+ font-weight: 500;
+ opacity: 1;
+}
+
.tree-item-connection-tint {
isolation: isolate;
background-color: transparent !important;