Vanessa 2022-07-14 11:11:54 +08:00
parent f825fefa43
commit 0afaf36e81
4 changed files with 15 additions and 2 deletions

View file

@ -557,6 +557,8 @@
"fileTree6": "使用 <code>((</code> 时新建文档的存放路径(例如 /folder1/folder2/,不以 / 开头则使用当前文档相对路径)",
"fileTree7": "在当前页签中打开",
"fileTree8": "新打开的文档页签将会替换没有修改过的页签",
"fileTree9": "TODO",
"fileTree10": "TODOTODO",
"fileTree11": "新建日记",
"fileTree12": "新建文档名模板",
"fileTree13": "使用该模板片段进行命名,例如 <code>{{now | date \"20060102150405\"}}</code>",

View file

@ -19,6 +19,14 @@ export const fileTree = {
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="openFilesUseCurrentTab" type="checkbox"${window.siyuan.config.fileTree.openFilesUseCurrentTab ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.fileTree9}
<div class="b3-label__text">${window.siyuan.languages.fileTree10}</div>
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="closeTabsOnStart" type="checkbox"${window.siyuan.config.fileTree.closeTabsOnStart ? " checked" : ""}/>
</label>
<label class="fn__flex b3-label">
<div class="fn__flex-1">
${window.siyuan.languages.fileTree18}
@ -75,6 +83,7 @@ export const fileTree = {
refCreateSavePath: (fileTree.element.querySelector("#refCreateSavePath") as HTMLInputElement).value,
createDocNameTemplate: (fileTree.element.querySelector("#createDocNameTemplate") as HTMLInputElement).value,
openFilesUseCurrentTab: (fileTree.element.querySelector("#openFilesUseCurrentTab") as HTMLInputElement).checked,
closeTabsOnStart: (fileTree.element.querySelector("#closeTabsOnStart") as HTMLInputElement).checked,
allowCreateDeeper: (fileTree.element.querySelector("#allowCreateDeeper") as HTMLInputElement).checked,
removeDocWithoutConfirm: (fileTree.element.querySelector("#removeDocWithoutConfirm") as HTMLInputElement).checked,
maxListCount: parseInt((fileTree.element.querySelector("#maxListCount") as HTMLInputElement).value),

View file

@ -18,8 +18,9 @@ export const initConfigSearch = (element: HTMLElement) => {
]),
// 文档树
getLang(["selectOpen", "tabLimit", "fileTree", "fileTree2", "fileTree3", "fileTree4",
"fileTree5", "fileTree6", "fileTree7", "fileTree8", "fileTree12", "fileTree13", "fileTree15", "fileTree16", "fileTree17"]),
getLang(["selectOpen", "tabLimit", "fileTree", "fileTree2", "fileTree3", "fileTree4", "fileTree5",
"fileTree6", "fileTree7", "fileTree8", "fileTree9", "fileTree10", "fileTree12", "fileTree13", "fileTree15",
"fileTree16", "fileTree17"]),
// 图片
getLang(["assets", "clearUnused"]),

View file

@ -241,6 +241,7 @@ declare interface IAppearance {
}
declare interface IFileTree {
closeTabsOnStart: boolean
alwaysSelectOpenedFile: boolean
openFilesUseCurrentTab: boolean
removeDocWithoutConfirm: boolean