From ebc905a478be6509e2067d35ae3243a1f1043567 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Sun, 10 May 2026 10:11:55 +0800 Subject: [PATCH] feat(ui): add layout preference --- src/App.vue | 30 ++++++++-- src/components/editor/AiAssistant.vue | 5 +- .../editor/EditorSettingsDialog.vue | 60 ++++++++++++++++++- src/components/layout/AppSidebar.vue | 9 ++- src/components/layout/AppTabBar.vue | 52 +++++++++++++--- src/components/sidebar/TreeItem.vue | 5 -- src/i18n/locales/en.ts | 7 +++ src/i18n/locales/zh-CN.ts | 7 +++ src/stores/settingsStore.ts | 3 + src/styles/globals.css | 18 ++++++ 10 files changed, 175 insertions(+), 21 deletions(-) diff --git a/src/App.vue b/src/App.vue index 186feca95f..1495f23fbd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -115,6 +115,7 @@ const { onExecuteSql, onReloadData, onPaginate, onSort } = useDataGridActions(ac const { setupTauriListeners } = useTauriEvents({ openTableTarget }); const appVersion = ref(""); +const isClassicLayout = computed(() => settingsStore.editorSettings.appLayout === "classic"); const hasSqlFileConnections = computed(() => connectionStore.connections.some((c) => !SQL_FILE_UNSUPPORTED_TYPES.has(c.db_type)), ); @@ -511,15 +512,28 @@ onUnmounted(() => { @open-sql-file="dialogs.showSqlFileDialog.value = true" /> -
+
-
+
@@ -590,7 +604,11 @@ onUnmounted(() => {
@@ -608,7 +626,11 @@ onUnmounted(() => {
diff --git a/src/components/editor/AiAssistant.vue b/src/components/editor/AiAssistant.vue index 65910b3f13..d1a77cb9c6 100644 --- a/src/components/editor/AiAssistant.vue +++ b/src/components/editor/AiAssistant.vue @@ -463,7 +463,10 @@ function formatInlineText(text: string): string {