diff --git a/deps/shui/src/logseq/shui/list_item/v1.cljs b/deps/shui/src/logseq/shui/list_item/v1.cljs index 49f569472..c439d80ba 100644 --- a/deps/shui/src/logseq/shui/list_item/v1.cljs +++ b/deps/shui/src/logseq/shui/list_item/v1.cljs @@ -36,26 +36,26 @@ (let [normalized-text (normalize-text app-config text)] (loop [[query-token & more] (string/split normal-query #" ") result [[:text (to-string text)]]] - (if-not query-token - (->> result - (map (fn [[type value]] - (if (= type :text) - [:span value] - [:span {:style {:background "var(--lx-accent-09)"}} value]))) - (into [:span])) - (->> result - (mapcat (fn [[type value]] - (let [include-token? (and (= type :text) (string? value) - (string/includes? normalized-text query-token))] - (if include-token? - (let [normal-value (normalize-text app-config value) - normal-query-token (normalize-text app-config query-token) - [before-text highlighted-text after-text] (split-text-on-highlight value query-token normal-value normal-query-token)] - [[:text before-text] - [:match highlighted-text] - [:text after-text]]) - [[type value]])))) - (recur more)))))) + (if-not query-token + (->> result + (map (fn [[type value]] + (if (= type :text) + [:span value] + [:span {:class "shui__list-item-highlighted-span"} value]))) + (into [:span])) + (->> result + (mapcat (fn [[type value]] + (let [include-token? (and (= type :text) (string? value) + (string/includes? normalized-text query-token))] + (if include-token? + (let [normal-value (normalize-text app-config value) + normal-query-token (normalize-text app-config query-token) + [before-text highlighted-text after-text] (split-text-on-highlight value query-token normal-value normal-query-token)] + [[:text before-text] + [:match highlighted-text] + [:text after-text]]) + [[type value]])))) + (recur more)))))) (defn highlight-query* [app-config query text] (if (vector? text) ; hiccup diff --git a/src/main/frontend/components/cmdk.cljs b/src/main/frontend/components/cmdk.cljs index f4420432e..529e46f24 100644 --- a/src/main/frontend/components/cmdk.cljs +++ b/src/main/frontend/components/cmdk.cljs @@ -612,8 +612,6 @@ (rum/use-effect! (fn [] (js/setTimeout #(when (some-> input-ref deref) (.focus @input-ref)) 0)) []) - ; [:div {:style {:background "var(--lx-gray-02)" - ; :border-bottom "1px solid var(--lx-gray-07)"}}] [:div {:class "bg-gray-02 border-b border-1 border-gray-07"} [:input#search {:class "text-xl bg-transparent border-none w-full outline-none px-3 py-3" diff --git a/src/main/frontend/components/container.css b/src/main/frontend/components/container.css index eb09c979d..ac2c83102 100644 --- a/src/main/frontend/components/container.css +++ b/src/main/frontend/components/container.css @@ -168,12 +168,12 @@ } &:hover { - background-color: or(--ls-left-sidebar-hover-background, --lx-gray-04, --ls-tertiary-background-color); + background-color: or(--ls-left-sidebar-hover-background, --lx-gray-04, --ls-primary-background-color); color: or(--ls-left-sidebar-text-color-hover, --lx-gray-12); } &.active, &:active { - background-color: or(--ls-left-sidebar-active-background, --lx-gray-04, --ls-quaternary-background-color); + background-color: or(--ls-left-sidebar-active-background, --lx-gray-04, --ls-primary-background-color); color: or(--ls-left-sidebar-active-text-color, --lx-gray-12); .ui__icon { opacity: .9;