|
@@ -414,7 +414,7 @@
|
|
|
root-block-id (:block/uuid root-block)]
|
|
|
[:div.ls-card
|
|
|
{:class (when (or preview? modal?)
|
|
|
- (util/hiccup->class ".flex.flex-col.resize.overflow-y-auto.px-4"))}
|
|
|
+ (util/hiccup->class ".flex.flex-col.resize.overflow-y-auto"))}
|
|
|
(let [repo (state/get-current-repo)]
|
|
|
[:div.my-2.opacity-70.hover:opacity-100
|
|
|
(component-block/block-parents {} repo root-block-id
|
|
@@ -435,38 +435,39 @@
|
|
|
3 [:span "Show clozes " (ui/keyboard-shortcut [:s])])
|
|
|
:id "card-answers"
|
|
|
:class "mr-2"
|
|
|
- :large? true
|
|
|
- :on-click #(reset! phase next-phase)))
|
|
|
+ :on-click #(reset! phase next-phase)))
|
|
|
|
|
|
(when (and (> (count cards) 1) preview?)
|
|
|
(ui/button [:span "Next " (ui/keyboard-shortcut [:n])]
|
|
|
:id "card-next"
|
|
|
:class "mr-2"
|
|
|
- :large? true
|
|
|
- :on-click #(skip-card card card-index cards phase review-records cb)))
|
|
|
+ :on-click #(skip-card card card-index cards phase review-records cb)))
|
|
|
|
|
|
(when (and (not preview?) (= 1 next-phase))
|
|
|
(let [interval-days-score-3 (get (get-next-interval card 3) card-last-interval-property)
|
|
|
interval-days-score-4 (get (get-next-interval card 5) card-last-interval-property)
|
|
|
interval-days-score-5 (get (get-next-interval card 5) card-last-interval-property)]
|
|
|
[:div.flex.flex-row.justify-between
|
|
|
- (ui/button [:span "Forgotten " (ui/keyboard-shortcut [:f])]
|
|
|
- :id "card-forgotten"
|
|
|
- :large? true
|
|
|
- :on-click (fn []
|
|
|
- (score-and-next-card 1 card card-index cards phase review-records cb)
|
|
|
- (let [tomorrow (tc/to-string (t/plus (t/today) (t/days 1)))]
|
|
|
- (editor-handler/set-block-property! root-block-id card-next-schedule-property tomorrow))))
|
|
|
-
|
|
|
- (ui/button [:span "Remembered " (ui/keyboard-shortcut [:r])]
|
|
|
- :id "card-remembered"
|
|
|
- :large? true
|
|
|
- :on-click #(score-and-next-card 5 card card-index cards phase review-records cb))
|
|
|
-
|
|
|
- (ui/button [:span "Took a while to recall " (ui/keyboard-shortcut [:t])]
|
|
|
- :id "card-recall"
|
|
|
- :large? true
|
|
|
- :on-click #(score-and-next-card 3 card card-index cards phase review-records cb))]))]
|
|
|
+ (ui/button (if (util/mobile?)
|
|
|
+ "Forgotten"
|
|
|
+ [:span "Forgotten " (ui/keyboard-shortcut [:f])])
|
|
|
+ :id "card-forgotten"
|
|
|
+ :on-click (fn []
|
|
|
+ (score-and-next-card 1 card card-index cards phase review-records cb)
|
|
|
+ (let [tomorrow (tc/to-string (t/plus (t/today) (t/days 1)))]
|
|
|
+ (editor-handler/set-block-property! root-block-id card-next-schedule-property tomorrow))))
|
|
|
+
|
|
|
+ (ui/button (if (util/mobile?)
|
|
|
+ "Remembered"
|
|
|
+ [:span "Remembered " (ui/keyboard-shortcut [:r])])
|
|
|
+ :id "card-remembered"
|
|
|
+ :on-click #(score-and-next-card 5 card card-index cards phase review-records cb))
|
|
|
+
|
|
|
+ (ui/button (if (util/mobile?)
|
|
|
+ "Hard"
|
|
|
+ [:span "Took a while to recall " (ui/keyboard-shortcut [:t])])
|
|
|
+ :id "card-recall"
|
|
|
+ :on-click #(score-and-next-card 3 card card-index cards phase review-records cb))]))]
|
|
|
|
|
|
(when preview?
|
|
|
(ui/tippy {:html [:div.text-sm
|