mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
add capacitor-worker-repl
This commit is contained in:
@@ -36,8 +36,16 @@
|
||||
runtime-id (apply (if (= :old runtime-id-or-which) min max) runtime-ids)]
|
||||
(worker-repl runtime-id)))))
|
||||
|
||||
(defn runtime-id-list
|
||||
(defn capacitor-worker-repl
|
||||
[]
|
||||
(->> (api/repl-runtimes :app)
|
||||
(when-let [runtime-id (->> (api/repl-runtimes :capacitor-new)
|
||||
(filter (fn [runtime] (= :browser-worker (:host runtime))))
|
||||
(map :client-id)
|
||||
(apply max))]
|
||||
(api/repl :capacitor-new {:runtime-id runtime-id})))
|
||||
|
||||
(defn runtime-id-list
|
||||
[app]
|
||||
(->> (api/repl-runtimes app)
|
||||
(filter (fn [runtime] (= :browser-worker (:host runtime))))
|
||||
(map :client-id)))
|
||||
|
||||
@@ -229,13 +229,14 @@ independent of format as format specific heading characters are stripped"
|
||||
|
||||
(defn get-block-deep-last-open-child-id
|
||||
[db db-id]
|
||||
(loop [node (db-utils/entity db db-id)]
|
||||
(if-let [last-child-id (get-block-last-direct-child-id db (:db/id node) true)]
|
||||
(let [e (db-utils/entity db last-child-id)]
|
||||
(if (or (:block/collapsed? e) (empty? (:block/_parent e)))
|
||||
last-child-id
|
||||
(recur e)))
|
||||
nil)))
|
||||
(when db
|
||||
(loop [node (db-utils/entity db db-id)]
|
||||
(if-let [last-child-id (get-block-last-direct-child-id db (:db/id node) true)]
|
||||
(let [e (db-utils/entity db last-child-id)]
|
||||
(if (or (:block/collapsed? e) (empty? (:block/_parent e)))
|
||||
last-child-id
|
||||
(recur e)))
|
||||
nil))))
|
||||
|
||||
(def page? ldb/page?)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user