diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue index 3ef7a00ffa..59a7156fa4 100644 --- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue +++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue @@ -4,7 +4,38 @@ import type { Ref } from "vue"; import type { EditorView as EditorViewType } from "@codemirror/view"; import { useI18n } from "vue-i18n"; import { translateBackendError } from "@/i18n/backend-errors"; -import { AlertTriangle, ArrowLeft, Check, CheckCircle2, CircleHelp, Cloud, Copy, Download, ExternalLink, GripVertical, Loader2, Moon, PackageSearch, Palette, Pencil, Plus, RefreshCw, RotateCcw, Search, Settings, Sun, SunMoon, Terminal, Trash2, Upload, X } from "@lucide/vue"; +import { + AlertTriangle, + ArrowLeft, + Check, + CheckCircle2, + ChevronDown, + ChevronUp, + CircleHelp, + Cloud, + Copy, + Download, + ExternalLink, + Eye, + Filter, + GripVertical, + Loader2, + Moon, + PackageSearch, + Palette, + Pencil, + Plus, + RefreshCw, + RotateCcw, + Search, + Settings, + Sun, + SunMoon, + Terminal, + Trash2, + Upload, + X, +} from "@lucide/vue"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog"; @@ -323,7 +354,8 @@ const editShortcuts = ref(normalizeShortcutSettings(settingsStore.editorSettings function translateWithExecuteShortcut(key: string): string { return t(key, { shortcut: formatShortcutDisplay(editShortcuts.value.executeSql) }); } -const executeModeLabel = computed(() => translateWithExecuteShortcut("settings.executeMode")); +const executeModeLabel = computed(() => t("settings.executeMode")); +const executeModeDescription = computed(() => translateWithExecuteShortcut("settings.executeModeDescription")); const editExecuteAllOnBlankLine = ref(settingsStore.editorSettings.executeAllOnBlankLine); const editShowExecutionTargetPicker = ref(settingsStore.editorSettings.showExecutionTargetPicker); const editShowStatementRunButtons = ref(settingsStore.editorSettings.showStatementRunButtons); @@ -335,6 +367,14 @@ const editInsertSpaceAfterCompletion = ref(settingsStore.editorSettings.insertSp const editSortCompletionColumnsAlphabetically = ref(settingsStore.editorSettings.sortCompletionColumnsAlphabetically); const editSelectFirstCompletionOnOpen = ref(settingsStore.editorSettings.selectFirstCompletionOnOpen); const editCompletionTriggerMode = ref(settingsStore.editorSettings.completionTriggerMode); +const completionTriggerModeDescription = computed(() => { + const key = { + manual: "settings.completionTriggerModeManualDescription", + "require-prefix": "settings.completionTriggerModeRequirePrefixDescription", + positional: "settings.completionTriggerModePositionalDescription", + }[editCompletionTriggerMode.value]; + return t(key, { shortcut: formatShortcutDisplay(editShortcuts.value.triggerCompletion) }); +}); const editWordWrap = ref(settingsStore.editorSettings.wordWrap); const editVimModeEnabled = ref(settingsStore.editorSettings.vimModeEnabled); const editAutoCloseBrackets = ref(settingsStore.editorSettings.autoCloseBrackets); @@ -370,6 +410,7 @@ const editShowIndexIndicatorsInHeader = ref(settingsStore.editorSettings.showInd const editCompactColumnHeaderActions = ref(settingsStore.editorSettings.compactColumnHeaderActions); const editDataGridQuickEntry = ref(settingsStore.editorSettings.dataGridQuickEntry); const editDataGridFilterEditorView = ref(settingsStore.editorSettings.dataGridFilterEditorView); +const dataGridFilterViewPreviewExpanded = ref(true); const editDataGridTextFilterPanelHeight = ref(settingsStore.editorSettings.dataGridTextFilterPanelHeight); const editDataGridAutoTransposeSingleRow = ref(settingsStore.editorSettings.dataGridAutoTransposeSingleRow); const editDataGridCellDetailButtonVisible = ref(settingsStore.editorSettings.dataGridCellDetailButtonVisible); @@ -619,14 +660,6 @@ const snippetDialogOpen = ref(false); const snippetEditingId = ref(null); const snippetForm = ref({ label: "", prefix: "", body: "" }); const snippetFormPrefixError = ref(""); -const iconThemeDescTruncated = { - default: ref(false), - black: ref(false), -}; -const iconThemeDescRef = { - default: ref(null), - black: ref(null), -}; const iconThemeBlackDescriptionText = computed(() => (isMacOS() ? t("settings.iconThemeBlackDescriptionMac") : t("settings.iconThemeBlackDescription"))); const layoutDescTruncated = { separated: ref(false), @@ -640,11 +673,6 @@ let layoutDescObservers: Record = { separated: undefined, classic: undefined, }; -let iconThemeDescObservers: Record = { - default: undefined, - black: undefined, -}; - function observeElementTruncation(el: Ref, truncated: Ref) { if (!el.value) return; @@ -659,25 +687,17 @@ function observeElementTruncation(el: Ref, truncated: Ref; truncated: Ref }>) { nextTick(() => { for (const item of items) { @@ -2591,7 +2604,6 @@ watch(activeSettingsTab, async (tab) => { if (tab === "about" && !appSupportInfo.value) void refreshAppSupportInfo(); if (tab === "appearance") { checkLayoutDescTruncation(); - checkIconThemeDescTruncation(); } const result = pendingSettingsSearchResult; if (result) { @@ -2620,7 +2632,6 @@ watch( onMounted(() => { void refreshWebDavPasswordStatus(); checkLayoutDescTruncation(); - checkIconThemeDescTruncation(); initTruncationObservers(); }); @@ -3940,6 +3951,48 @@ onUnmounted(() => { +
+
+
+ + + {{ t("settings.showStatementRunButtonsDescription") }} + +
+ +
+ +
+
+ + + {{ t("settings.showLineNumbersDescription") }} + +
+ +
+ +
+
+ + + {{ t("settings.showCurrentStatementFrameDescription") }} + +
+ +
+ +
+
+ + + {{ t("settings.sqlSemanticDiagnosticsEnabledDescription") }} + +
+ +
+
+
@@ -3953,11 +4006,16 @@ onUnmounted(() => { -
-
- +
+
+
+ +

+ {{ executeModeDescription }} +

+
+ + + + + {{ t("settings.completionTriggerModeManual") }} + {{ t("settings.completionTriggerModeRequirePrefix") }} + {{ t("settings.completionTriggerModePositional") }} + +
- +

- {{ t("settings.showCurrentStatementFrameDescription") }} + {{ t("settings.selectFirstCompletionOnOpenDescription") }}

- +
+
+
+ +

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

+
+ +
+ +
+
+ +

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

+
+ +
+ +
+
+ +

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

+
+ +
+ +
+
+ +

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

+
+ +
+
+ + + +
@@ -4066,83 +4191,6 @@ onUnmounted(() => { -
-
- {{ t("settings.sqlCompletionSection") }} -
- -
-
-
- -

- {{ t("settings.autoCloseBracketsDescription") }} -

-
- -
- -
-
- -

- {{ t("settings.insertSpaceAfterCompletionDescription") }} -

-
- -
- -
-
- -

- {{ t("settings.sortCompletionColumnsAlphabeticallyDescription") }} -

-
- -
- -
-
- -

- {{ t("settings.selectFirstCompletionOnOpenDescription") }} -

-
- -
- -
-
- -

- {{ t("settings.autoAliasTablesDescription") }} -

-
- -
- -
- - -

- {{ t("settings.completionTriggerModeDescription") }} -

-
-
-
- - -
@@ -4162,85 +4210,41 @@ onUnmounted(() => {
-
-
- -

- {{ t("settings.sqlSemanticDiagnosticsEnabledDescription") }} -

-
- -
+
+
+
+
+ +

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

+
+ +
-
-
- -

- {{ t("settings.confirmDangerousSqlExecutionDescription") }} -

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

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

+
+ +
- -
- -
-
- -

- {{ t("settings.continueOnErrorOnBatchDescription") }} -

-
- -
- -
-
- -

- {{ t("settings.confirmUnsavedSqlCloseDescription") }} -

-
- -
- -
-
- - - {{ t("settings.appCloseUnsavedTabsModeDescription") }} - -
- -

- {{ t("settings.appCloseUnsavedTabsModeHint") }} -

-
- -
-
- -

- {{ t("settings.clickTableNavigationTargetDescription") }} -

-
- -
- -
-
- -

- {{ t("settings.prefillNewQueryWithSelectDescription") }} -

-
-
@@ -4614,6 +4618,38 @@ onUnmounted(() => {
+ +
+ +
+ + + + + + + {{ t("settings.iconThemeDefaultDescription") }} + + + + + + + + + + {{ iconThemeBlackDescriptionText }} + + + +
+
@@ -4690,57 +4726,6 @@ onUnmounted(() => {
- -
- -
- - -
-
-
@@ -4986,6 +4971,36 @@ onUnmounted(() => {
+
+
+
+ +

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

+
+ +
+ +
+
+ +

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

+
+ +
+
+
+
+ + + {{ t("settings.sidebarOpenDatabaseOnSingleClickDescription") }} + +
+ +
@@ -5004,15 +5019,6 @@ onUnmounted(() => {
-
-
- - - {{ t("settings.sidebarOpenDatabaseOnSingleClickDescription") }} - -
- -
@@ -5175,6 +5181,136 @@ onUnmounted(() => {
+
+
+
+
+ +

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

+
+ +
+ +
+ + + +
+
+ +
+
+
+ + + +
+
+ WHERE + status = 'ACTIVE' +
+
+ ORDER BY + id +
+
+ +
+
+
+ {{ t("grid.filter") }} + +
+
+ status + = + ACTIVE +
+
+
+ +
+
+
+ + status + = + ACTIVE + +
+
+
+ {{ t("grid.filterSqlPreview") }} + WHERE status = 'ACTIVE' + {{ t("grid.applyFilter") }} +
+
+ +
+
+
+ + + status + = + ACTIVE + +
+
+
+ {{ t("grid.filterSqlPreview") }} + WHERE status = 'ACTIVE' + {{ t("grid.applyFilter") }} +
+
+
+
+ + +
{{ t("settings.dataGridDisplay") }} @@ -5194,26 +5330,6 @@ onUnmounted(() => {
-
-
- -

- {{ t("settings.dataGridFilterViewDescription") }} -

-
- -