🎨 Improve doc tree modification time display https://github.com/siyuan-note/siyuan/issues/11327

This commit is contained in:
Daniel 2024-05-09 19:53:39 +08:00
parent 75c888a847
commit d5730e3c88
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 8 additions and 8 deletions

View file

@ -895,8 +895,8 @@
"confirmClearHistory": "確定要徹底刪除工作空間下的所有歷史資料嗎?",
"fileNameASC": "名稱字母昇冪",
"fileNameDESC": "名稱字母降冪",
"modifiedASC": "修改時間昇冪",
"modifiedDESC": "修改時間降冪",
"modifiedASC": "更新時間昇冪",
"modifiedDESC": "更新時間降冪",
"fileNameNatASC": "名稱自然昇冪",
"fileNameNatDESC": "名稱自然降冪",
"refCountASC": "引用數昇冪",
@ -1199,7 +1199,7 @@
"wysiwyg": "所見即所得",
"_label": "繁體中文",
"_time": {
"albl": "前",
"albl": "前",
"blbl": "距現在",
"now": "剛剛",
"1s": "1 秒%s",

View file

@ -895,8 +895,8 @@
"confirmClearHistory": "确定要彻底删除工作空间下的所有历史数据吗?",
"fileNameASC": "名称字母升序",
"fileNameDESC": "名称字母降序",
"modifiedASC": "修改时间升序",
"modifiedDESC": "修改时间降序",
"modifiedASC": "更新时间升序",
"modifiedDESC": "更新时间降序",
"fileNameNatASC": "名称自然升序",
"fileNameNatDESC": "名称自然降序",
"refCountASC": "引用数升序",
@ -1199,7 +1199,7 @@
"wysiwyg": "所见即所得",
"_label": "简体中文",
"_time": {
"albl": "前",
"albl": "前",
"blbl": "距现在",
"now": "刚刚",
"1s": "1 秒%s",

View file

@ -89,7 +89,7 @@ func (box *Box) docFromFileInfo(fileInfo *FileInfo, ial map[string]string) (ret
ret.Bookmark = ial["bookmark"]
t, _ := time.ParseInLocation("20060102150405", ret.ID[:14], time.Local)
ret.CTime = t.Unix()
ret.HCtime = t.Format("2006-01-02 15:04:05")
ret.HCtime = t.Format("2006-01-02 15:04:05") + ", " + util.HumanizeTime(t, Conf.Lang)
ret.HSize = humanize.BytesCustomCeil(ret.Size, 2)
mTime := t
@ -100,7 +100,7 @@ func (box *Box) docFromFileInfo(fileInfo *FileInfo, ial map[string]string) (ret
}
ret.Mtime = mTime.Unix()
ret.HMtime = util.HumanizeTime(mTime, Conf.Lang)
ret.HMtime = mTime.Format("2006-01-02 15:04:05") + ", " + util.HumanizeTime(mTime, Conf.Lang)
return
}