ui: monochrome unicode glyphs + zoom arrow icons

- Zoom X/Y sliders labelled ↔ / ↕
- dark toggle ◐/◑, pause ❚❚, warnings △, drop 🔗 — no color emoji in the
  1-bit theme

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-06-30 01:01:27 -04:00
parent ed5db0ce17
commit 533d14ce49

View file

@ -26,7 +26,7 @@
(defn- dark-toggle [] (defn- dark-toggle []
[:button.dark-toggle {:title "Toggle dark mode" [:button.dark-toggle {:title "Toggle dark mode"
:on-click #(apply-dark! (swap! dark? not))} :on-click #(apply-dark! (swap! dark? not))}
(if @dark? "☀ Light" "☾ Dark")]) (if @dark? "◑ Light" "◐ Dark")])
(def ^:private seek-guard-frames 0.75) (def ^:private seek-guard-frames 0.75)
(def ^:private seek-settle-frames 2) (def ^:private seek-settle-frames 2)
@ -340,7 +340,7 @@
[:span.link-chip {:class (when-not lf "broken") [:span.link-chip {:class (when-not lf "broken")
:title (when-not lf "linked clip no longer in this timeline") :title (when-not lf "linked clip no longer in this timeline")
:on-click #(when lf (goto! lf))} :on-click #(when lf (goto! lf))}
(when-not lf "⚠ ") label (when-not lf "△ ") label
(when lf [:span.link-f (str " " (js/Math.round lf) "f")])]))))) (when lf [:span.link-f (str " " (js/Math.round lf) "f")])])))))
(defn- build-chip [{:keys [label ref at kind]}] (defn- build-chip [{:keys [label ref at kind]}]
@ -354,7 +354,7 @@
(set! (.-contentEditable span) "false") (set! (.-contentEditable span) "false")
(when-not ok (set! (.-title span) (if timeline? "timeline no longer here" (when-not ok (set! (.-title span) (if timeline? "timeline no longer here"
"linked clip no longer in this timeline"))) "linked clip no longer in this timeline")))
(set! (.-textContent span) (str (cond timeline? "⤢ " (not ok) "⚠ ") label)) (set! (.-textContent span) (str (cond timeline? "⤢ " (not ok) "△ ") label))
(aset (.-dataset span) "label" label) (aset (.-dataset span) "label" label)
(aset (.-dataset span) "ref" (name ref)) (aset (.-dataset span) "ref" (name ref))
(when kind (aset (.-dataset span) "kind" (name kind))) (when kind (aset (.-dataset span) "kind" (name kind)))
@ -622,7 +622,7 @@
:class (when (= (:id a) active) "active") :class (when (= (:id a) active) "active")
:style {:border-left (str "8px solid " (:color a))}} :style {:border-left (str "8px solid " (:color a))}}
[:div.ann-head [:div.ann-head
[:div.ann-title (when (:broken a) [:span {:title (:reason a)} "⚠ "]) (:name a) [:div.ann-title (when (:broken a) [:span {:title (:reason a)} "△ "]) (:name a)
(when (seq (:script a)) [:span.script-badge {:title "linked to script"} "¶"])] (when (seq (:script a)) [:span.script-badge {:title "linked to script"} "¶"])]
[:div.ann-actions [:div.ann-actions
[jump-control open a scene segs] [jump-control open a scene segs]
@ -687,7 +687,7 @@
:on-commit #(commit-link! (select-keys % [:ref :at :kind]) (:label %)) :on-commit #(commit-link! (select-keys % [:ref :at :kind]) (:label %))
:on-cancel #(rf/dispatch [::events/cancel-linking])}] :on-cancel #(rf/dispatch [::events/cancel-linking])}]
[:button.add-mark {:type "button" :on-click #(rf/dispatch [::events/start-linking gid])} [:button.add-mark {:type "button" :on-click #(rf/dispatch [::events/start-linking gid])}
"🔗 Insert link"]) "Insert link"])
(when (and linking (= gid (:gid linking))) (when (and linking (= gid (:gid linking)))
[:div.form-hint "Click a clip or the frame-readout to link it, or pick above."]) [:div.form-hint "Click a clip or the frame-readout to link it, or pick above."])
(when-not root? (when-not root?
@ -761,17 +761,17 @@
[:div.transport [:div.transport
[:button.step-btn {:title "Previous frame" :disabled (<= ph 0) [:button.step-btn {:title "Previous frame" :disabled (<= ph 0)
:on-click #(goto! (max 0 (dec ph)))} "◁"] :on-click #(goto! (max 0 (dec ph)))} "◁"]
[:button.play-btn {:on-click toggle-play! :title "Play / pause"} (if playing? "⏸" "▶")] [:button.play-btn {:on-click toggle-play! :title "Play / pause"} (if playing? "❚❚" "▶")]
[:button.step-btn {:title "Next frame" :disabled (>= ph len) [:button.step-btn {:title "Next frame" :disabled (>= ph len)
:on-click #(goto! (min len (inc ph)))} "▷"]] :on-click #(goto! (min len (inc ph)))} "▷"]]
(when (and authed? (not authoring?)) (when (and authed? (not authoring?))
[:button.add-annotation {:title "Add annotation" [:button.add-annotation {:title "Add annotation"
:on-click #(rf/dispatch [::events/open-draft])} :on-click #(rf/dispatch [::events/open-draft])}
"+ Annotation"]) "+ Annotation"])
[:label.slider "Zoom X" [:label.slider {:title "Horizontal zoom"} "↔"
[:input {:type "range" :min 2 :max 400 :value zoom [:input {:type "range" :min 2 :max 400 :value zoom
:on-change #(rf/dispatch [::events/set-zoom (js/parseFloat (.. % -target -value))])}]] :on-change #(rf/dispatch [::events/set-zoom (js/parseFloat (.. % -target -value))])}]]
[:label.slider "Zoom Y" [:label.slider {:title "Vertical zoom"} "↕"
[:input {:type "range" :min 8 :max 120 :value row-h [:input {:type "range" :min 8 :max 120 :value row-h
:on-change #(rf/dispatch [::events/set-row-h (js/parseFloat (.. % -target -value))])}]] :on-change #(rf/dispatch [::events/set-row-h (js/parseFloat (.. % -target -value))])}]]
[dark-toggle]])) [dark-toggle]]))
@ -890,7 +890,7 @@
draft? (some? @(rf/subscribe [::subs/draft-group])) draft? (some? @(rf/subscribe [::subs/draft-group]))
save-err @(rf/subscribe [::subs/save-error])] save-err @(rf/subscribe [::subs/save-error])]
[:div.pane-wrap [:div.pane-wrap
(when save-err [:div.err {:style {:padding "4px 8px"}} "⚠ " save-err]) (when save-err [:div.err {:style {:padding "4px 8px"}} "△ " save-err])
[:div.pane-tabs [:div.pane-tabs
[:button {:class (when (= pane :annotations) "active") [:button {:class (when (= pane :annotations) "active")
:on-click #(rf/dispatch [::events/set-pane :annotations])} "Annotations"] :on-click #(rf/dispatch [::events/set-pane :annotations])} "Annotations"]
@ -967,11 +967,11 @@
[:span.muted "signed in as " user " · " [:span.muted "signed in as " user " · "
[:a {:href "#" :on-click #(do (.preventDefault %) (rf/dispatch [::events/logout]))} "log out"] " "]) [:a {:href "#" :on-click #(do (.preventDefault %) (rf/dispatch [::events/logout]))} "log out"] " "])
[dark-toggle]]] [dark-toggle]]]
(when net-err [:div.err "⚠ " net-err]) (when net-err [:div.err "△ " net-err])
(if authed? (if authed?
[:<> [:<>
[:a.add-btn {:href (routes/href :project/new)} "+ New project"] [:a.add-btn {:href (routes/href :project/new)} "+ New project"]
(when proj-err [:div.err "⚠ " proj-err]) (when proj-err [:div.err "△ " proj-err])
(if (seq projects) (if (seq projects)
[:ul.project-list [:ul.project-list
(for [p projects] (for [p projects]