Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(grid): use theme-aware column header tooltip

二丫讲梵5b5799a63b9f
diff --git a/apps/desktop/src/components/grid/DataGridColumnHeader.vue b/apps/desktop/src/components/grid/DataGridColumnHeader.vue
index c6ea1348af..28a62ca6fe 100644
--- a/apps/desktop/src/components/grid/DataGridColumnHeader.vue
+++ b/apps/desktop/src/components/grid/DataGridColumnHeader.vue
@@ -82,7 +82,7 @@ const emit = defineEmits<{
<!-- 索引标识:显示在列名左侧 -->
<KeyRound v-if="columnIndexKind === 'primary'" class="h-3 w-3 shrink-0" :class="columnIndexColorClass(columnIndexKind)" :title="columnIndexText(columnIndexKind)" />
<Hash v-else-if="columnIndexKind && columnIndexKind !== 'none'" class="h-3 w-3 shrink-0" :class="columnIndexColorClass(columnIndexKind)" :title="columnIndexText(columnIndexKind)" />
- <LightTooltip :text="name" side="bottom" :side-offset="4" :disabled="tooltipDisabled">
+ <LightTooltip :text="name" side="bottom" :side-offset="4" :disabled="tooltipDisabled" surface="popover" content-class="border border-border shadow-md">
<span data-column-tooltip-trigger class="flex min-w-0 flex-1 flex-col overflow-hidden">
<span class="flex min-w-0 items-center gap-1 leading-4">
<span class="min-w-0 truncate">{{ name }}</span>
@@ -94,32 +94,32 @@ const emit = defineEmits<{
</span>
<template #content>
<div class="dbx-column-info-tooltip grid min-w-56 grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-1 px-3 py-2">
- <span class="text-background-solid/70">{{ columnNameLabel }}</span>
+ <span class="text-muted-foreground">{{ columnNameLabel }}</span>
<span class="flex min-w-0 items-center gap-2">
<span class="min-w-0 flex-1 truncate font-mono">{{ name }}</span>
- <button data-column-header-copy-name type="button" class="flex h-5 w-5 shrink-0 items-center justify-center rounded hover:bg-background/10" :title="copyColumnNameLabel" @click.stop="emit('copyName')">
+ <button data-column-header-copy-name type="button" class="flex h-5 w-5 shrink-0 items-center justify-center rounded hover:bg-accent hover:text-accent-foreground" :title="copyColumnNameLabel" @click.stop="emit('copyName')">
<Copy class="h-3 w-3" />
</button>
</span>
<template v-if="tooltipColumnType ?? columnType">
- <span class="text-background-solid/70">{{ columnTypeLabel }}</span>
+ <span class="text-muted-foreground">{{ columnTypeLabel }}</span>
<span :class="typeClass">{{ tooltipColumnType ?? columnType }}</span>
</template>
<template v-if="tooltipColumnComment ?? columnComment">
- <span class="text-background-solid/70">{{ columnCommentLabel }}</span>
+ <span class="text-muted-foreground">{{ columnCommentLabel }}</span>
<span class="flex min-w-0 items-start gap-2">
<span class="min-w-0 flex-1 break-words">{{ tooltipColumnComment ?? columnComment }}</span>
- <button data-column-header-copy-comment type="button" class="flex h-5 w-5 shrink-0 items-center justify-center rounded hover:bg-background/10" :title="copyColumnCommentLabel" @click.stop="emit('copyComment')">
+ <button data-column-header-copy-comment type="button" class="flex h-5 w-5 shrink-0 items-center justify-center rounded hover:bg-accent hover:text-accent-foreground" :title="copyColumnCommentLabel" @click.stop="emit('copyComment')">
<Copy class="h-3 w-3" />
</button>
</span>
</template>
<template v-if="columnNullability">
- <span class="text-background-solid/70">{{ nullableLabel }}</span>
+ <span class="text-muted-foreground">{{ nullableLabel }}</span>
<span>{{ columnNullability === "nullable" ? yesLabel : noLabel }}</span>
</template>
<template v-if="columnIndexKind && columnIndexKind !== 'none'">
- <span class="text-background-solid/70">{{ columnIndexLabel }}</span>
+ <span class="text-muted-foreground">{{ columnIndexLabel }}</span>
<span class="flex items-center gap-1">
<KeyRound v-if="columnIndexKind === 'primary'" class="h-3 w-3" :class="columnIndexColorClass(columnIndexKind)" />
<Hash v-else class="h-3 w-3" :class="columnIndexColorClass(columnIndexKind)" />