|
@@ -340,22 +340,29 @@
|
|
|
:let [active? (= color color-accent)
|
|
:let [active? (= color color-accent)
|
|
|
none? (= color :none)]]
|
|
none? (= color :none)]]
|
|
|
[:div.flex.items-center {:style {:height 28}}
|
|
[:div.flex.items-center {:style {:height 28}}
|
|
|
- (shui-ui/button
|
|
|
|
|
- {:class "w-5 h-5 px-1 rounded-full flex justify-center items-center transition ease-in duration-100 hover:cursor-pointer hover:opacity-100"
|
|
|
|
|
- :title color
|
|
|
|
|
- :auto-focus (and _in-modal? active?)
|
|
|
|
|
- :style {:background-color (colors/variable color :09)
|
|
|
|
|
- :outline-color (colors/variable color (if active? :07 :06))
|
|
|
|
|
- :outline-width (if active? "4px" "1px")
|
|
|
|
|
- :outline-style :solid
|
|
|
|
|
- :opacity (if active? 1 0.5)}
|
|
|
|
|
- :variant :text
|
|
|
|
|
- :on-click (fn [_e] (state/set-color-accent! color))}
|
|
|
|
|
- [:strong
|
|
|
|
|
- {:class (if none? "h-0.5 w-full bg-red-700"
|
|
|
|
|
- "w-2 h-2 rounded-full transition ease-in duration-100")
|
|
|
|
|
- :style {:background-color (if-not none? (str "var(--rx-" (name color) "-07)") "")
|
|
|
|
|
- :opacity (if (or none? active?) 1 0)}}])])]]
|
|
|
|
|
|
|
+ (ui/tippy
|
|
|
|
|
+ {:html (case color
|
|
|
|
|
+ :none [:p {:style {:max-width "300px"}}
|
|
|
|
|
+ "Cancel accent color. This is currently in beta stage and mainly used for compatibility with custom themes."]
|
|
|
|
|
+ :logseq "Logseq classical color"
|
|
|
|
|
+ (str (name color) " color") )
|
|
|
|
|
+ :delay [1000, 100]}
|
|
|
|
|
+ (shui-ui/button
|
|
|
|
|
+ {:class "w-5 h-5 px-1 rounded-full flex justify-center items-center transition ease-in duration-100 hover:cursor-pointer hover:opacity-100"
|
|
|
|
|
+ :auto-focus (and _in-modal? active?)
|
|
|
|
|
+ :style {:background-color (colors/variable color :09)
|
|
|
|
|
+ :outline-color (colors/variable color (if active? :07 :06))
|
|
|
|
|
+ :outline-width (if active? "4px" "1px")
|
|
|
|
|
+ :outline-style :solid
|
|
|
|
|
+ :opacity (if active? 1 0.5)}
|
|
|
|
|
+ :variant :text
|
|
|
|
|
+ :on-click (fn [_e] (state/set-color-accent! color))}
|
|
|
|
|
+ [:strong
|
|
|
|
|
+ {:class (if none? "h-0.5 w-full bg-red-700"
|
|
|
|
|
+ "w-2 h-2 rounded-full transition ease-in duration-100")
|
|
|
|
|
+ :style {:background-color (if-not none? (str "var(--rx-" (name color) "-07)") "")
|
|
|
|
|
+ :opacity (if (or none? active?) 1 0)}}]))
|
|
|
|
|
+ ])]]
|
|
|
|
|
|
|
|
[:<>
|
|
[:<>
|
|
|
(row-with-button-action {:left-label "Accent color"
|
|
(row-with-button-action {:left-label "Accent color"
|