Disable and hide unnecessary settings options (#2138)

This commit is contained in:
Felix Häusler 2020-05-31 09:20:32 +02:00 committed by GitHub
parent 954de817de
commit 6263d18eb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 35 deletions

View File

@ -7,22 +7,26 @@
"autoSaveDelay": { "autoSaveDelay": {
"description": "General--The time in ms after a change that the file is saved.", "description": "General--The time in ms after a change that the file is saved.",
"type": "number", "type": "number",
"minimum": 1000 "minimum": 1000,
"default": 5000
}, },
"titleBarStyle": { "titleBarStyle": {
"description": "General--The title bar style (Windows and Linux system only).", "description": "General--The title bar style (Windows and Linux system only).",
"enum": [ "enum": [
"custom", "custom",
"native" "native"
] ],
"default": "custom"
}, },
"openFilesInNewWindow": { "openFilesInNewWindow": {
"description": "General--Open files in a new window.", "description": "General--Open files in a new window.",
"type": "boolean" "type": "boolean",
"default": false
}, },
"openFolderInNewWindow": { "openFolderInNewWindow": {
"description": "General--Open folder via menu in a new window.", "description": "General--Open folder via menu in a new window.",
"type": "boolean" "type": "boolean",
"default": false
}, },
"hideScrollbar": { "hideScrollbar": {
"description": "General--Whether to hide scrollbars.", "description": "General--Whether to hide scrollbars.",
@ -44,7 +48,8 @@
"modified", "modified",
"created", "created",
"title" "title"
] ],
"default": "modified"
}, },
"startUpAction": { "startUpAction": {
"description": "General--The action after Mark Text startup, open the last edited content, open the specified folder or blank page", "description": "General--The action after Mark Text startup, open the last edited content, open the specified folder or blank page",
@ -52,7 +57,8 @@
"folder", "folder",
"lastState", "lastState",
"blank" "blank"
] ],
"default": "blank"
}, },
"defaultDirectoryToOpen": { "defaultDirectoryToOpen": {
"description": "General--The default directory that should be opened on startup when startUp=folder.", "description": "General--The default directory that should be opened on startup when startUp=folder.",
@ -60,12 +66,14 @@
}, },
"language": { "language": {
"description": "General--The language Mark Text use.", "description": "General--The language Mark Text use.",
"type": "string" "type": "string",
"default": "en"
}, },
"editorFontFamily": { "editorFontFamily": {
"description": "Editor--editor font family", "description": "Editor--editor font family",
"type": "string", "type": "string",
"pattern": "^[^\\s]+((-|\\s)*[^\\s])*$" "pattern": "^[^\\s]+((-|\\s)*[^\\s])*$",
"default": "Open Sans"
}, },
"fontSize": { "fontSize": {
"description": "Editor--Font size in pixels", "description": "Editor--Font size in pixels",
@ -84,7 +92,8 @@
"editorLineWidth": { "editorLineWidth": {
"description": "Editor--Defines the maximum editor area width. An empty string or suffixes of ch (characters), px (pixels) or % (percentage) are allowed.", "description": "Editor--Defines the maximum editor area width. An empty string or suffixes of ch (characters), px (pixels) or % (percentage) are allowed.",
"type": "string", "type": "string",
"pattern": "^(?:$|[0-9]+(?:ch|px|%)$)" "pattern": "^(?:$|[0-9]+(?:ch|px|%)$)",
"default": ""
}, },
"codeFontSize": { "codeFontSize": {
"description": "Editor--Font size in code Block, the range is 12 ~ 18", "description": "Editor--Font size in code Block, the range is 12 ~ 18",
@ -96,7 +105,8 @@
"codeFontFamily": { "codeFontFamily": {
"description": "Editor--Font family used in code block", "description": "Editor--Font family used in code block",
"type": "string", "type": "string",
"pattern": "^[^\\s]+((-|\\s)*[^\\s])*$" "pattern": "^[^\\s]+((-|\\s)*[^\\s])*$",
"default": "DejaVu Sans Mono"
}, },
"codeBlockLineNumbers": { "codeBlockLineNumbers": {
"description": "Editor--Whether to show the line numbers", "description": "Editor--Whether to show the line numbers",
@ -105,19 +115,23 @@
}, },
"trimUnnecessaryCodeBlockEmptyLines": { "trimUnnecessaryCodeBlockEmptyLines": {
"description": "Editor--Trim the beginning and ending empty lines in code block", "description": "Editor--Trim the beginning and ending empty lines in code block",
"type": "boolean" "type": "boolean",
"default": true
}, },
"autoPairBracket": { "autoPairBracket": {
"description": "Editor--Automatically brackets when editing", "description": "Editor--Automatically brackets when editing",
"type": "boolean" "type": "boolean",
"default": true
}, },
"autoPairMarkdownSyntax": { "autoPairMarkdownSyntax": {
"description": "Editor--Autocomplete markdown syntax", "description": "Editor--Autocomplete markdown syntax",
"type": "boolean" "type": "boolean",
"default": true
}, },
"autoPairQuote": { "autoPairQuote": {
"description": "Editor--Automatic completion of quotes", "description": "Editor--Automatic completion of quotes",
"type": "boolean" "type": "boolean",
"default": true
}, },
"endOfLine": { "endOfLine": {
"description": "Editor--The newline character used at the end of each line. The default value is default, which selects your operating system's default newline character.", "description": "Editor--The newline character used at the end of each line. The default value is default, which selects your operating system's default newline character.",
@ -190,11 +204,13 @@
"enum": [ "enum": [
"ltr", "ltr",
"rtl" "rtl"
] ],
"default": "ltr"
}, },
"hideQuickInsertHint": { "hideQuickInsertHint": {
"description": "Editor--Hide hint for quickly creating paragraphs", "description": "Editor--Hide hint for quickly creating paragraphs",
"type": "boolean" "type": "boolean",
"default": false
}, },
"hideLinkPopup": { "hideLinkPopup": {
"description": "Editor--Hide link popup when the cursor is hover on the link", "description": "Editor--Hide link popup when the cursor is hover on the link",
@ -208,7 +224,8 @@
}, },
"preferLooseListItem": { "preferLooseListItem": {
"description": "Markdown--The preferred list type", "description": "Markdown--The preferred list type",
"type": "boolean" "type": "boolean",
"default": true
}, },
"bulletListMarker": { "bulletListMarker": {
"description": "Markdown--The marker used in bullet list", "description": "Markdown--The marker used in bullet list",
@ -216,25 +233,29 @@
"-", "-",
"*", "*",
"+" "+"
] ],
"default": "-"
}, },
"orderListDelimiter": { "orderListDelimiter": {
"description": "Markdown--The dilimiter used in order list", "description": "Markdown--The dilimiter used in order list",
"enum": [ "enum": [
".", ".",
")" ")"
] ],
"default": "."
}, },
"preferHeadingStyle": { "preferHeadingStyle": {
"description": "Markdown--The preferred heading style in Mark Text", "description": "Markdown--The preferred heading style in Mark Text",
"enum": [ "enum": [
"atx", "atx",
"setext" "setext"
] ],
"default": "atx"
}, },
"tabSize": { "tabSize": {
"description": "Markdown--Replace the tab with x spaces", "description": "Markdown--Replace the tab with x spaces",
"type": "number" "type": "number",
"default": 4
}, },
"listIndentation": { "listIndentation": {
"description": "Markdown--Select the indent of list", "description": "Markdown--Select the indent of list",
@ -245,7 +266,8 @@
2, 2,
3, 3,
4 4
] ],
"default": 1
}, },
"frontmatterType": { "frontmatterType": {
"description": "Markdown--The frontmatter type", "description": "Markdown--The frontmatter type",
@ -254,7 +276,8 @@
"+", "+",
";", ";",
"{" "{"
] ],
"default": "-"
}, },
"superSubScript": { "superSubScript": {
"description": "Markdown-Enable pandoc's markdown extension superscript and subscript.", "description": "Markdown-Enable pandoc's markdown extension superscript and subscript.",
@ -271,11 +294,13 @@
"enum": [ "enum": [
"hand", "hand",
"simple" "simple"
] ],
"default": "hand"
}, },
"theme": { "theme": {
"description": "Theme--Select the theme used in Mark Text", "description": "Theme--Select the theme used in Mark Text",
"type": "string" "type": "string",
"default": "light"
}, },
"autoSwitchTheme": { "autoSwitchTheme": {
"description": "Theme--Automatically adjust application theme according system.", "description": "Theme--Automatically adjust application theme according system.",
@ -317,46 +342,56 @@
"upload", "upload",
"folder", "folder",
"path" "path"
] ],
"default": "path"
}, },
"sideBarVisibility": { "sideBarVisibility": {
"description": "View--Whether the side bar is visible.", "description": "View--Whether the side bar is visible.",
"type": "boolean" "type": "boolean",
"default": false
}, },
"tabBarVisibility": { "tabBarVisibility": {
"description": "View--Whether the tabs are shown.", "description": "View--Whether the tabs are shown.",
"type": "boolean" "type": "boolean",
"default": false
}, },
"sourceCodeModeEnabled": { "sourceCodeModeEnabled": {
"description": "View--Whether the source-code mode is enabled by default.", "description": "View--Whether the source-code mode is enabled by default.",
"type": "boolean" "type": "boolean",
"default": false
}, },
"searchExclusions": { "searchExclusions": {
"description": "Searcher--List of glob patterns to exclude from search.", "description": "Searcher--List of glob patterns to exclude from search.",
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string"
} },
"default": []
}, },
"searchMaxFileSize": { "searchMaxFileSize": {
"description": "Searcher--The maximal file size (<maxFileSize><suffix>). Suffixes of K, M or G are allowed if not suffix is given the number is treated as bytes.", "description": "Searcher--The maximal file size (<maxFileSize><suffix>). Suffixes of K, M or G are allowed if not suffix is given the number is treated as bytes.",
"type": "string", "type": "string",
"pattern": "^(?:$|[0-9]+(?:K|M|G)?$)" "pattern": "^(?:$|[0-9]+(?:K|M|G)?$)",
"default": ""
}, },
"searchIncludeHidden": { "searchIncludeHidden": {
"description": "Searcher--Whether to search in hidden files and directories.", "description": "Searcher--Whether to search in hidden files and directories.",
"type": "boolean" "type": "boolean",
"default": false
}, },
"searchNoIgnore": { "searchNoIgnore": {
"description": "Searcher--Whether to ignore ignore files like .gitignore.", "description": "Searcher--Whether to ignore ignore files like .gitignore.",
"type": "boolean" "type": "boolean",
"default": false
}, },
"searchFollowSymlinks": { "searchFollowSymlinks": {
"description": "Searcher--Whether symlinks should be followed.", "description": "Searcher--Whether symlinks should be followed.",
"type": "boolean" "type": "boolean",
"default": true
}, },
"watcherUsePolling": { "watcherUsePolling": {
"description": "Watcher--Whether to use polling. Polling may leads to high CPU utilization but is necessary to watch files over a network.", "description": "Watcher--Whether to use polling. Polling may leads to high CPU utilization but is necessary to watch files over a network.",
"type": "boolean" "type": "boolean",
"default": false
} }
} }

