Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 数据快照 https://github.com/siyuan-note/siyuan/issues/5159

Liang Ding1a831c5ad966
diff --git a/app/src/util/history.ts b/app/src/util/history.ts
index b0bc54871a..53d19dc1c9 100644
--- a/app/src/util/history.ts
+++ b/app/src/util/history.ts
@@ -68,10 +68,10 @@ const renderAssets = (element: HTMLElement) => {
return;
}
let logsHTML = "";
- response.data.histories.forEach((item: { items: { path: string, title: string }[], time: string }, index: number) => {
+ response.data.histories.forEach((item: { items: { path: string, title: string }[], hCreated: string }, index: number) => {
logsHTML += `<li class="b3-list-item" data-type="toggle" style="padding-left: 0">
<span style="padding-left: 8px" class="b3-list-item__toggle"><svg class="b3-list-item__arrow${index === 0 ? " b3-list-item__arrow--open" : ""}${item.items.length > 0 ? "" : " fn__hidden"}"><use xlink:href="#iconRight"></use></svg></span>
- <span class="b3-list-item__text">${item.time}</span>
+ <span class="b3-list-item__text">${item.hCreated}</span>
</li>`;
if (item.items.length > 0) {
logsHTML += `<ul class="${index === 0 ? "" : "fn__none"}">`;
@@ -112,10 +112,10 @@ const renderRepo = (element: HTMLElement) => {
return;
}
let repoHTML = "";
- response.data.logs.forEach((item: { files: { path: string, id: string }[], id: string, time: string }, index: number) => {
+ response.data.logs.forEach((item: { files: { path: string, id: string }[], id: string, hCreated: string }, index: number) => {
repoHTML += `<li class="b3-list-item" style="padding-left: 0" data-type="toggle">
<span style="padding-left: 8px" class="b3-list-item__toggle"><svg class="b3-list-item__arrow${index === 0 ? " b3-list-item__arrow--open" : ""}${item.files.length > 0 ? "" : " fn__hidden"}"><use xlink:href="#iconRight"></use></svg></span>
- <span class="b3-list-item__text">${item.time}</span>
+ <span class="b3-list-item__text">${item.hCreated}</span>
</li>`;
if (item.files.length > 0) {
repoHTML += `<ul class="${index === 0 ? "" : "fn__none"}">`;
@@ -148,10 +148,10 @@ const renderRmNotebook = (element: HTMLElement) => {
return;
}
let logsHTML = "";
- response.data.histories.forEach((item: { items: { path: string, title: string }[], time: string }, index: number) => {
+ response.data.histories.forEach((item: { items: { path: string, title: string }[], hCreated: string }, index: number) => {
logsHTML += `<li class="b3-list-item" style="padding-left: 0" data-type="toggle">
<span style="padding-left: 8px" class="b3-list-item__toggle"><svg class="b3-list-item__arrow${index === 0 ? " b3-list-item__arrow--open" : ""}${item.items.length > 0 ? "" : " fn__hidden"}"><use xlink:href="#iconRight"></use></svg></span>
- <span class="b3-list-item__text">${item.time}</span>
+ <span class="b3-list-item__text">${item.hCreated}</span>
</li>`;
if (item.items.length > 0) {
logsHTML += `<ul class="${index === 0 ? "" : "fn__none"}">`;
diff --git a/kernel/model/history.go b/kernel/model/history.go
index 1583a8147a..320f7cc938 100644
--- a/kernel/model/history.go
+++ b/kernel/model/history.go
@@ -243,8 +243,8 @@ func RollbackNotebookHistory(historyPath string) (err error) {
}
type History struct {
- Time string `json:"time"`
- Items []*HistoryItem `json:"items"`
+ HCreated string `json:"hCreated"`
+ Items []*HistoryItem `json:"items"`
}
type HistoryItem struct {
@@ -323,8 +323,8 @@ func GetDocHistory(boxID string) (ret []*History, err error) {
}
ret = append(ret, &History{
- Time: t,
- Items: docs,
+ HCreated: t,
+ Items: docs,
})
count++
@@ -334,7 +334,7 @@ func GetDocHistory(boxID string) (ret []*History, err error) {
}
sort.Slice(ret, func(i, j int) bool {
- return ret[i].Time > ret[j].Time
+ return ret[i].HCreated > ret[j].HCreated
})
return
}
@@ -378,7 +378,7 @@ func GetNotebookHistory() (ret []*History, err error) {
}
ret = append(ret, &History{
- Time: t,
+ HCreated: t,
Items: []*HistoryItem{
{
Title: c.Name,
@@ -394,7 +394,7 @@ func GetNotebookHistory() (ret []*History, err error) {
}
sort.Slice(ret, func(i, j int) bool {
- return ret[i].Time > ret[j].Time
+ return ret[i].HCreated > ret[j].HCreated
})
return
}
@@ -453,8 +453,8 @@ func GetAssetsHistory() (ret []*History, err error) {
}
ret = append(ret, &History{
- Time: t,
- Items: assets,
+ HCreated: t,
+ Items: assets,
})
historyCount++
@@ -464,7 +464,7 @@ func GetAssetsHistory() (ret []*History, err error) {
}
sort.Slice(ret, func(i, j int) bool {
- return ret[i].Time > ret[j].Time
+ return ret[i].HCreated > ret[j].HCreated
})
return
}