Merge branch 'master' into feat/hnswlib+transformer-js

This commit is contained in:
Tienson Qin
2025-08-03 16:40:22 +08:00
7 changed files with 32 additions and 27 deletions

View File

@@ -38,6 +38,7 @@ const portal = new MagicPortal(worker);
<script defer src="./ionic.js"></script>
<script defer src="./js/main-bundle.js"></script>
<script defer src="./js/main.js"></script>
<script defer src="./js/code-editor.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
window.Capacitor?.Plugins?.SplashScreen?.hide()

View File

@@ -2825,7 +2825,7 @@
(or (ldb/inline-tag? (:block/raw-title block) t)
(:logseq.property.class/hide-from-node t)
(contains? hidden-internal-tags (:db/ident t))
(and (util/mobile?) (= (:db/ident t) :logseq.class/Task))))))
(and (util/mobile?) (contains? #{:logseq.class/Task :logseq.class/Journal} (:db/ident t)))))))
popup-opts {:align :end
:content-props {:on-click (fn [] (shui/popup-hide!))
:class "w-60"}}
@@ -3884,9 +3884,11 @@
*navigating-block (get state ::navigating-block)
navigating-block (rum/react *navigating-block)
navigated? (and (not= (:block/uuid block) navigating-block) navigating-block)
config' (if-let [container-id (::container-id state)]
(assoc config :container-id container-id)
config)]
config' (->
(if-let [container-id (::container-id state)]
(assoc config :container-id container-id)
config)
(assoc :block/uuid (:block/uuid block)))]
(when (:block/uuid block)
(rum/with-key
(block-container-inner state repo config' block
@@ -4372,7 +4374,6 @@
item (or (if loop-linked? item linked-block) item)
item (dissoc item :block/meta)
config' (assoc config
:block/uuid (:block/uuid item)
:loop-linked? loop-linked?)]
(when-not (and loop-linked? (:block/name linked-block))
(rum/with-key (block-container config' item

View File

@@ -542,7 +542,7 @@
}
@container (max-width: 600px) {
.time-spent, .positioned-properties.block-right, .view-actions, .ls-page-title .block-tags {
.time-spent, .positioned-properties.block-right, .view-actions {
display: none;
}

View File

@@ -746,22 +746,22 @@
node)
id (:db/id node)
[header label] (if (integer? id)
(let [node-title (if (seq (:logseq.property/classes property))
(db-content/recur-replace-uuid-in-block-title node)
(block-handler/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)
(when-let [breadcrumb (state/get-component :block/breadcrumb)]
[:div.text-xs.opacity-70
(breadcrumb {:search? true} (state/get-current-repo) (:block/uuid node) {})]))
label [:div.flex.flex-row.items-center.gap-1
(when-not (or (:logseq.property/classes property)
(contains? #{:class :property} (:logseq.property/type property)))
(ui/icon icon {:size 14}))
[:div title]]]
[header label])
(when-let [node-title (if (seq (:logseq.property/classes property))
(db-content/recur-replace-uuid-in-block-title node)
(block-handler/block-unique-title node))]
(let [title (subs node-title 0 256)
node (or (db/entity id) node)
icon (get-node-icon node)
header (when-not (db/page? node)
(when-let [breadcrumb (state/get-component :block/breadcrumb)]
[:div.text-xs.opacity-70
(breadcrumb {:search? true} (state/get-current-repo) (:block/uuid node) {})]))
label [:div.flex.flex-row.items-center.gap-1
(when-not (or (:logseq.property/classes property)
(contains? #{:class :property} (:logseq.property/type property)))
(ui/icon icon {:size 14}))
[:div title]]]
[header label]))
[nil (:block/title node)])]
(assoc node
:header header
@@ -1035,6 +1035,7 @@
(blocks-container config (ldb/sort-by-order value-block))
(rum/with-key
(block-container (assoc config
:block/uuid (:block/uuid value-block)
:property-default-value? default-value?) value-block)
(str (:db/id block) "-" (:db/id property) "-" (:db/id value-block)))))]

View File

@@ -293,7 +293,8 @@
(let [render (fn [block]
[:div
(inline-title
{:table? true}
{:table? true
:block/uuid (:block/uuid block)}
(some->> (:block/title block)
string/trim
string/split-lines

View File

@@ -167,7 +167,7 @@
(util/electron?)
;; fullpath will be encoded
(path/prepend-protocol "assets:" full-path)
(path/prepend-protocol "file:" full-path)
;(mobile-util/native-platform?)
;(mobile-util/convert-file-src full-path)

View File

@@ -44,8 +44,9 @@
(into {}))]
[[:db/add (:db/id entity) :logseq.property.table/sized-columns new-value]])
(:block.temp/fully-loaded? entity)
[[:db/retract (:db/id entity) :block.temp/fully-loaded?]]
(some (fn [k] (= "block.temp" (namespace k))) (keys entity))
(let [ks (filter (fn [k] (= "block.temp" (namespace k))) (keys entity))]
(mapv (fn [k] [:db/retract (:db/id entity) k]) ks))
(and (:block/page entity) (not (:block/parent entity)))
[[:db/add (:db/id entity) :block/parent (:db/id (:block/page entity))]]
(and (not (:block/page entity)) (not (:block/parent entity)) (not (:block/name entity)))
@@ -82,7 +83,7 @@
[[:db/retract (:e d) (:a d) (:v d)]]))))))
tx-data (concat fix-tx-data class-as-properties)]
(when (seq tx-data)
(ldb/transact! conn tx-data {:fix-db? true}))))
(d/transact! conn tx-data {:fix-db? true}))))
(defn validate-db
[conn]