mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 文档信息统计增加超链接数、图片数、引用数和大小 https://github.com/siyuan-note/siyuan/issues/6037
This commit is contained in:
parent
a772b47287
commit
5e09d72fab
16 changed files with 86 additions and 86 deletions
|
|
@ -151,11 +151,16 @@ func PushStatusBar(msg string) {
|
|||
BroadcastByType("main", "statusbar", 0, msg, nil)
|
||||
}
|
||||
|
||||
func PushStatusBarCounter(runeCount, wordCount int) {
|
||||
BroadcastByType("main", "statusbarCounter", 0, "", map[string]interface{}{
|
||||
"runeCount": runeCount,
|
||||
"wordCount": wordCount},
|
||||
)
|
||||
type BlockStatResult struct {
|
||||
RuneCount int `json:"runeCount"`
|
||||
WordCount int `json:"wordCount"`
|
||||
LinkCount int `json:"linkCount"`
|
||||
ImageCount int `json:"imageCount"`
|
||||
RefCount int `json:"refCount"`
|
||||
}
|
||||
|
||||
func PushStatusBarCounter(stat *BlockStatResult) {
|
||||
BroadcastByType("main", "statusbarCounter", 0, "", stat)
|
||||
}
|
||||
|
||||
func ContextPushMsg(context map[string]interface{}, msg string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue