fix: add back missing dicts for flashcard buttons

This commit is contained in:
Tienson Qin
2025-12-30 15:02:56 +08:00
parent c21f2c7f4f
commit 60e79785f6
2 changed files with 12 additions and 9 deletions

View File

@@ -215,16 +215,15 @@
(component-block/blocks-container option [block-entity])) (component-block/blocks-container option [block-entity]))
[:div.mt-8.pb-2 [:div.mt-8.pb-2
(if (contains? #{:show-cloze :show-answer} next-phase) (if (contains? #{:show-cloze :show-answer} next-phase)
(btn-with-shortcut {:btn-text (t (btn-with-shortcut {:btn-text (case next-phase
(case next-phase :show-answer
:show-answer (t :flashcards/modal-btn-show-answers)
:flashcards/modal-btn-show-answers :show-cloze
:show-cloze (t :flashcards/modal-btn-show-clozes)
:flashcards/modal-btn-show-clozes :init
:init (t :flashcards/modal-btn-hide-answers))
:flashcards/modal-btn-hide-answers))
:shortcut "s" :shortcut "s"
:id (str "card-answers") :id "card-answers"
:on-click #(swap! *phase :on-click #(swap! *phase
(fn [phase] (fn [phase]
(phase->next-phase block-entity phase)))}) (phase->next-phase block-entity phase)))})

View File

@@ -247,6 +247,10 @@
:flashcards/modal-welcome-title "Time to create a card!" :flashcards/modal-welcome-title "Time to create a card!"
:flashcards/modal-welcome-desc-1 "You can add \"{1}\" to any block to turn it into a card or trigger \"/cloze\" to add some clozes." :flashcards/modal-welcome-desc-1 "You can add \"{1}\" to any block to turn it into a card or trigger \"/cloze\" to add some clozes."
:flashcards/modal-finished "Congrats, you've reviewed all the cards for this query, see you next time! 💯" :flashcards/modal-finished "Congrats, you've reviewed all the cards for this query, see you next time! 💯"
:flashcards/modal-btn-show-answers "Show answers"
:flashcards/modal-btn-hide-answers "Hide answers"
:flashcards/modal-btn-show-clozes "Show clozes"
:home "Home" :home "Home"
:new-page "New page:" :new-page "New page:"
:new-tag "New tag:" :new-tag "New tag:"