mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 00:24:51 +00:00
fix: favorited block doesn't display reference correctly
fixes https://linear.app/logseq/issue/LOG-3214/favorited-block-doesnt-display-reference-correctly
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
[frontend.components.dnd :as dnd-component]
|
||||
[frontend.components.icon :as icon]
|
||||
[frontend.components.handbooks :as handbooks]
|
||||
[frontend.components.block :as block]
|
||||
[dommy.core :as d]
|
||||
[frontend.components.content :as cp-content]
|
||||
[frontend.components.title :as title]
|
||||
@@ -118,23 +119,29 @@
|
||||
(x-menu-shortcut (shortcut-utils/decorate-binding "shift+click")))]))]
|
||||
|
||||
;; TODO: move to standalone component
|
||||
[:a.flex.items-center.justify-between.relative.group
|
||||
{:title (title/block-unique-title page)
|
||||
:on-click
|
||||
(fn [e]
|
||||
(if (gobj/get e "shiftKey")
|
||||
(open-in-sidebar)
|
||||
(route-handler/redirect-to-page! (:block/uuid page) {:click-from-recent? recent?})))
|
||||
:on-context-menu (fn [^js e]
|
||||
(shui/popup-show! e (x-menu-content)
|
||||
{:as-dropdown? true
|
||||
:content-props {:on-click (fn [] (shui/popup-hide!))
|
||||
:class "w-60"}})
|
||||
(util/stop e))}
|
||||
[:a.flex.items-center.justify-between.relative.group.h-6
|
||||
(cond->
|
||||
{:on-click
|
||||
(fn [e]
|
||||
(if (gobj/get e "shiftKey")
|
||||
(open-in-sidebar)
|
||||
(route-handler/redirect-to-page! (:block/uuid page) {:click-from-recent? recent?})))
|
||||
:on-context-menu (fn [^js e]
|
||||
(shui/popup-show! e (x-menu-content)
|
||||
{:as-dropdown? true
|
||||
:content-props {:on-click (fn [] (shui/popup-hide!))
|
||||
:class "w-60"}})
|
||||
(util/stop e))}
|
||||
(db/page? page)
|
||||
(assoc :title (title/block-unique-title page)))
|
||||
[:span.page-icon.ml-3.justify-center (if whiteboard-page? (ui/icon "whiteboard" {:extension? true}) icon)]
|
||||
[:span.page-title {:class (when untitled? "opacity-50")}
|
||||
(if untitled? (t :untitled)
|
||||
(pdf-utils/fix-local-asset-pagename title))]
|
||||
[:span.page-title {:class (when untitled? "opacity-50")
|
||||
:style {:display "ruby"}}
|
||||
(cond
|
||||
(not (db/page? page))
|
||||
(block/inline-text :markdown (:block/title page))
|
||||
untitled? (t :untitled)
|
||||
:else (pdf-utils/fix-local-asset-pagename title))]
|
||||
|
||||
;; dots trigger
|
||||
(shui/button
|
||||
|
||||
Reference in New Issue
Block a user