mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 21:38:48 +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
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "الحد الأقصى لعدد المستندات الحديثة المعروضة",
|
||||
"recentDocsMaxListCountTip": "الحد الأقصى لعدد المستندات المدرجة في مربع حوار المستندات الحديثة",
|
||||
"bazaarNeedVersion": "يتطلب ترقية SiYuan إلى الإصدار v${x} أو أحدث لاستخدام هذه الميزة",
|
||||
"downloadRollback": "تنزيل واستعادة",
|
||||
"callout": "تلميح",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Maximale Anzahl an aufgelisteten letzten Dokumenten",
|
||||
"recentDocsMaxListCountTip": "Maximale Anzahl der Dokumente, die im Dialog der zuletzt verwendeten Dokumente aufgelistet werden",
|
||||
"bazaarNeedVersion": "Erfordert ein Upgrade von SiYuan auf Version v${x} oder höher, um diese Funktion zu nutzen",
|
||||
"downloadRollback": "Herunterladen und Zurücksetzen",
|
||||
"callout": "Hinweis",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Maximum number of recent documents listed",
|
||||
"recentDocsMaxListCountTip": "Maximum number of documents listed in the Recent Documents dialog",
|
||||
"bazaarNeedVersion": "Requires upgrading SiYuan to v${x} or later to use",
|
||||
"downloadRollback": "Download and rollback",
|
||||
"callout": "Callout",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Número máximo de documentos recientes listados",
|
||||
"recentDocsMaxListCountTip": "Número máximo de documentos que se mostrarán en el cuadro de diálogo Documentos recientes",
|
||||
"bazaarNeedVersion": "Se requiere actualizar SiYuan a la versión v${x} o posterior para usarlo",
|
||||
"downloadRollback": "Descargar y revertir",
|
||||
"callout": "Aviso",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Nombre maximal de documents récents listés",
|
||||
"recentDocsMaxListCountTip": "Nombre maximal de documents répertoriés dans la boîte de dialogue Documents récents",
|
||||
"bazaarNeedVersion": "Nécessite la mise à niveau de SiYuan vers la version v${x} ou ultérieure pour l'utiliser",
|
||||
"downloadRollback": "Télécharger et restaurer",
|
||||
"callout": "Astuce",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "מספר מקסימלי של מסמכים אחרונים ברשימה",
|
||||
"recentDocsMaxListCountTip": "מספר המסמכים המקסימלי שיופיע בתיבת הדו-שיח של 'מסמכים אחרונים'",
|
||||
"bazaarNeedVersion": "נדרש לשדרג את SiYuan לגרסה v${x} או גבוהה יותר כדי להשתמש",
|
||||
"downloadRollback": "הורד ושחזר",
|
||||
"callout": "הערה",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Numero massimo di documenti recenti elencati",
|
||||
"recentDocsMaxListCountTip": "Numero massimo di documenti elencati nella finestra di dialogo Documenti recenti",
|
||||
"bazaarNeedVersion": "È necessario aggiornare SiYuan alla versione v${x} o successiva per poter utilizzare",
|
||||
"downloadRollback": "Scarica e ripristina",
|
||||
"callout": "Suggerimento",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "最近のドキュメントの最大表示数",
|
||||
"recentDocsMaxListCountTip": "最近のドキュメントダイアログに最大で表示されるドキュメント数",
|
||||
"bazaarNeedVersion": "使用するには SiYuan を v${x} 以上にアップグレードする必要があります",
|
||||
"downloadRollback": "ダウンロードしてロールバック",
|
||||
"callout": "ヒント",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "최근 문서 목록 최대 수",
|
||||
"recentDocsMaxListCountTip": "최근 문서 대화상자에 최대 나열될 문서 수",
|
||||
"bazaarNeedVersion": "사용하려면 SiYuan을 v${x} 이상으로 업그레이드해야 합니다",
|
||||
"downloadRollback": "다운로드 및 롤백",
|
||||
"callout": "콜아웃",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Maksymalna liczba wyświetlanych ostatnich dokumentów",
|
||||
"recentDocsMaxListCountTip": "Maksymalna liczba dokumentów wyświetlanych w oknie dialogowym Ostatnie dokumenty",
|
||||
"bazaarNeedVersion": "Wymagane jest uaktualnienie SiYuan do wersji v${x} lub nowszej, aby używać",
|
||||
"downloadRollback": "Pobierz i przywróć",
|
||||
"callout": "Wskazówka",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Número máximo de documentos recentes listados",
|
||||
"recentDocsMaxListCountTip": "Número máximo de documentos listados na caixa de diálogo Documentos Recentes",
|
||||
"bazaarNeedVersion": "É necessário atualizar o SiYuan para a versão v${x} ou superior para usar",
|
||||
"downloadRollback": "Baixar e reverter",
|
||||
"callout": "Dica",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Максимальное количество отображаемых последних документов",
|
||||
"recentDocsMaxListCountTip": "Максимальное количество документов, которые будут перечислены в диалоге последних документов",
|
||||
"bazaarNeedVersion": "Требуется обновить SiYuan до версии v${x} или выше для использования",
|
||||
"downloadRollback": "Скачать и откатить",
|
||||
"callout": "Подсказка",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "Son belgelerin listeleneceği maksimum sayı",
|
||||
"recentDocsMaxListCountTip": "Son Belgeler iletişim kutusunda en fazla listelenecek belge sayısı",
|
||||
"bazaarNeedVersion": "Bu özelliği kullanmak için SiYuan'ı v${x} veya daha yeni bir sürüme yükseltmeniz gerekir",
|
||||
"downloadRollback": "İndir ve geri al",
|
||||
"callout": "Vurgu kutusu",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxListCount": "最近的文檔列出數量",
|
||||
"recentDocsMaxListCountTip": "在最近的文檔對話框中最多列出文檔的數量",
|
||||
"bazaarNeedVersion": "需升級到思源筆記 v${x} 或更高版本才能使用",
|
||||
"downloadRollback": "下载并回滚",
|
||||
"callout": "提示",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"recentDocsMaxCount": "最近的文档最大数量",
|
||||
"recentDocsMaxCountTip": "最近的文档对话框中列出文档的最大数量",
|
||||
"bazaarNeedVersion": "需升级到思源笔记 v${x} 或更高版本才能使用",
|
||||
"downloadRollback": "下载并回滚",
|
||||
"callout": "提示",
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ Below are the detailed changes in this version.
|
|||
* [Improve superblock editing and undo](https://github.com/siyuan-note/siyuan/issues/16703)
|
||||
* [Supports use even when offline on HarmonyOS](https://github.com/siyuan-note/siyuan/issues/16706)
|
||||
* [Improve template function `ISOMonth`](https://github.com/siyuan-note/siyuan/issues/16718)
|
||||
* [Supports configuring the maximum number of `Recent documents` to be listed](https://github.com/siyuan-note/siyuan/issues/16720)
|
||||
|
||||
### Bugfix
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
* [改進超級區塊的編輯與撤銷](https://github.com/siyuan-note/siyuan/issues/16703)
|
||||
* [支援鴻蒙端在離線時使用](https://github.com/siyuan-note/siyuan/issues/16706)
|
||||
* [改進模板函數 `ISOMonth`](https://github.com/siyuan-note/siyuan/issues/16718)
|
||||
* [支援配置 `最近的文件` 列出的最大數量](https://github.com/siyuan-note/siyuan/issues/16720)
|
||||
|
||||
### 修復缺陷
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
* [改进超级块的编辑与撤销](https://github.com/siyuan-note/siyuan/issues/16703)
|
||||
* [支持鸿蒙端在离线时使用](https://github.com/siyuan-note/siyuan/issues/16706)
|
||||
* [改进模板函数 `ISOMonth`](https://github.com/siyuan-note/siyuan/issues/16718)
|
||||
* [支持配置 `最近的文档` 列出的最大数量](https://github.com/siyuan-note/siyuan/issues/16720)
|
||||
|
||||
### 修复缺陷
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
2
app/stage/protyle/js/lute/lute.min.js
vendored
2
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -36,6 +36,7 @@ type FileTree struct {
|
|||
LargeFileWarningSize int `json:"largeFileWarningSize"` // 大文件警告大小(单位:MB)
|
||||
CreateDocAtTop *bool `json:"createDocAtTop"` // 在顶部创建新文档 https://github.com/siyuan-note/siyuan/issues/16327
|
||||
Sort int `json:"sort"` // 排序方式
|
||||
RecentDocsMaxListCount int `json:"recentDocsMaxListCount"` // 最近的文档最大列出数量
|
||||
}
|
||||
|
||||
func NewFileTree() *FileTree {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ require (
|
|||
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
|
||||
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
|
||||
github.com/88250/gulu v1.2.3-0.20251208021445-f93f2666eaac
|
||||
github.com/88250/lute v1.7.7-0.20251228092920-c286e7a47b32
|
||||
github.com/88250/lute v1.7.7-0.20251229120557-04624d6f8b0f
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
|
||||
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
|
||||
github.com/ConradIrwin/font v0.2.1
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
|
|||
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/88250/gulu v1.2.3-0.20251208021445-f93f2666eaac h1:EC80pY8zyR0gbL8ZLIBB4IPG/ia3ZHScrR/xt8zU8qU=
|
||||
github.com/88250/gulu v1.2.3-0.20251208021445-f93f2666eaac/go.mod h1:IQ5dXW9CjVmx6B7OfK1Y4ZBKTPMe9q1AkVoLGGzRbS8=
|
||||
github.com/88250/lute v1.7.7-0.20251228092920-c286e7a47b32 h1:g8nFH1W11S/mE2UMarHr3h3M8ZVHnlqGJntwTk+gwgA=
|
||||
github.com/88250/lute v1.7.7-0.20251228092920-c286e7a47b32/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
|
||||
github.com/88250/lute v1.7.7-0.20251229120557-04624d6f8b0f h1:EcvPctrQy2qfk5Sq2W45GDyrzbbHKeTGlJGYCYxZvrI=
|
||||
github.com/88250/lute v1.7.7-0.20251229120557-04624d6f8b0f/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
|
||||
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46 h1:Bq1JsDfVbHKUxNL/B2JXd8cC/1h6aFjrlXpGycnh0Hk=
|
||||
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=
|
||||
|
|
|
|||
|
|
@ -236,6 +236,13 @@ func InitConf() {
|
|||
Conf.FileTree.CreateDocAtTop = func() *bool { b := true; return &b }()
|
||||
}
|
||||
|
||||
if 1 > Conf.FileTree.RecentDocsMaxListCount {
|
||||
Conf.FileTree.RecentDocsMaxListCount = 32
|
||||
}
|
||||
if 256 < Conf.FileTree.RecentDocsMaxListCount {
|
||||
Conf.FileTree.RecentDocsMaxListCount = 256
|
||||
}
|
||||
|
||||
util.CurrentCloudRegion = Conf.CloudRegion
|
||||
|
||||
if nil == Conf.Tag {
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ func setRecentDocByTree(tree *parse.Tree) {
|
|||
}
|
||||
|
||||
recentDocs = append([]*RecentDoc{recentDoc}, recentDocs...)
|
||||
if 32 < len(recentDocs) {
|
||||
recentDocs = recentDocs[:32]
|
||||
if Conf.FileTree.RecentDocsMaxListCount < len(recentDocs) {
|
||||
recentDocs = recentDocs[:Conf.FileTree.RecentDocsMaxListCount]
|
||||
}
|
||||
|
||||
err = setRecentDocs(recentDocs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue