mirror of
https://github.com/logseq/logseq.git
synced 2026-05-26 05:34:07 +00:00
enhance: show title without tags if a property has specified tags
This commit is contained in:
@@ -512,7 +512,10 @@
|
||||
options (map (fn [node]
|
||||
(let [id (or (:value node) (:db/id node))
|
||||
[header label] (if (integer? id)
|
||||
(let [title (subs (title/block-unique-title node) 0 256)
|
||||
(let [node-title (if (seq (:property/schema.classes property))
|
||||
(:block/title node)
|
||||
(title/block-unique-title node))
|
||||
title (subs node-title 0 256)
|
||||
node (or (db/entity id) node)
|
||||
icon (get-node-icon node)
|
||||
header (when-not (db/page? node)
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
[frontend.storage :as storage]
|
||||
[logseq.graph-parser.db :as gp-db]
|
||||
[logseq.db.sqlite.create-graph :as sqlite-create-graph]
|
||||
[logseq.db :as ldb]
|
||||
[frontend.components.title :as title]))
|
||||
[logseq.db :as ldb]))
|
||||
|
||||
(defn- build-links
|
||||
[links]
|
||||
@@ -45,7 +44,7 @@
|
||||
size (int (* 8 (max 1.0 (js/Math.cbrt n))))]
|
||||
(cond->
|
||||
{:id (str (:db/id p))
|
||||
:label (title/block-unique-title p)
|
||||
:label page-title
|
||||
:size size
|
||||
:color color
|
||||
:block/created-at (:block/created-at p)}
|
||||
@@ -72,8 +71,8 @@
|
||||
(defn- normalize-page-name
|
||||
[{:keys [nodes links]}]
|
||||
(let [nodes' (->> (remove-uuids-and-files! nodes)
|
||||
(util/distinct-by (fn [node] (:id node)))
|
||||
(remove nil?))]
|
||||
(util/distinct-by (fn [node] (:id node)))
|
||||
(remove nil?))]
|
||||
{:nodes nodes'
|
||||
:links links}))
|
||||
|
||||
@@ -207,15 +206,15 @@
|
||||
(let [search-nodes (fn [forward?]
|
||||
(let [links (group-by (if forward? :source :target) links)]
|
||||
(loop [nodes nodes
|
||||
level level]
|
||||
(if (zero? level)
|
||||
nodes
|
||||
(recur (distinct (apply concat nodes
|
||||
(map
|
||||
(fn [id]
|
||||
(->> (get links id) (map (if forward? :target :source))))
|
||||
nodes)))
|
||||
(dec level))))))
|
||||
level level]
|
||||
(if (zero? level)
|
||||
nodes
|
||||
(recur (distinct (apply concat nodes
|
||||
(map
|
||||
(fn [id]
|
||||
(->> (get links id) (map (if forward? :target :source))))
|
||||
nodes)))
|
||||
(dec level))))))
|
||||
nodes (concat (search-nodes true) (search-nodes false))
|
||||
nodes (set nodes)]
|
||||
(update graph :nodes
|
||||
|
||||
Reference in New Issue
Block a user