Skip to content

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

:bug: Cannot select `Again` for spaced repetition Fix https://github.com/siyuan-note/siyuan/issues/8875

Daniel5d20a2d631e8
diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.ts
index 19d5d72152..5e576ca185 100644
--- a/app/src/card/openCard.ts
+++ b/app/src/card/openCard.ts
@@ -80,28 +80,28 @@ export const genCardHTML = (options: {
</div>
<div>
<span></span>
- <button data-type="0" aria-label="1 / j" class="b3-button b3-button--error b3-tooltips__n b3-tooltips">
+ <button data-type="1" aria-label="1 / j" class="b3-button b3-button--error b3-tooltips__n b3-tooltips">
<div>🙈</div>
${window.siyuan.languages.cardRatingAgain} (1)
</button>
</div>
<div>
<span></span>
- <button data-type="1" aria-label="2 / k" class="b3-button b3-button--warning b3-tooltips__n b3-tooltips">
+ <button data-type="2" aria-label="2 / k" class="b3-button b3-button--warning b3-tooltips__n b3-tooltips">
<div>😬</div>
${window.siyuan.languages.cardRatingHard} (2)
</button>
</div>
<div>
<span></span>
- <button data-type="2" aria-label="3 / l" class="b3-button b3-button--info b3-tooltips__n b3-tooltips">
+ <button data-type="3" aria-label="3 / l" class="b3-button b3-button--info b3-tooltips__n b3-tooltips">
<div>😊</div>
${window.siyuan.languages.cardRatingGood} (3)
</button>
</div>
<div>
<span></span>
- <button data-type="3" aria-label="4 / ;" class="b3-button b3-button--success b3-tooltips__n b3-tooltips">
+ <button data-type="4" aria-label="4 / ;" class="b3-button b3-button--success b3-tooltips__n b3-tooltips">
<div>🌈</div>
${window.siyuan.languages.cardRatingEasy} (4)
</button>
@@ -184,13 +184,13 @@ export const bindCardEvent = (options: {
let type = "";
if (typeof event.detail === "string") {
if (event.detail === "1" || event.detail === "j") {
- type = "0";
- } else if (event.detail === "2" || event.detail === "k") {
type = "1";
- } else if (event.detail === "3" || event.detail === "l") {
+ } else if (event.detail === "2" || event.detail === "k") {
type = "2";
- } else if (event.detail === "4" || event.detail === ";") {
+ } else if (event.detail === "3" || event.detail === "l") {
type = "3";
+ } else if (event.detail === "4" || event.detail === ";") {
+ type = "4";
} else if (event.detail === " ") {
type = "-1";
} else if (event.detail === "p") {