fix: show Set icon button when icon is deleted via :none sentinel

The visibility check only handled nil icons, not the {:type :none} value
written when the user explicitly deletes an icon. Treat both as "no icon".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
scheinriese
2026-04-16 14:52:02 +02:00
parent 16d77abef2
commit d2415cf595

View File

@@ -235,7 +235,8 @@
[page]
[:div.ls-page-title-actions
[:div.flex.flex-row.items-center.gap-2
(when-not (:logseq.property/icon (db/entity (:db/id page)))
(when (let [icon (:logseq.property/icon (db/entity (:db/id page)))]
(or (nil? icon) (= (:type icon) :none)))
(shui/button
{:variant :ghost
:size :sm