Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable and hide unnecessary settings options #2138

Merged
merged 1 commit into from
May 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 70 additions & 35 deletions src/main/preferences/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@
"autoSaveDelay": {
"description": "General--The time in ms after a change that the file is saved.",
"type": "number",
"minimum": 1000
"minimum": 1000,
"default": 5000
},
"titleBarStyle": {
"description": "General--The title bar style (Windows and Linux system only).",
"enum": [
"custom",
"native"
]
],
"default": "custom"
},
"openFilesInNewWindow": {
"description": "General--Open files in a new window.",
"type": "boolean"
"type": "boolean",
"default": false
},
"openFolderInNewWindow": {
"description": "General--Open folder via menu in a new window.",
"type": "boolean"
"type": "boolean",
"default": false
},
"hideScrollbar": {
"description": "General--Whether to hide scrollbars.",
Expand All @@ -44,28 +48,32 @@
"modified",
"created",
"title"
]
],
"default": "modified"
},
"startUpAction": {
"description": "General--The action after Mark Text startup, open the last edited content, open the specified folder or blank page",
"enum": [
"folder",
"lastState",
"blank"
]
],
"default": "blank"
},
"defaultDirectoryToOpen": {
"description": "General--The default directory that should be opened on startup when startUp=folder.",
"type": "string"
},
"language": {
"description": "General--The language Mark Text use.",
"type": "string"
"type": "string",
"default": "en"
},
"editorFontFamily": {
"description": "Editor--editor font family",
"type": "string",
"pattern": "^[^\\s]+((-|\\s)*[^\\s])*$"
"pattern": "^[^\\s]+((-|\\s)*[^\\s])*$",
"default": "Open Sans"
},
"fontSize": {
"description": "Editor--Font size in pixels",
Expand All @@ -84,7 +92,8 @@
"editorLineWidth": {
"description": "Editor--Defines the maximum editor area width. An empty string or suffixes of ch (characters), px (pixels) or % (percentage) are allowed.",
"type": "string",
"pattern": "^(?:$|[0-9]+(?:ch|px|%)$)"
"pattern": "^(?:$|[0-9]+(?:ch|px|%)$)",
"default": ""
},
"codeFontSize": {
"description": "Editor--Font size in code Block, the range is 12 ~ 18",
Expand All @@ -96,7 +105,8 @@
"codeFontFamily": {
"description": "Editor--Font family used in code block",
"type": "string",
"pattern": "^[^\\s]+((-|\\s)*[^\\s])*$"
"pattern": "^[^\\s]+((-|\\s)*[^\\s])*$",
"default": "DejaVu Sans Mono"
},
"codeBlockLineNumbers": {
"description": "Editor--Whether to show the line numbers",
Expand All @@ -105,19 +115,23 @@
},
"trimUnnecessaryCodeBlockEmptyLines": {
"description": "Editor--Trim the beginning and ending empty lines in code block",
"type": "boolean"
"type": "boolean",
"default": true
},
"autoPairBracket": {
"description": "Editor--Automatically brackets when editing",
"type": "boolean"
"type": "boolean",
"default": true
},
"autoPairMarkdownSyntax": {
"description": "Editor--Autocomplete markdown syntax",
"type": "boolean"
"type": "boolean",
"default": true
},
"autoPairQuote": {
"description": "Editor--Automatic completion of quotes",
"type": "boolean"
"type": "boolean",
"default": true
},
"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.",
Expand Down Expand Up @@ -189,11 +203,13 @@
"enum": [
"ltr",
"rtl"
]
],
"default": "ltr"
},
"hideQuickInsertHint": {
"description": "Editor--Hide hint for quickly creating paragraphs",
"type": "boolean"
"type": "boolean",
"default": false
},
"hideLinkPopup": {
"description": "Editor--Hide link popup when the cursor is hover on the link",
Expand All @@ -207,33 +223,38 @@
},
"preferLooseListItem": {
"description": "Markdown--The preferred list type",
"type": "boolean"
"type": "boolean",
"default": true
},
"bulletListMarker": {
"description": "Markdown--The marker used in bullet list",
"enum": [
"-",
"*",
"+"
]
],
"default": "-"
},
"orderListDelimiter": {
"description": "Markdown--The dilimiter used in order list",
"enum": [
".",
")"
]
],
"default": "."
},
"preferHeadingStyle": {
"description": "Markdown--The preferred heading style in Mark Text",
"enum": [
"atx",
"setext"
]
],
"default": "atx"
},
"tabSize": {
"description": "Markdown--Replace the tab with x spaces",
"type": "number"
"type": "number",
"default": 4
},
"listIndentation": {
"description": "Markdown--Select the indent of list",
Expand All @@ -244,7 +265,8 @@
2,
3,
4
]
],
"default": 1
},
"frontmatterType": {
"description": "Markdown--The frontmatter type",
Expand All @@ -253,7 +275,8 @@
"+",
";",
"{"
]
],
"default": "-"
},
"superSubScript": {
"description": "Markdown-Enable pandoc's markdown extension superscript and subscript.",
Expand All @@ -270,11 +293,13 @@
"enum": [
"hand",
"simple"
]
],
"default": "hand"
},
"theme": {
"description": "Theme--Select the theme used in Mark Text",
"type": "string"
"type": "string",
"default": "light"
},
"autoSwitchTheme": {
"description": "Theme--Automatically adjust application theme according system.",
Expand Down Expand Up @@ -316,46 +341,56 @@
"upload",
"folder",
"path"
]
],
"default": "path"
},
"sideBarVisibility": {
"description": "View--Whether the side bar is visible.",
"type": "boolean"
"type": "boolean",
"default": false
},
"tabBarVisibility": {
"description": "View--Whether the tabs are shown.",
"type": "boolean"
"type": "boolean",
"default": false
},
"sourceCodeModeEnabled": {
"description": "View--Whether the source-code mode is enabled by default.",
"type": "boolean"
"type": "boolean",
"default": false
},
"searchExclusions": {
"description": "Searcher--List of glob patterns to exclude from search.",
"type": "array",
"items": {
"type": "string"
}
},
"default": []
},
"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.",
"type": "string",
"pattern": "^(?:$|[0-9]+(?:K|M|G)?$)"
"pattern": "^(?:$|[0-9]+(?:K|M|G)?$)",
"default": ""
},
"searchIncludeHidden": {
"description": "Searcher--Whether to search in hidden files and directories.",
"type": "boolean"
"type": "boolean",
"default": false
},
"searchNoIgnore": {
"description": "Searcher--Whether to ignore ignore files like .gitignore.",
"type": "boolean"
"type": "boolean",
"default": false
},
"searchFollowSymlinks": {
"description": "Searcher--Whether symlinks should be followed.",
"type": "boolean"
"type": "boolean",
"default": true
},
"watcherUsePolling": {
"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
}
}
3 changes: 3 additions & 0 deletions src/renderer/prefComponents/general/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
<section class="startup-action-ctrl">
<div>What Mark Text should do on startup.</div>
<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 label="folder">Open the default directory<span>: {{defaultDirectoryToOpen}}</span></el-radio>
<el-button size="small" @click="selectDefaultDirectoryToOpen">Select Folder</el-button>
<el-radio label="blank">Open a blank page</el-radio>
Expand Down
1 change: 1 addition & 0 deletions src/renderer/prefComponents/spellchecker/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
:onChange="value => onSelectChange('spellcheckerNoUnderline', value)"
></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."
:bool="spellcheckerAutoDetectLanguage"
:disable="!spellcheckerEnabled"
Expand Down