mirror of https://github.com/logseq/logseq
Make button on SR card UI big
parent
0a4b8846e2
commit
0ec448a073
|
@ -435,13 +435,14 @@
|
|||
3 [:span "Show clozes " (ui/keyboard-shortcut [:s])])
|
||||
:id "card-answers"
|
||||
:class "mr-2"
|
||||
:large? true
|
||||
:on-click #(reset! phase next-phase)))
|
||||
|
||||
(when (and (> (count cards) 1) preview?)
|
||||
(ui/button "Next(n)"
|
||||
(ui/button [:span "Next " (ui/keyboard-shortcut [:n])]
|
||||
:id "card-next"
|
||||
:small? true
|
||||
:class "mr-2"
|
||||
:large? true
|
||||
:on-click #(skip-card card card-index cards phase review-records cb)))
|
||||
|
||||
(when (and (not preview?) (= 1 next-phase))
|
||||
|
@ -451,6 +452,7 @@
|
|||
[: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)))]
|
||||
|
@ -458,10 +460,12 @@
|
|||
|
||||
(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))]))]
|
||||
|
||||
(when preview?
|
||||
|
|
|
@ -218,12 +218,14 @@
|
|||
(state/pub-event! [:modal/show
|
||||
[:div
|
||||
[:h1.title "Reload Logseq?"]
|
||||
(ui/button [:span "Yes " (ui/keyboard-shortcut ["enter"])]
|
||||
:autoFocus "on"
|
||||
:on-click (fn []
|
||||
(pool/terminate-parser-pool!)
|
||||
(p/let [_ (el/persist-dbs!)]
|
||||
(reset! triggered? true)
|
||||
(js/window.location.reload))))]])
|
||||
(ui/button
|
||||
[:span "Yes " (ui/keyboard-shortcut ["enter"])]
|
||||
:autoFocus "on"
|
||||
:large? true
|
||||
:on-click (fn []
|
||||
(pool/terminate-parser-pool!)
|
||||
(p/let [_ (el/persist-dbs!)]
|
||||
(reset! triggered? true)
|
||||
(js/window.location.reload))))]])
|
||||
(reset! triggered? false)
|
||||
(set! (.-returnValue e) "")))))
|
||||
|
|
|
@ -110,12 +110,13 @@
|
|||
opts))
|
||||
|
||||
(defn button
|
||||
[text & {:keys [background href class intent on-click small?]
|
||||
:or {small? false}
|
||||
[text & {:keys [background href class intent on-click small? large?]
|
||||
:or {small? false large? false}
|
||||
:as option}]
|
||||
(let [klass (when-not intent ".bg-indigo-600.hover:bg-indigo-700.focus:border-indigo-700.active:bg-indigo-700")
|
||||
klass (if background (string/replace klass "indigo" background) klass)
|
||||
klass (if small? (str klass ".px-2.py-1") klass)]
|
||||
klass (if small? (str klass ".px-2.py-1") klass)
|
||||
klass (if large? (str klass ".text-base") klass)]
|
||||
(if href
|
||||
[:a.ui__button.is-link
|
||||
(merge
|
||||
|
|
Loading…
Reference in New Issue