mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
Merge branch 'master' into enhance/rtc-migrate
This commit is contained in:
@@ -709,17 +709,17 @@
|
||||
(remove (fn [e] (contains? exclude-ids (:block/uuid e)))))]
|
||||
excluded-options)
|
||||
|
||||
(contains? #{:class :property} property-type)
|
||||
(let [classes (cond->
|
||||
(model/get-all-classes
|
||||
repo
|
||||
{:except-root-class? true
|
||||
:except-private-tags? (not (contains? #{:logseq.property/template-applied-to} (:db/ident property)))})
|
||||
(not (or (and (entity-util/page? block) (not (ldb/internal-page? block))) (:logseq.property/created-from-property block)))
|
||||
(conj (db/entity :logseq.class/Page)))]
|
||||
(if (= property-type :class)
|
||||
classes
|
||||
(property-handler/get-class-property-choices)))
|
||||
(= :class property-type)
|
||||
(cond->
|
||||
(model/get-all-classes
|
||||
repo
|
||||
{:except-root-class? true
|
||||
:except-private-tags? (not (contains? #{:logseq.property/template-applied-to} (:db/ident property)))})
|
||||
(not (or (and (entity-util/page? block) (not (ldb/internal-page? block))) (:logseq.property/created-from-property block)))
|
||||
(conj (db/entity :logseq.class/Page)))
|
||||
|
||||
(= :property property-type)
|
||||
(property-handler/get-class-property-choices)
|
||||
|
||||
(seq classes)
|
||||
(->>
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
(js/console.error "Error while restoring repos: " e)))
|
||||
(p/finally (fn []
|
||||
(state/set-db-restoring! false)
|
||||
(p/resolve! state/db-worker-ready-promise true)
|
||||
(p/resolve! state/app-ready-promise true)
|
||||
(when-not (util/mobile?)
|
||||
(p/let [webgpu-available? (db-browser/<check-webgpu-available?)]
|
||||
(log/info :webgpu-available? webgpu-available?)
|
||||
|
||||
@@ -146,7 +146,11 @@
|
||||
(or (some-> (:block/raw-title block-e) (ldb/inline-tag? t))
|
||||
(ldb/private-tags (:db/ident t))))
|
||||
(map (fn [tag] (if (number? tag) (db/entity tag) tag)) (:block/tags block)))]
|
||||
(if (seq tags)
|
||||
(cond
|
||||
(ldb/class? block)
|
||||
(ldb/get-class-title-with-extends block)
|
||||
|
||||
(seq tags)
|
||||
(str (:block/title block)
|
||||
" "
|
||||
(string/join
|
||||
@@ -155,6 +159,7 @@
|
||||
(when-let [title (:block/title tag)]
|
||||
(str "#" title)))
|
||||
tags)))
|
||||
:else
|
||||
(:block/title block))))
|
||||
|
||||
(defn edit-block!
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
(defonce *db-worker (atom nil))
|
||||
(defonce *db-worker-client-id (atom nil))
|
||||
(defonce *editor-info (atom nil))
|
||||
(defonce db-worker-ready-promise (p/deferred))
|
||||
(defonce app-ready-promise (p/deferred))
|
||||
|
||||
(def db-worker-ready-flow
|
||||
"`<invoke-db-worker` throws err if `*db-worker` not ready yet.
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
(fn [^js data]
|
||||
(log/info ::app-url-open data)
|
||||
(p/then
|
||||
state/db-worker-ready-promise
|
||||
state/app-ready-promise
|
||||
(fn []
|
||||
(when-let [url (.-url data)]
|
||||
(when-not (and (= @*last-shared-url url)
|
||||
|
||||
Reference in New Issue
Block a user