🎨 Supports configuring the maximum number of Recent documents to be listed https://github.com/siyuan-note/siyuan/issues/16720

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-12-29 22:24:37 +08:00
parent cde0840bf7
commit 827c7a5bf6
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
27 changed files with 61 additions and 7 deletions

View file

@ -88,6 +88,14 @@ export const fileTree = {
<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}">
</div>
<div class="fn__flex b3-label config__item">
<div class="fn__flex-1">
${window.siyuan.languages.recentDocsMaxCount}
<div class="b3-label__text">${window.siyuan.languages.recentDocsMaxCountTip}</div>
</div>
<span class="fn__space"></span>
<input class="b3-text-field fn__flex-center fn__size200" id="recentDocsMaxListCount" type="number" min="1" max="256" value="${window.siyuan.config.fileTree.recentDocsMaxListCount}">
</div>
<div class="b3-label config__item">
${window.siyuan.languages.fileTree12}
<div class="b3-label__text">${window.siyuan.languages.fileTree13}</div>
@ -137,6 +145,7 @@ export const fileTree = {
largeFileWarningSize: parseInt((fileTree.element.querySelector("#largeFileWarningSize") as HTMLInputElement).value),
maxListCount: parseInt((fileTree.element.querySelector("#maxListCount") as HTMLInputElement).value),
maxOpenTabCount: inputMaxOpenTabCount,
recentDocsMaxListCount: parseInt((fileTree.element.querySelector("#recentDocsMaxListCount") as HTMLInputElement).value),
}, response => {
window.siyuan.config.fileTree = response.data;
});

View file

@ -35,7 +35,7 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
getLang(["selectOpen", "tabLimit", "fileTree", "fileTree2", "fileTree3", "fileTree4", "fileTree5",
"fileTree6", "fileTree7", "fileTree8", "fileTree9", "fileTree10", "fileTree12", "fileTree13", "fileTree15",
"fileTree16", "fileTree17", "fileTree18", "fileTree19", "fileTree20", "fileTree21", "fileTree22", "fileTree23",
"fileTree24", "fileTree25"]),
"fileTree24", "fileTree25", "recentDocsMaxCount", "recentDocsMaxCountTip"]),
// 闪卡
getLang(["riffCard", "flashcardNewCardLimit", "flashcardNewCardLimitTip", "flashcardReviewCardLimit",

View file

@ -680,6 +680,10 @@ declare namespace Config {
* Whether to create new documents at the top of the document tree
*/
createDocAtTop: boolean;
/**
* The maximum number of recent documents listed
*/
recentDocsMaxListCount: number;
}
/**