diff --git a/apps/desktop/src/components/editor/EditorSettingsDialog.vue b/apps/desktop/src/components/editor/EditorSettingsDialog.vue index d7710fdb8..9dc60f3a7 100644 --- a/apps/desktop/src/components/editor/EditorSettingsDialog.vue +++ b/apps/desktop/src/components/editor/EditorSettingsDialog.vue @@ -76,9 +76,7 @@ const systemFontsLoading = ref(false); const systemFontsLoaded = ref(false); // --- Snippet state --- -const editSnippets = ref( - settingsStore.editorSettings.snippets.map((s) => ({ ...s })), -); +const editSnippets = ref(settingsStore.editorSettings.snippets.map((s) => ({ ...s }))); const snippetDialogOpen = ref(false); const snippetEditingId = ref(null); @@ -105,9 +103,7 @@ function saveSnippet() { snippetFormPrefixError.value = "Prefix is required."; return; } - const duplicate = editSnippets.value.find( - (s) => s.prefix === prefix && s.id !== snippetEditingId.value, - ); + const duplicate = editSnippets.value.find((s) => s.prefix === prefix && s.id !== snippetEditingId.value); if (duplicate) { snippetFormPrefixError.value = "Prefix must be unique."; return; @@ -338,7 +334,16 @@ function setSidebarActivation(value: "single" | "double") { const activeSettingsTab = ref("editor"); const isWeb = !isTauriRuntime(); const displayedAppVersion = computed(() => (props.appVersion ? `v${props.appVersion}` : "")); -type SettingsCategory = "editor" | "appearance" | "navigation" | "redis" | "shortcuts" | "snippets" | "ai" | "security" | "about"; +type SettingsCategory = + | "editor" + | "appearance" + | "navigation" + | "redis" + | "shortcuts" + | "snippets" + | "ai" + | "security" + | "about"; const settingsCategoryNav = computed<{ value: SettingsCategory; label: string }[]>(() => [ { value: "editor", label: t("settings.editorTab") }, { value: "appearance", label: t("settings.appearanceTab") }, @@ -1059,9 +1064,9 @@ watch(
-

{{ t('settings.snippetsDescription') }}

+

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

@@ -1069,9 +1074,9 @@ watch( - - - + + + @@ -1103,7 +1108,7 @@ watch(
@@ -1496,21 +1501,29 @@ watch( - {{ snippetEditingId ? t('settings.snippetsEditTitle') : t('settings.snippetsAddTitle') }} + {{ snippetEditingId ? t("settings.snippetsEditTitle") : t("settings.snippetsAddTitle") }}
- - + +
- - + +

{{ snippetFormPrefixError }}

- +
{{ t('settings.snippetsLabel') }}{{ t('settings.snippetsPrefix') }}{{ t('settings.snippetsBody') }}{{ t("settings.snippetsLabel") }}{{ t("settings.snippetsPrefix") }}{{ t("settings.snippetsBody") }}