diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue index e4c9035711..a1d826559f 100644 --- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue +++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue @@ -115,6 +115,7 @@ import { normalizeMcpGlobalPolicy, type ClickTableNavigationTarget, type EditorSettings, + type WebLogoPosition, type SnippetTriggerKey, type SqlCompletionTriggerMode, type SqlTableCompletionSchemaQualification, @@ -718,6 +719,7 @@ const editAppCloseUnsavedTabsMode = ref(settingsStore.e const editSavedSqlOpenTargetMode = ref(settingsStore.editorSettings.savedSqlOpenTargetMode); const editWelcomePageMode = ref(settingsStore.editorSettings.welcomePageMode); const editAppLayout = ref(settingsStore.editorSettings.appLayout); +const editWebLogoPosition = ref(settingsStore.editorSettings.webLogoPosition); const editTabLayout = ref(settingsStore.editorSettings.tabLayout); const editTabPlacement = ref(settingsStore.editorSettings.tabPlacement); const editColorizeConnectionTabs = ref(settingsStore.editorSettings.colorizeConnectionTabs); @@ -1097,6 +1099,7 @@ function currentEditorSettingsDraft(): EditorSettingsDraft { savedSqlOpenTargetMode: editSavedSqlOpenTargetMode.value, welcomePageMode: editWelcomePageMode.value, appLayout: editAppLayout.value, + webLogoPosition: editWebLogoPosition.value, tabLayout: editTabLayout.value, tabPlacement: editTabPlacement.value, colorizeConnectionTabs: editColorizeConnectionTabs.value, @@ -1777,6 +1780,7 @@ function syncEditorSettingsDraftFromStore() { editSavedSqlOpenTargetMode.value = settingsStore.editorSettings.savedSqlOpenTargetMode; editWelcomePageMode.value = settingsStore.editorSettings.welcomePageMode; editAppLayout.value = settingsStore.editorSettings.appLayout; + editWebLogoPosition.value = settingsStore.editorSettings.webLogoPosition; editTabLayout.value = settingsStore.editorSettings.tabLayout; editTabPlacement.value = settingsStore.editorSettings.tabPlacement; editColorizeConnectionTabs.value = settingsStore.editorSettings.colorizeConnectionTabs; @@ -1932,6 +1936,7 @@ const editorSettingsDraftRefs: EditorSettingsDraftRefMap = { savedSqlOpenTargetMode: editSavedSqlOpenTargetMode, welcomePageMode: editWelcomePageMode, appLayout: editAppLayout, + webLogoPosition: editWebLogoPosition, tabLayout: editTabLayout, tabPlacement: editTabPlacement, colorizeConnectionTabs: editColorizeConnectionTabs, @@ -2484,6 +2489,7 @@ function resetDefaultsForTab(tab: SettingsCategory) { editActiveCustomThemeId.value = DEFAULT_EDITOR_SETTINGS.activeCustomThemeId; editWelcomePageMode.value = DEFAULT_EDITOR_SETTINGS.welcomePageMode; editAppLayout.value = DEFAULT_EDITOR_SETTINGS.appLayout; + editWebLogoPosition.value = DEFAULT_EDITOR_SETTINGS.webLogoPosition; editTabLayout.value = DEFAULT_EDITOR_SETTINGS.tabLayout; editTabPlacement.value = DEFAULT_EDITOR_SETTINGS.tabPlacement; editColorizeConnectionTabs.value = DEFAULT_EDITOR_SETTINGS.colorizeConnectionTabs; @@ -2646,6 +2652,7 @@ function resetAllDefaults() { editSqlVariableSyntaxOverrides.value = normalizeSqlVariableSyntaxOverrides(DEFAULT_EDITOR_SETTINGS.sqlVariableSyntaxOverrides); editWelcomePageMode.value = DEFAULT_EDITOR_SETTINGS.welcomePageMode; editAppLayout.value = DEFAULT_EDITOR_SETTINGS.appLayout; + editWebLogoPosition.value = DEFAULT_EDITOR_SETTINGS.webLogoPosition; editShowTrayIcon.value = DEFAULT_DESKTOP_SETTINGS.show_tray_icon; editQuitOnClose.value = DEFAULT_DESKTOP_SETTINGS.quit_on_close; desktopCloseBehaviorResetPending.value = true; @@ -7807,6 +7814,24 @@ onUnmounted(() => {

{{ t("settings.toolbarHiddenHint") }}

+
+
+ +

+ {{ t("settings.webLogoPositionDescription") }} +

+
+ +
diff --git a/apps/desktop/src/components/layout/AppToolbar.vue b/apps/desktop/src/components/layout/AppToolbar.vue index 02c6e61c50..9281b13b0a 100644 --- a/apps/desktop/src/components/layout/AppToolbar.vue +++ b/apps/desktop/src/components/layout/AppToolbar.vue @@ -88,6 +88,7 @@ const { toast } = useToast(); const settingsStore = useSettingsStore(); const toolbarItems = computed(() => settingsStore.editorSettings.toolbarItems); +const webLogoPosition = computed(() => settingsStore.editorSettings.webLogoPosition ?? "left"); const showToolbarUpdateEntry = computed(() => toolbarItems.value.checkUpdates || props.hasUpdateAvailable); const { isMac, isDesktop, showControls, isMaximized, isFullscreen, isAlwaysOnTop, minimize, toggleMaximize, toggleAlwaysOnTop, close } = useWindowControls(); // The always-on-top control is opt-in (外观 → 工具栏): the right side of the @@ -413,6 +414,11 @@ function handleWindowResize() { } watch(collapsibleRightItemDefs, () => scheduleToolbarLayout(), { flush: "post" }); +watch( + () => settingsStore.editorSettings.webLogoPosition, + () => scheduleToolbarLayout(), + { flush: "post" }, +); watch( () => props.showSidebarExpand, () => scheduleToolbarLayout(), @@ -566,7 +572,7 @@ const toolbarStyle = computed(() => {