mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
This commit is contained in:
parent
35cf6d1b49
commit
ca8d6d0dc3
8 changed files with 20 additions and 2 deletions
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"tabLimit": "Tab Limit",
|
||||
"tabLimit1": "Sort by opening time, close the earliest opened tab",
|
||||
"pasteEscaped": "Paste escaped text",
|
||||
"resetRepoTip": "Resetting the data repository will completely delete the key and all snapshots, are you sure you want to reset?",
|
||||
"resetRepo": "Reset data repo",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"tabLimit": "Nombre maximum d'onglets ouverts",
|
||||
"tabLimit1": "Trier par heure d'ouverture, fermer le premier onglet ouvert",
|
||||
"pasteEscaped": "Coller le texte échappé",
|
||||
"resetRepoTip": "La réinitialisation du référentiel de données supprimera complètement la clé et tous les instantanés, êtes-vous sûr de vouloir réinitialiser ?",
|
||||
"resetRepo": "Réinitialiser le référentiel de données",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"tabLimit": "頁簽打開最大數量",
|
||||
"tabLimit1": "按照打開時間排序,關閉最早打開的頁簽",
|
||||
"pasteEscaped": "粘貼轉義文本",
|
||||
"resetRepoTip": "重置數據倉庫會徹底刪除密鑰和所有快照,確定進行重置嗎?",
|
||||
"resetRepo": "重置數據倉庫",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"tabLimit": "页签打开最大数量",
|
||||
"tabLimit1": "按照打开时间排序,关闭最早打开的页签",
|
||||
"pasteEscaped": "粘贴转义文本",
|
||||
"resetRepoTip": "重置数据仓库会彻底删除密钥和所有快照,确定进行重置吗?",
|
||||
"resetRepo": "重置数据仓库",
|
||||
|
|
|
|||
|
|
@ -58,6 +58,14 @@ export const fileTree = {
|
|||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-text-field fn__flex-center fn__size200" id="maxListCount" type="number" min="1" max="10240" value="${window.siyuan.config.fileTree.maxListCount}">
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.tabLimit}
|
||||
<div class="b3-label__text">${window.siyuan.languages.tabLimit1}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-text-field fn__flex-center fn__size200" id="maxOpenTabCount" type="number" min="1" max="32" value="${window.siyuan.config.fileTree.maxOpenTabCount}">
|
||||
</label>`;
|
||||
},
|
||||
_send() {
|
||||
|
|
@ -70,6 +78,7 @@ export const fileTree = {
|
|||
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),
|
||||
maxOpenTabCount: parseInt((fileTree.element.querySelector("#maxOpenTabCount") as HTMLInputElement).value),
|
||||
}, response => {
|
||||
fileTree.onSetfiletree(response.data);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ export const initConfigSearch = (element: HTMLElement) => {
|
|||
]),
|
||||
|
||||
// 文档树
|
||||
getLang(["selectOpen", "fileTree", "fileTree2", "fileTree3", "fileTree4",
|
||||
getLang(["selectOpen", "tabLimit", "fileTree", "fileTree2", "fileTree3", "fileTree4",
|
||||
"fileTree5", "fileTree6", "fileTree7", "fileTree8", "fileTree12", "fileTree13", "fileTree15", "fileTree16", "fileTree17"]),
|
||||
|
||||
// 图片
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ export class Wnd {
|
|||
// 移除 centerLayout 中的 empty
|
||||
if (this.parent.type === "center" && this.children.length === 2 && !this.children[0].headElement) {
|
||||
this.removeTab(this.children[0].id);
|
||||
} else if (this.children.length > 5) { // TODO: 需从后台设置中获取
|
||||
} else if (this.children.length > window.siyuan.config.fileTree.maxOpenTabCount) {
|
||||
let removeId: string;
|
||||
let openTime: string;
|
||||
this.children.forEach((item, index) => {
|
||||
|
|
|
|||
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
|
@ -231,6 +231,7 @@ declare interface IFileTree {
|
|||
refCreateSavePath: string
|
||||
createDocNameTemplate: string
|
||||
sort: number
|
||||
maxOpenTabCount: number
|
||||
maxListCount: number
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue