mirror of
https://github.com/logseq/logseq.git
synced 2026-05-19 02:12:41 +00:00
fix: inherit tab-bar selected color into text-picker on mount
Pass the icon-search *color atom value as :selected-color to text-picker, so the text-picker's color initializes from the tab-bar selection when no existing icon color is saved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3047,10 +3047,11 @@
|
||||
existing-value (get-in current-icon [:data :value])
|
||||
existing-alignment (get-in current-icon [:data :alignment])
|
||||
existing-color (get-in current-icon [:data :color])
|
||||
selected-color (:selected-color opts)
|
||||
existing-mode (get-in current-icon [:data :mode])]
|
||||
(reset! (::text-value s) (or existing-value (derive-initials title)))
|
||||
(reset! (::alignment s) (or existing-alignment "center"))
|
||||
(reset! (::color s) existing-color)
|
||||
(reset! (::color s) (or existing-color selected-color))
|
||||
(reset! (::mode s) (or existing-mode "initials"))
|
||||
s))
|
||||
:will-unmount (fn [s]
|
||||
@@ -3324,6 +3325,7 @@
|
||||
:on-delete #(on-chosen nil)
|
||||
:del-btn? del-btn?
|
||||
:current-icon normalized-icon-value
|
||||
:selected-color @*color
|
||||
:page-title page-title})
|
||||
|
||||
;; Default - Level 1: Icon Picker view
|
||||
|
||||
Reference in New Issue
Block a user