Support for saving .sy files in the single-line format https://github.com/siyuan-note/siyuan/issues/8712

This commit is contained in:
Daniel 2023-07-09 22:24:32 +08:00
parent eb65bb4ec0
commit 9eeee3965a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
13 changed files with 55 additions and 22 deletions

View file

@ -43,6 +43,14 @@ export const fileTree = {
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="removeDocWithoutConfirm" type="checkbox"${window.siyuan.config.fileTree.removeDocWithoutConfirm ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.fileTree20}
<div class="b3-label__text">${window.siyuan.languages.fileTree21}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="useSingleLineSave" type="checkbox"${window.siyuan.config.fileTree.useSingleLineSave ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.fileTree12}
@ -97,6 +105,7 @@ export const fileTree = {
closeTabsOnStart: (fileTree.element.querySelector("#closeTabsOnStart") as HTMLInputElement).checked,
allowCreateDeeper: (fileTree.element.querySelector("#allowCreateDeeper") as HTMLInputElement).checked,
removeDocWithoutConfirm: (fileTree.element.querySelector("#removeDocWithoutConfirm") as HTMLInputElement).checked,
useSingleLineSave: (fileTree.element.querySelector("#useSingleLineSave") as HTMLInputElement).checked,
maxListCount: parseInt((fileTree.element.querySelector("#maxListCount") as HTMLInputElement).value),
maxOpenTabCount: inputMaxOpenTabCount,
}, response => {

View file

@ -506,6 +506,7 @@ interface IFileTree {
alwaysSelectOpenedFile: boolean
openFilesUseCurrentTab: boolean
removeDocWithoutConfirm: boolean
useSingleLineSave: boolean
allowCreateDeeper: boolean
refCreateSavePath: string
docCreateSavePath: string