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 Dinga57b65de4868
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json
index 7b5f7f7b19..c024a627f6 100644
--- a/app/appearance/langs/en_US.json
+++ b/app/appearance/langs/en_US.json
@@ -1,4 +1,6 @@
{
+ "createSnapshot": "Create snapshot",
+ "dataSnapshot": "Data snapshot",
"copyKey": "Copy key string",
"importKey": "Import key",
"keyPlaceholder": "Please paste the key string here",
diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json
index fdfbdf3b50..337926abc2 100644
--- a/app/appearance/langs/fr_FR.json
+++ b/app/appearance/langs/fr_FR.json
@@ -1,4 +1,6 @@
{
+ "createSnapshot": "Créer un instantané",
+ "dataSnapshot": "Instantané de données",
"copyKey": "Copier la chaîne de clé",
"importKey": "Importer la clé",
"keyPlaceholder": "Veuillez coller la chaîne de clé ici",
diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json
index 5eac45a396..310a127e0a 100644
--- a/app/appearance/langs/zh_CHT.json
+++ b/app/appearance/langs/zh_CHT.json
@@ -1,4 +1,6 @@
{
+ "createSnapshot": "創建快照",
+ "dataSnapshot": "數據快照",
"copyKey": "複製密鑰字符串",
"importKey": "導入密鑰",
"keyPlaceholder": "請在此處粘貼密鑰字符串",
diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json
index c2ef18b44d..d065e94d29 100644
--- a/app/appearance/langs/zh_CN.json
+++ b/app/appearance/langs/zh_CN.json
@@ -1,4 +1,6 @@
{
+ "createSnapshot": "创建快照",
+ "dataSnapshot": "数据快照",
"copyKey": "复制密钥字符串",
"importKey": "导入密钥",
"keyPlaceholder": "请在此处粘贴密钥字符串",
diff --git a/app/src/util/history.ts b/app/src/util/history.ts
index 7287db27c2..b0bc54871a 100644
--- a/app/src/util/history.ts
+++ b/app/src/util/history.ts
@@ -28,10 +28,10 @@ const renderDoc = (notebook: INotebook, element: HTMLElement) => {
return;
}
let logsHTML = switchHTML;
- 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"}">`;
@@ -188,7 +188,7 @@ export const openHistory = () => {
<div data-type="doc" class="item item--focus"><span class="item__text">${window.siyuan.languages.doc}</span></div>
<div data-type="assets" class="item"><span class="item__text">${window.siyuan.languages.assets}</span></div>
<div data-type="notebook" class="item"><span class="item__text">${window.siyuan.languages.removedNotebook}</span></div>
- <div data-type="repo" class="item"><span class="item__text">${window.siyuan.languages.xxx}</span></div>
+ <div data-type="repo" class="item"><span class="item__text">${window.siyuan.languages.dataSnapshot}</span></div>
</div>
<div class="fn__flex-1 fn__flex" id="historyContainer">
<div data-type="doc" class="fn__flex fn__block" data-init="true">
@@ -213,7 +213,7 @@ export const openHistory = () => {
<span class="fn__space"></span>
<span data-type="next" class="block__icon b3-tooltips b3-tooltips__sw" disabled="disabled" aria-label="${window.siyuan.languages.nextLabel}"><svg><use xlink:href='#iconRight'></use></svg></span>
<span class="fn__space"></span>
- <button class="b3-button b3-button--outline" data-type="genRepo">xxx</button>
+ <button class="b3-button b3-button--outline" data-type="genRepo">${window.siyuan.languages.createSnapshot}</button>
</div>
<div class="fn__flex fn__flex-1">
<ul style="width:200px;overflow: auto;background: var(--b3-theme-surface);" class="b3-list b3-list--background">
diff --git a/kernel/go.mod b/kernel/go.mod
index ae9384cc40..0c0d8b3556 100644
--- a/kernel/go.mod
+++ b/kernel/go.mod
@@ -40,7 +40,7 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/qiniu/go-sdk/v7 v7.13.0
github.com/radovskyb/watcher v1.0.7
- github.com/siyuan-note/dejavu v0.0.0-20220613144035-412877c5ffa6
+ github.com/siyuan-note/dejavu v0.0.0-20220613153354-81a47b3b32e4
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676
github.com/vmihailenco/msgpack/v5 v5.3.5
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
diff --git a/kernel/go.sum b/kernel/go.sum
index 31b8e5fa06..20834a80e2 100644
--- a/kernel/go.sum
+++ b/kernel/go.sum
@@ -419,10 +419,8 @@ github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJ
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/siyuan-note/dejavu v0.0.0-20220613134332-45af7919bc94 h1:NRlFUCAFPEMWoBrvuEQ0csBUoyKvWtQ67g6ctGH5kVA=
-github.com/siyuan-note/dejavu v0.0.0-20220613134332-45af7919bc94/go.mod h1:pZFVF2imlfZMT5w6899ZwXCLKVccZ9GDJzdLHJ+ONik=
-github.com/siyuan-note/dejavu v0.0.0-20220613144035-412877c5ffa6 h1:YwbEqSGcdnS15HakNOZpCtI80rthjQM87FXHRsYIa6M=
-github.com/siyuan-note/dejavu v0.0.0-20220613144035-412877c5ffa6/go.mod h1:pZFVF2imlfZMT5w6899ZwXCLKVccZ9GDJzdLHJ+ONik=
+github.com/siyuan-note/dejavu v0.0.0-20220613153354-81a47b3b32e4 h1:T/9WkfZBN2xTsSpkAwx2u6iNNA2t0j5M86M6o59G4pE=
+github.com/siyuan-note/dejavu v0.0.0-20220613153354-81a47b3b32e4/go.mod h1:Oa/Y6fvTUCg8h9/t6GNWXiu8T7aQri/ZvyDRygnlikI=
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676 h1:QB9TjJQFhXhZ6dAtPpY02DlzHAQm1C+WqZq6OadG8mI=
github.com/siyuan-note/encryption v0.0.0-20220612074546-f1dd94fe8676/go.mod h1:H8fyqqAbp9XreANjeSbc72zEdFfKTXYN34tc1TjZwtw=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=