mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-09 08:44:20 +01:00
🎨 Add statistics on selected blocks and total blocks https://github.com/siyuan-note/siyuan/issues/13235
This commit is contained in:
parent
adb942b4d5
commit
14bb85017f
15 changed files with 33 additions and 7 deletions
|
|
@ -194,7 +194,8 @@ export const renderStatusbarCounter = (stat: {
|
|||
wordCount: number,
|
||||
linkCount: number,
|
||||
imageCount: number,
|
||||
refCount: number
|
||||
refCount: number,
|
||||
blockCount: number,
|
||||
}) => {
|
||||
if (!stat) {
|
||||
return;
|
||||
|
|
@ -209,6 +210,8 @@ export const renderStatusbarCounter = (stat: {
|
|||
}
|
||||
if (0 < stat.refCount) {
|
||||
html += `<span class="ft__on-surface">${window.siyuan.languages.refCount}</span> ${stat.refCount}<span class="fn__space"></span>`;
|
||||
}if (0 < stat.blockCount) {
|
||||
html += `<span class="ft__on-surface">${window.siyuan.languages.blockCount}</span> ${stat.blockCount}<span class="fn__space"></span>`;
|
||||
}
|
||||
document.querySelector("#status .status__counter").innerHTML = html;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ ${padHTML}
|
|||
iconHTML: "",
|
||||
type: "readonly",
|
||||
// 不能换行,否则移动端间距过大
|
||||
label: `<div class="fn__flex">${window.siyuan.languages.runeCount}<span class="fn__space fn__flex-1"></span>${response.data.runeCount}</div><div class="fn__flex">${window.siyuan.languages.wordCount}<span class="fn__space fn__flex-1"></span>${response.data.wordCount}</div><div class="fn__flex">${window.siyuan.languages.linkCount}<span class="fn__space fn__flex-1"></span>${response.data.linkCount}</div><div class="fn__flex">${window.siyuan.languages.imgCount}<span class="fn__space fn__flex-1"></span>${response.data.imageCount}</div><div class="fn__flex">${window.siyuan.languages.refCount}<span class="fn__space fn__flex-1"></span>${response.data.refCount}</div>`,
|
||||
label: `<div class="fn__flex">${window.siyuan.languages.runeCount}<span class="fn__space fn__flex-1"></span>${response.data.runeCount}</div><div class="fn__flex">${window.siyuan.languages.wordCount}<span class="fn__space fn__flex-1"></span>${response.data.wordCount}</div><div class="fn__flex">${window.siyuan.languages.linkCount}<span class="fn__space fn__flex-1"></span>${response.data.linkCount}</div><div class="fn__flex">${window.siyuan.languages.imgCount}<span class="fn__space fn__flex-1"></span>${response.data.imageCount}</div><div class="fn__flex">${window.siyuan.languages.refCount}<span class="fn__space fn__flex-1"></span>${response.data.refCount}</div><div class="fn__flex">${window.siyuan.languages.blockCount}<span class="fn__space fn__flex-1"></span>${response.data.blockCount}</div>`,
|
||||
}).element);
|
||||
/// #if MOBILE
|
||||
window.siyuan.menus.menu.fullscreen();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue