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

Vanessa73544bf29775
diff --git a/app/appearance/themes/daylight/theme.css b/app/appearance/themes/daylight/theme.css
index ec91716fd3..9f1d2e5938 100644
--- a/app/appearance/themes/daylight/theme.css
+++ b/app/appearance/themes/daylight/theme.css
@@ -11,6 +11,7 @@
--b3-theme-surface-light: rgba(243, 243, 243, .86);
--b3-theme-surface-lighter: #e0e0e0;
--b3-theme-error: #d23f31;
+ --b3-theme-success: #65b84d;
/* 文字颜色 */
--b3-theme-on-primary: #fff;
diff --git a/app/appearance/themes/daylight/theme.json b/app/appearance/themes/daylight/theme.json
index 3474fdd7a4..d2eb4e8350 100644
--- a/app/appearance/themes/daylight/theme.json
+++ b/app/appearance/themes/daylight/theme.json
@@ -2,7 +2,7 @@
"name": "daylight",
"author": "Vanessa",
"url": "https://github.com/Vanessa219",
- "version": "1.0.5",
+ "version": "1.0.6",
"modes": [
"light"
]
diff --git a/app/appearance/themes/midnight/theme.css b/app/appearance/themes/midnight/theme.css
index 8796287338..b670aa315e 100644
--- a/app/appearance/themes/midnight/theme.css
+++ b/app/appearance/themes/midnight/theme.css
@@ -11,6 +11,7 @@
--b3-theme-surface-light: rgba(41, 42, 45, .86);
--b3-theme-surface-lighter: rgba(230, 230, 230, .06);
--b3-theme-error: #d23f31;
+ --b3-theme-success: #65b84d;
/* 文字颜色 */
--b3-theme-on-primary: #fff;
diff --git a/app/appearance/themes/midnight/theme.json b/app/appearance/themes/midnight/theme.json
index e47505edbb..eddf47d7c9 100644
--- a/app/appearance/themes/midnight/theme.json
+++ b/app/appearance/themes/midnight/theme.json
@@ -2,7 +2,7 @@
"name": "midnight",
"author": "Vanessa",
"url": "https://github.com/Vanessa219",
- "version": "1.0.5",
+ "version": "1.0.6",
"modes": [
"dark"
]
diff --git a/app/src/assets/scss/util/_function.scss b/app/src/assets/scss/util/_function.scss
index 0f51b13e10..aedb40bd01 100644
--- a/app/src/assets/scss/util/_function.scss
+++ b/app/src/assets/scss/util/_function.scss
@@ -175,6 +175,10 @@
color: var(--b3-theme-primary);
}
+ &__success {
+ color: var(--b3-theme-success);
+ }
+
&__secondary {
color: var(--b3-theme-secondary);
}
diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts
index e751e84d3a..0d56bb9869 100644
--- a/app/src/card/openCard.ts
+++ b/app/src/card/openCard.ts
@@ -19,7 +19,11 @@ import {resize} from "../protyle/util/resize";
import {setStorageVal} from "../protyle/util/compatibility";
const genCardCount = (unreviewedNewCardCount: number, unreviewedOldCardCount: number,) => {
- return `<span>${unreviewedNewCardCount}</span> + <span>${unreviewedOldCardCount}</span>`;
+ return `<span class="ft__error">1</span>
+<span class="fn__space"></span>/<span class="fn__space"></span>
+<span class="ariaLabel ft__primary" aria-label="${window.siyuan.languages.flashcardNewCard}">${unreviewedNewCardCount}</span>
+<span class="fn__space"></span>+<span class="fn__space"></span>
+<span class="ariaLabel ft__success" aria-label="${window.siyuan.languages.flashcardReviewCard}">${unreviewedOldCardCount}</span>`;
}
export const genCardHTML = (options: {
@@ -38,7 +42,7 @@ export const genCardHTML = (options: {
iconsHTML = `<div class="toolbar toolbar--border">
<svg class="toolbar__icon"><use xlink:href="#iconRiffCard"></use></svg>
<span class="fn__flex-1 fn__flex-center toolbar__text">${window.siyuan.languages.riffCard}</span>
- <div data-type="count" class="${options.cardsData.unreviewedCount === 0 ? "fn__none" : ""}"><span>1</span>/${genCardCount(options.cardsData.unreviewedNewCardCount, options.cardsData.unreviewedOldCardCount)}</span></div>
+ <div data-type="count" class="${options.cardsData.unreviewedCount === 0 ? "fn__none" : "fn__flex"}">${genCardCount(options.cardsData.unreviewedNewCardCount, options.cardsData.unreviewedOldCardCount)}</span></div>
<svg class="toolbar__icon" data-id="${options.id || ""}" data-cardtype="${options.cardType}" data-type="filter"><use xlink:href="#iconFilter"></use></svg>
<svg class="toolbar__icon" data-type="close"><use xlink:href="#iconCloseRound"></use></svg>
</div>`;
@@ -50,7 +54,7 @@ export const genCardHTML = (options: {
<span class="fn__space"></span>
<span class="fn__flex-center">${window.siyuan.languages.riffCard}</span>`}
<span class="fn__space fn__flex-1 resize__move" style="min-height: 100%"></span>
- <div data-type="count" class="ft__on-surface ft__smaller fn__flex-center${options.cardsData.unreviewedCount === 0 ? " fn__none" : ""}"><span>1</span>/${genCardCount(options.cardsData.unreviewedNewCardCount, options.cardsData.unreviewedOldCardCount)}</span></div>
+ <div data-type="count" class="ft__on-surface ft__smaller fn__flex-center${options.cardsData.unreviewedCount === 0 ? " fn__none" : " fn__flex"}">${genCardCount(options.cardsData.unreviewedNewCardCount, options.cardsData.unreviewedOldCardCount)}</span></div>
<div class="fn__space"></div>
<div data-id="${options.id || ""}" data-cardtype="${options.cardType}" data-type="filter" class="block__icon block__icon--show">
<svg><use xlink:href="#iconFilter"></use></svg>
@@ -507,8 +511,8 @@ const nextCard = (options: {
options.actionElements[1].classList.add("fn__none");
options.editor.protyle.element.classList.remove("fn__none");
options.editor.protyle.element.nextElementSibling.classList.add("fn__none");
- options.countElement.firstElementChild.innerHTML = (options.index + 1).toString();
- options.countElement.classList.remove("fn__none");
+ options.countElement.innerHTML = (options.index + 1).toString();
+ options.countElement.parentElement.classList.remove("fn__none");
if (options.index === 0) {
options.actionElements[0].firstElementChild.setAttribute("disabled", "disabled");
} else {
diff --git a/app/src/dialog/moveResize.ts b/app/src/dialog/moveResize.ts
index c9e564a57b..10663cc774 100644
--- a/app/src/dialog/moveResize.ts
+++ b/app/src/dialog/moveResize.ts
@@ -1,5 +1,6 @@
import {hasClosestByClassName} from "../protyle/util/hasClosest";
import {Constants} from "../constants";
+import {hideAllElements} from "../protyle/ui/hideElements";
export const moveResize = (element: HTMLElement, afterCB?: (type: string) => void) => {
element.addEventListener("mousedown", (event: MouseEvent & { target: HTMLElement }) => {
@@ -131,6 +132,7 @@ export const moveResize = (element: HTMLElement, afterCB?: (type: string) => voi
documentSelf.ondragstart = null;
documentSelf.onselectstart = null;
documentSelf.onselect = null;
+ hideAllElements(["gutter"])
if (hasMove && afterCB) {
afterCB(type);
}