Procházet zdrojové kódy

fix(UI): incorrect graph node edge color from the theme accent color (#10693)

* fix(ui): response layout for the check-updates els from the settings row

* fix(ui): incorrect graph node edge color from the theme accent color
Charlie před 2 roky
rodič
revize
d1362dd771

+ 13 - 9
src/main/frontend/colors.cljs

@@ -80,12 +80,16 @@
 
 (defn get-accent-color
   []
-  (when-let [hsl-color (some-> js/document.documentElement
-                       (js/getComputedStyle)
-                       (.getPropertyValue "--lx-accent-09")
-                       (str/replace "hsl(" "")
-                       (str/replace ")" "")
-                       (str/split ","))]
-    (when-let [hsl-color (and (not (str/blank? (first hsl-color)))
-                           (map js/parseFloat hsl-color))]
-      (apply util/hsl2hex hsl-color))))
+  (when-let [color (some-> js/document.documentElement
+                     (js/getComputedStyle)
+                     (.getPropertyValue "--lx-accent-09"))]
+    (when-not (str/blank? color)
+      (if (str/starts-with? color "#")
+        color
+        (let [hsl-color (some-> color
+                          (str/replace "hsl(" "")
+                          (str/replace ")" "")
+                          (str/split ","))]
+          (when-let [hsl-color (and (not (str/blank? (first hsl-color)))
+                                 (map js/parseFloat hsl-color))]
+            (apply util/hsl2hex hsl-color)))))))

+ 1 - 2
src/main/frontend/components/settings.cljs

@@ -58,8 +58,7 @@
 
      [:div.ctls.flex.items-center
 
-      [:div.mt-1.sm:mt-0.sm:col-span-2
-       {:style {:display "flex" :gap "0.5rem" :align-items "center"}}
+      [:div.mt-1.sm:mt-0.sm:col-span-2.flex.gap-4.items-center.flex-wrap
        [:div (cond
                (mobile-util/native-android?)
                (ui/button