View File

@ -59,7 +59,10 @@
<section class="startup-action-ctrl"> <section class="startup-action-ctrl">
<div>What Mark Text should do on startup.</div> <div>What Mark Text should do on startup.</div>
<el-radio-group v-model="startUpAction"> <el-radio-group v-model="startUpAction">
<!--
Hide "lastState" for now (#2064).
<el-radio class="ag-underdevelop" label="lastState">Open the last window state</el-radio> <el-radio class="ag-underdevelop" label="lastState">Open the last window state</el-radio>
-->
<el-radio label="folder">Open the default directory<span>: {{defaultDirectoryToOpen}}</span></el-radio> <el-radio label="folder">Open the default directory<span>: {{defaultDirectoryToOpen}}</span></el-radio>
<el-button size="small" @click="selectDefaultDirectoryToOpen">Select Folder</el-button> <el-button size="small" @click="selectDefaultDirectoryToOpen">Select Folder</el-button>
<el-radio label="blank">Open a blank page</el-radio> <el-radio label="blank">Open a blank page</el-radio>

View File

@ -20,6 +20,7 @@
:onChange="value => onSelectChange('spellcheckerNoUnderline', value)" :onChange="value => onSelectChange('spellcheckerNoUnderline', value)"
></bool> ></bool>
<bool <bool
v-show="isOsx && !spellcheckerIsHunspell"
description="Automatically identify the used language. This feature is currently unavailable when using Hunspell or if mistake underlining is disabled." description="Automatically identify the used language. This feature is currently unavailable when using Hunspell or if mistake underlining is disabled."
:bool="spellcheckerAutoDetectLanguage" :bool="spellcheckerAutoDetectLanguage"
:disable="!spellcheckerEnabled" :disable="!spellcheckerEnabled"