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。

feat(grid): always show sort button in column header regardless of compact mode

t8y266ce9a368e55
diff --git a/apps/desktop/src/components/grid/DataGrid.vue b/apps/desktop/src/components/grid/DataGrid.vue
index 6b83627552..8ff8e31a2c 100644
--- a/apps/desktop/src/components/grid/DataGrid.vue
+++ b/apps/desktop/src/components/grid/DataGrid.vue
@@ -4272,7 +4272,6 @@ defineExpose({
</span>
</span>
<button
- v-if="!compactColumnHeaderActions"
type="button"
class="flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground"
:class="
@@ -4310,12 +4309,10 @@ defineExpose({
type="button"
class="flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground"
:class="
- sortCol === col && sortColIndex === actualColumnIndex(colIdx)
- ? 'text-primary opacity-100'
- : columnHasFormatter(actualColumnIndex(colIdx)) ||
- localFilterActive(actualColumnIndex(colIdx))
- ? 'text-primary opacity-90'
- : 'opacity-80'
+ columnHasFormatter(actualColumnIndex(colIdx)) ||
+ localFilterActive(actualColumnIndex(colIdx))
+ ? 'text-primary opacity-90'
+ : 'opacity-80'
"
:title="t('grid.columnActions')"
@click.stop
@@ -4329,29 +4326,6 @@ defineExpose({
@click.stop
@keydown.stop
>
- <DropdownMenuItem
- class="gap-1 px-1.5 py-0.5 text-xs"
- @click="applyHeaderSort(col, actualColumnIndex(colIdx), 'asc')"
- >
- <ArrowUp class="h-3 w-3" />
- {{ t("grid.sortAscending") }}
- </DropdownMenuItem>
- <DropdownMenuItem
- class="gap-1 px-1.5 py-0.5 text-xs"
- @click="applyHeaderSort(col, actualColumnIndex(colIdx), 'desc')"
- >
- <ArrowDown class="h-3 w-3" />
- {{ t("grid.sortDescending") }}
- </DropdownMenuItem>
- <DropdownMenuItem
- class="gap-1 px-1.5 py-0.5 text-xs"
- :disabled="!sortCol"
- @click="applyHeaderSort(col, actualColumnIndex(colIdx), null)"
- >
- <ArrowUpDown class="h-3 w-3" />
- {{ t("grid.clearSort") }}
- </DropdownMenuItem>
- <DropdownMenuSeparator />
<DropdownMenuItem
class="gap-1 px-1.5 py-0.5 text-xs"
:disabled="!formatterKeyForColumn(col)"