fix(toolbar): sync SQL file tree visibility setting
Co-authored-by: zero <zero@zeroMacmini.local>
This commit is contained in:
1 parent
3161efe95f
commit
f41c7dd6a0
11 files changed
+35
-9
No files matched your search
@@ -3012,6 +3012,7 @@ onUnmounted(cleanupPreviewEditor);
|
||||
{ key: 'dataCompare', label: t('dataCompare.title') },
|
||||
{ key: 'checkUpdates', label: t('updates.check') },
|
||||
{ key: 'sqlLibrary', label: t('sqlLibrary.title') },
|
||||
{ key: 'sqlFileTree', label: t('sqlFileTree.title') },
|
||||
{ key: 'history', label: t('history.title') },
|
||||
{ key: 'ai', label: 'AI' },
|
||||
{ key: 'theme', label: t('toolbar.theme') },
|
||||
|
||||
@@ -146,6 +146,15 @@ const collapsibleRightItemDefs = computed(() => {
|
||||
disabled: false,
|
||||
});
|
||||
}
|
||||
if (toolbarItems.value.sqlFileTree) {
|
||||
items.push({
|
||||
key: "sqlFileTree",
|
||||
label: t("sqlFileTree.title"),
|
||||
icon: FolderTree,
|
||||
action: () => emit("toggle-sql-file-panel"),
|
||||
disabled: false,
|
||||
});
|
||||
}
|
||||
if (toolbarItems.value.history) {
|
||||
items.push({
|
||||
key: "history",
|
||||
@@ -450,9 +459,9 @@ const toolbarDropdownTriggerClass = `inline-flex h-8 items-center gap-1 rounded-
|
||||
<TooltipContent>{{ t("sqlLibrary.title") }}</TooltipContent>
|
||||
</Tooltip>
|
||||
|
||||
<Tooltip>
|
||||
<Tooltip v-if="toolbarItems.sqlFileTree">
|
||||
<TooltipTrigger as-child>
|
||||
<Button variant="ghost" size="icon" class="h-8 w-8 shrink-0" :class="{ 'bg-accent': showSqlFilePanel }" @click="emit('toggle-sql-file-panel')">
|
||||
<Button v-show="isRightItemVisible('sqlFileTree')" variant="ghost" size="icon" class="h-8 w-8 shrink-0" :class="{ 'bg-accent': showSqlFilePanel }" @click="emit('toggle-sql-file-panel')">
|
||||
<FolderTree class="h-4 w-4" />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
|
||||
Reference in new issue
Block a user