🎨 显示本地数据快照文件类型计数 Fix https://github.com/siyuan-note/siyuan/issues/6870

This commit is contained in:
Liang Ding 2022-12-14 15:39:05 +08:00
parent 26a11dc3d0
commit e73f38390b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 49 additions and 42 deletions

View file

@ -110,11 +110,16 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string
<div>
<span class="ft__smaller ft__on-surface">${item.hCreated}</span>
<span class="b3-list-item__meta">${window.siyuan.languages.fileSize} ${item.hSize}</span>
<span class="b3-list-item__meta">${window.siyuan.languages.fileCount} ${item.count}</span>
<span class="b3-list-item__meta">
${item.typesCount.map((type: { type: string, count: number }) => {
<span class="b3-list-item__meta">${window.siyuan.languages.fileCount} ${item.count}</span>`
let statHTML = "";
if (item.typesCount && 0 < item.typesCount.length) {
statHTML += `
<span class="b3-list-item__meta">
${item.typesCount.map((type: { type: string, count: number }) => {
return `${type.type} ${type.count}`;
}).join(" ")}
}).join("&nbsp;&nbsp;")}`
}
repoHTML += `${statHTML}
</span>
</div>
</div>