mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 15:45:00 +00:00
fix: :node property values should show unique names by tag
Fixes logseq/db-test#44 and also a part of LOG-3191
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
frontend.components.query.result query-result
|
||||
frontend.components.class class-component
|
||||
frontend.components.property property-component
|
||||
frontend.components.title title
|
||||
frontend.common.date common-date
|
||||
frontend.common.file.core common-file
|
||||
frontend.common.file.util wfu
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
[electron.ipc :as ipc]
|
||||
[frontend.db.async :as db-async]
|
||||
[logseq.db.frontend.content :as db-content]
|
||||
[logseq.db :as ldb]))
|
||||
[logseq.db :as ldb]
|
||||
[frontend.components.title :as title]))
|
||||
|
||||
;; local state
|
||||
(defonce *dragging?
|
||||
@@ -546,7 +547,7 @@
|
||||
page-name-in-block is the overridable name of the page (legacy)
|
||||
|
||||
All page-names are sanitized except page-name-in-block"
|
||||
[state {:keys [contents-page? whiteboard-page? html-export? meta-click?] :as config} page-entity children label]
|
||||
[state {:keys [contents-page? whiteboard-page? html-export? meta-click? show-unique-title?] :as config} page-entity children label]
|
||||
(let [*hover? (::hover? state)
|
||||
*mouse-down? (::mouse-down? state)
|
||||
tag? (:tag? config)
|
||||
@@ -618,6 +619,9 @@
|
||||
(coll? label)
|
||||
(->elem :span (map-inline config label))
|
||||
|
||||
show-unique-title?
|
||||
(title/block-unique-title page-entity)
|
||||
|
||||
:else
|
||||
(let [title (:block/title page-entity)
|
||||
s (cond untitled?
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
[logseq.db.frontend.property.type :as db-property-type]
|
||||
[dommy.core :as d]
|
||||
[frontend.search :as search]
|
||||
[goog.functions :refer [debounce]]))
|
||||
[goog.functions :refer [debounce]]
|
||||
[frontend.components.title :as title]))
|
||||
|
||||
(rum/defc property-empty-btn-value
|
||||
[& {:as opts}]
|
||||
@@ -388,7 +389,7 @@
|
||||
options (map (fn [node]
|
||||
(let [id (or (:value node) (:db/id node))
|
||||
label (if (integer? id)
|
||||
(let [title (subs (:block/title node) 0 256)
|
||||
(let [title (subs (title/block-unique-title node) 0 256)
|
||||
node (or (db/entity id) node)
|
||||
icon (get-node-icon node)]
|
||||
[:div.flex.flex-row.items-center.gap-1
|
||||
@@ -675,6 +676,7 @@
|
||||
(page-cp {:disable-preview? true
|
||||
:tag? tag?
|
||||
:hide-close-button? true
|
||||
:show-unique-title? true
|
||||
:meta-click? other-position?} value)
|
||||
(:db/id value)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user