Skip to content

Commit

Permalink
fix(ui): theme color related issues (logseq#10638)
Browse files Browse the repository at this point in the history
* fix(ui): accent color doesn't apply to block references link logseq#10619
* enhance(ui): polish details for the keymaps setting
  • Loading branch information
xyhp915 authored Dec 5, 2023
1 parent bfe7f5e commit e56b300
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/main/frontend/colors.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"--ls-quaternary-background-color: var(--rx-" (name gray) "-04); "
"--ls-link-text-color: var(--rx-" (name color) "-11); "
"--ls-link-text-hover-color: var(--rx-" (name color) "-12); "
"--ls-block-ref-link-text-color: var(--rx-" (name color) "-09);"
"--ls-secondary-text-color: var(--rx-" (name gray) "-12); "
"--ls-primary-text-color: var(--rx-" (name gray) "-11); "
"--ls-border-color: var(--rx-" (name gray) "-05); "
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/components/settings.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@

[:div#settings.cp__settings-main
(settings-effect @*active)
[:div.cp__settings-inner {:class "min-h-[65dvh] max-h-[65dvh]"}
[:div.cp__settings-inner {:class "min-h-[65dvh] max-h-[70dvh]"}
[:aside.md:w-64 {:style {:min-width "10rem"}}
[:header.cp__settings-header
[:h1.cp__settings-modal-title (t :settings)]]
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/components/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ svg.cmd {
body[data-settings-tab=keymap] {
.cp__settings-inner {
> article {
@apply p-0;
@apply p-0 lg:w-[680px];

> header {
@apply p-4 pb-2 h-auto;
Expand Down
16 changes: 9 additions & 7 deletions src/main/frontend/components/shortcut.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
[frontend.util :as util]
[frontend.modules.shortcut.utils :as shortcut-utils]
[frontend.modules.shortcut.config :as shortcut-config]
[logseq.shui.core :as shui]
[frontend.shui :refer [make-shui-context]])
[logseq.shui.core :as shui])
(:import [goog.events KeyHandler]))

(defonce categories
Expand Down Expand Up @@ -152,9 +151,13 @@

(rum/defc shortcut-desc-label
[id binding-map]
(when-let [id' (and id binding-map (some-> (str id) (string/replace "plugin." "")))]
[:span {:title (str id' "#" (some-> (:handler-id binding-map) (name)))}
[:span.pl-1 (dh/get-shortcut-desc (assoc binding-map :id id))]]))
(when-let [id' (and id binding-map (str id))]
(let [plugin? (string/starts-with? id' ":plugin.")
id' (if plugin? (some-> id' (string/replace "plugin." "")) id')
plugin-id (when plugin? (namespace id))]
[:span {:title (str id' "#" (some-> (:handler-id binding-map) (name)))}
[:span.px-1 (dh/get-shortcut-desc (assoc binding-map :id id))]
(when plugin? [:code plugin-id])])))

(defn- open-customize-shortcut-dialog!
[id]
Expand Down Expand Up @@ -473,5 +476,4 @@
(not unset?)
[:code.flex.items-center.bg-transparent
(shui/shortcut-v1 (string/join " | " (map #(dh/binding-for-display id %) binding))
(make-shui-context)
{:size :md})])]]))))])])]]))
nil {:size :md})])]]))))])])]]))

0 comments on commit e56b300

Please sign in to comment.