mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
🎨 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:
parent
cde0840bf7
commit
827c7a5bf6
27 changed files with 61 additions and 7 deletions
|
|
@ -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;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
4
app/src/types/config.d.ts
vendored
4
app/src/types/config.d.ts
vendored
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue