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/8057

Vanessa83318d624614
diff --git a/app/src/assets/scss/component/_button.scss b/app/src/assets/scss/component/_button.scss
index 9c84b2553d..f34a57411b 100644
--- a/app/src/assets/scss/component/_button.scss
+++ b/app/src/assets/scss/component/_button.scss
@@ -81,7 +81,7 @@
&--outline {
color: var(--b3-theme-primary);
- box-shadow: inset 0 0 0 .4px var(--b3-theme-primary);
+ box-shadow: inset 0 0 0 .6px var(--b3-theme-primary);
background-color: transparent;
&:hover,
diff --git a/app/src/assets/scss/component/_select.scss b/app/src/assets/scss/component/_select.scss
index d12b88e65e..890978046c 100644
--- a/app/src/assets/scss/component/_select.scss
+++ b/app/src/assets/scss/component/_select.scss
@@ -9,13 +9,13 @@
min-width: 200px;
height: 28px;
font-size: 14px;
- box-shadow: inset 0 0 0 0.4px var(--b3-theme-on-surface-light);
+ box-shadow: inset 0 0 0 0.6px var(--b3-theme-on-surface-light);
background: var(--b3-select-background);
appearance: none;
cursor: pointer;
&:hover {
- box-shadow: inset 0 0 0 .4px var(--b3-theme-on-background);
+ box-shadow: inset 0 0 0 .6px var(--b3-theme-on-background);
background-color: var(--b3-theme-background-light);
}
diff --git a/app/src/assets/scss/component/_text-field.scss b/app/src/assets/scss/component/_text-field.scss
index 5b40b46903..06f282dbec 100644
--- a/app/src/assets/scss/component/_text-field.scss
+++ b/app/src/assets/scss/component/_text-field.scss
@@ -1,7 +1,7 @@
.b3-text-field {
border: 0;
border-radius: 4px;
- box-shadow: inset 0 0 0 .4px var(--b3-theme-on-surface-light);
+ box-shadow: inset 0 0 0 .6px var(--b3-theme-on-surface-light);
padding: 4px 8px;
line-height: 20px;
box-sizing: border-box;
@@ -10,7 +10,7 @@
background-color: var(--b3-theme-background);
&:not(.b3-text-field--text):hover {
- box-shadow: inset 0 0 0 .4px var(--b3-theme-on-background);
+ box-shadow: inset 0 0 0 .6px var(--b3-theme-on-background);
}
&:not(.b3-text-field--text):focus {
diff --git a/app/src/assets/scss/mobile.scss b/app/src/assets/scss/mobile.scss
index 23fd47f514..cf457f9b5f 100644
--- a/app/src/assets/scss/mobile.scss
+++ b/app/src/assets/scss/mobile.scss
@@ -338,7 +338,7 @@
align-items: center;
margin-right: 8px;
position: relative;
- box-shadow: inset 0 0 0 .4px var(--b3-theme-on-surface-light);
+ box-shadow: inset 0 0 0 .6px var(--b3-theme-on-surface-light);
}
&-empty {
diff --git a/app/src/history/history.ts b/app/src/history/history.ts
index 71ebec4159..88a071ff6e 100644
--- a/app/src/history/history.ts
+++ b/app/src/history/history.ts
@@ -83,6 +83,8 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string
if (type === "cloudTag") {
actionHTML = `<span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="downloadSnapshot" aria-label="${window.siyuan.languages.download}"><svg><use xlink:href="#iconDownload"></use></svg></span>
<span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="removeCloudRepoTagSnapshot" aria-label="${window.siyuan.languages.remove}"><svg><use xlink:href="#iconTrashcan"></use></svg></span>`;
+ } else if (type === "cloud") {
+ actionHTML = `<span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="downloadSnapshot" aria-label="${window.siyuan.languages.download}"><svg><use xlink:href="#iconDownload"></use></svg></span>`;
} else if (type === "localTag") {
actionHTML = `<span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="uploadSnapshot" aria-label="${window.siyuan.languages.upload}"><svg><use xlink:href="#iconUpload"></use></svg></span>
<span class="b3-list-item__action b3-tooltips b3-tooltips__w" data-type="rollback" aria-label="${window.siyuan.languages.rollback}"><svg><use xlink:href="#iconUndo"></use></svg></span>
@@ -139,11 +141,14 @@ const renderRepo = (element: Element, currentPage: number) => {
fetchPost("/api/repo/getRepoTagSnapshots", {}, (response) => {
renderRepoItem(response, element, "localTag");
});
- }
- if (currentPage === -2) {
+ } else if (currentPage === -2) {
fetchPost("/api/repo/getCloudRepoTagSnapshots", {}, (response) => {
renderRepoItem(response, element, "cloudTag");
});
+ } else if (currentPage === -3) {
+ fetchPost("/api/repo/getCloudRepoSnapshots", {marker: ""}, (response) => {
+ renderRepoItem(response, element, "cloud");
+ });
}
previousElement.classList.add("fn__none");
nextElement.classList.add("fn__none");
@@ -286,6 +291,7 @@ export const openHistory = () => {
<select class="b3-select" style="min-width: auto">
<option value="0">${window.siyuan.languages.localSnapshot}</option>
<option value="1">${window.siyuan.languages.localTagSnapshot}</option>
+ <option value="3">${window.siyuan.languages.cloudSnapshot}</option>
<option value="2">${window.siyuan.languages.cloudTagSnapshot}</option>
</select>
<span class="fn__space"></span>
@@ -368,9 +374,11 @@ const bindEvent = (element: Element, dialog?: Dialog) => {
renderRepo(repoElement, -1);
} else if (value === "2") {
renderRepo(repoElement, -2);
+ } else if (value === "3") {
+ renderRepo(repoElement, -3);
}
const btnElement = element.querySelector(".b3-button[data-type='compare']");
- btnElement.removeAttribute("disabled");
+ btnElement.setAttribute("disabled", "disabled");
btnElement.removeAttribute("data-ids");
});
element.addEventListener("click", (event) => {