diff --git a/src/main/services/i18n/locales/en/preferences.json b/src/main/services/i18n/locales/en/preferences.json index 87fc2000..ec427cbe 100644 --- a/src/main/services/i18n/locales/en/preferences.json +++ b/src/main/services/i18n/locales/en/preferences.json @@ -19,6 +19,7 @@ "highlightLine": "Highlight Line", "highlightGutter": "Highlight Gutter", "matchBrackets": "Match Brackets", + "showFragments": "Always Show Fragments", "prettier": { "label": "Prettier", "trailingComma": { diff --git a/src/main/store/module/preferences.ts b/src/main/store/module/preferences.ts index c9183ff2..6c812f84 100644 --- a/src/main/store/module/preferences.ts +++ b/src/main/store/module/preferences.ts @@ -25,7 +25,8 @@ export default new Store({ singleQuote: true, highlightLine: false, highlightGutter: false, - matchBrackets: false + matchBrackets: false, + showFragments: false }, screenshot: { background: false, diff --git a/src/renderer/components/preferences/EditorPreferences.vue b/src/renderer/components/preferences/EditorPreferences.vue index 1519db1f..4781d6fb 100644 --- a/src/renderer/components/preferences/EditorPreferences.vue +++ b/src/renderer/components/preferences/EditorPreferences.vue @@ -37,6 +37,12 @@ name="matchBrackets" /> + + +

{{ i18n.t('preferences:editor.prettier.label') }}

state.selected?.content?.length, tagsCount: state => state.selected?.tagsIds?.length, isFragmentsShow (): boolean { - return this.fragmentCount ? this.fragmentCount > 1 : false + const appStore = useAppStore() + if (appStore.editor.showFragments === true) return true + else return this.fragmentCount ? this.fragmentCount > 1 : false }, isTagsShow (): boolean { const appStore = useAppStore() diff --git a/src/shared/types/renderer/store/app.d.ts b/src/shared/types/renderer/store/app.d.ts index c7d7c963..1bd54241 100644 --- a/src/shared/types/renderer/store/app.d.ts +++ b/src/shared/types/renderer/store/app.d.ts @@ -37,6 +37,7 @@ export interface EditorSettings { highlightLine: boolean highlightGutter: boolean matchBrackets: boolean + showFragments: boolean } export interface ScreenshotSettings {