Merge branch 'master' into enhance/search

This commit is contained in:
Mega Yu
2026-02-11 17:55:04 +08:00
14 changed files with 49 additions and 25 deletions

View File

@@ -612,6 +612,8 @@
;; Change to :node as dates can be pages but pages can't be dates
(= {:from :date :to :node} type-change)
(do
(swap! upstream-properties assoc prop {:schema {:logseq.property/type :node}
:from-type :date})
(swap! property-schemas assoc-in [prop :logseq.property/type] :node)
(update-page-or-date-values page-names-to-uuids val))
@@ -2247,6 +2249,7 @@
(-> (select-keys options [:notify-user :default-config :<save-config-file])
(set/rename-keys {:<save-config-file :<save-file})))]
(let [files (common-config/remove-hidden-files *files config rpath-key)
;; Path normalization is needed just for windows
normalized-rpath (fn [f]
(some-> (get f rpath-key) path/path-normalize))
logseq-file? #(string/starts-with? (normalized-rpath %) "logseq/")

View File

@@ -263,7 +263,7 @@
set))))
(testing "user properties"
(is (= 20
(is (= 21
(->> @conn
(d/q '[:find [(pull ?b [:db/ident]) ...]
:where [?b :block/tags :logseq.class/Property]])

View File

@@ -1,8 +1,6 @@
- test :dates
startedAt:: [[Feb 6th, 2024]]
finishedAt:: [[Feb 7th, 2024]]
- test :date -> :node
finishedAt:: [[Gabriel]]
- MEETING TITLE
template:: meeting
participants:: TODO

View File

@@ -1,3 +1,5 @@
- The Creator
type:: [[Movie]]
testTagClass:: #Movie
testTagClass:: #Movie
- test :date -> :node
finishedAt:: [[Gabriel]]

View File

@@ -1 +1,3 @@
- 2nd instance of block w/ longer ns tag #n1/n2/n3
- 2nd instance of block w/ longer ns tag #n1/n2/n3
- property pages with '/' should be valid
key/value:: 1

View File

@@ -428,8 +428,7 @@
(.close win))
(defmethod handle :theme-loaded [^js win]
(.manage (windowStateKeeper) win)
(.show win))
(.manage (windowStateKeeper) win))
(defmethod handle :keychain/save-e2ee-password [_window [_ key encrypted-text]]
(keychain/<set-password! key encrypted-text))

View File

@@ -67,6 +67,8 @@
(callback (bean/->js
{:cancel false
:requestHeaders headers})))))
;; Show window as soon as it's ready
(.once win "ready-to-show" #(.show win))
(.loadURL win url)
;;(when dev? (.. win -webContents (openDevTools)))
win)))

View File

@@ -67,6 +67,7 @@
(defn- finished-cb
[]
(state/pub-event! [:graph/sync-context])
(notification/show! "Import finished!" :success)
(shui/dialog-close! :import-indicator)
(route-handler/redirect-to-home!)

View File

@@ -182,7 +182,8 @@
(if plugin?
[:span.pt-1 (shui/tabler-icon "puzzle" {:size 15 :class "opacity-40"})]
[:span.pt-1 (shui/tabler-icon "letter-t" {:size 15 :class "opacity-40"})])
[:strong.font-normal (:block/title x)]]))
[:strong.font-normal (:block/title x)
(when plugin? [:span.ml-1.text-xs.opacity-40 (str "" _plugin-name)])]]))
:value (:block/uuid x)
:block/title (:block/title x)
:convert-page-to-property? convert?})) properties)

View File

@@ -185,7 +185,7 @@
}
.positioned-properties, .property-value-inner {
.positioned-properties, .property-value-inner, .ls-icon-color-wrap {
.select-item {
@apply flex items-center shrink-0;
}
@@ -193,6 +193,14 @@
.ls-icon-priorityLvlUrgent {
@apply text-orange-rx-08;
}
.ls-icon-priorityLvlMedium {
@apply opacity-80;
}
.ls-icon-priorityLvlLow {
@apply opacity-60;
}
}
.property-value-inner {

View File

@@ -910,6 +910,7 @@
(rum/defc settings-rtc-members
[]
(let [[invite-email set-invite-email!] (hooks/use-state "")
[loading? set-loading!] (hooks/use-state true)
current-repo (state/get-current-repo)
[users-info] (hooks/use-atom (:rtc/users-info @state/state))
users (get users-info current-repo)
@@ -919,7 +920,10 @@
(when graph-uuid
(rtc-handler/<rtc-invite-email graph-uuid invite-email)))))]
(hooks/use-effect!
#(c.m/run-task* (m/sp (c.m/<? (rtc-handler/<rtc-get-users-info))))
#(c.m/run-task*
(m/sp
(c.m/<? (rtc-handler/<rtc-get-users-info))
(set-loading! false)))
[])
[:div.flex.flex-col.gap-2.mt-4
{:on-key-press (fn [e]
@@ -927,13 +931,18 @@
(invite-user!)))}
[:h2.opacity-50.font-medium "Members:"]
[:div.users.flex.flex-col.gap-1
(for [{user-name :user/name
user-email :user/email
graph<->user-user-type :graph<->user/user-type} users]
[:div.flex.flex-row.items-center.gap-2 {:key (str "user-" user-name)}
[:div user-name]
(when user-email [:div.opacity-50.text-sm user-email])
(when graph<->user-user-type [:div.opacity-50.text-sm (name graph<->user-user-type)])])]
(if loading?
(for [i (range 2)]
[:div.flex.flex-row.items-center.gap-2.pr-4 {:key (str "skeleton-" i)}
(shui/skeleton {:class "h-4 w-32"})
(shui/skeleton {:class "h-4 w-full"})])
(for [{user-name :user/name
user-email :user/email
graph<->user-user-type :graph<->user/user-type} users]
[:div.flex.flex-row.items-center.gap-2 {:key (str "user-" user-name)}
[:div user-name]
(when user-email [:div.opacity-50.text-sm user-email])
(when graph<->user-user-type [:div.opacity-50.text-sm (name graph<->user-user-type)])]))]
[:div.flex.flex-col.gap-4.mt-4
(shui/input
{:placeholder "Email address"

View File

@@ -33,8 +33,6 @@
{:ref *el
:class "top-1/2 -left-1/2 z-[-999]"}]))
(defonce *once-theme-loaded? (volatile! false))
(rum/defc ^:large-vars/cleanup-todo container < rum/static
[{:keys [route theme accent-color editor-font on-click current-repo db-restoring?
settings-open? sidebar-open? system-theme? sidebar-blocks-len preferred-language]} child]
@@ -76,10 +74,7 @@
[preferred-language])
(hooks/use-effect!
#(js/setTimeout
(fn [] (when-not @*once-theme-loaded?
(ipc/ipc :theme-loaded)
(vreset! *once-theme-loaded? true))) 100) ; Wait for the theme to be applied
#(ipc/ipc :theme-loaded)
[])
(hooks/use-effect!

View File

@@ -341,7 +341,11 @@ independent of format as format specific heading characters are stripped"
remove-non-queryable-built-in-property? false
remove-ui-non-suitable-properties? false}}]
(let [db (conn/get-db graph)
result (sort-by (juxt ldb/built-in? :block/title)
result (sort-by (juxt (fn [p] (-> (:db/ident p)
(db-property/plugin-property?)
(boolean)))
ldb/built-in?
:block/title)
(ldb/get-all-properties db))]
(cond->> result
remove-built-in-property?

View File

@@ -199,7 +199,7 @@
(let [k (keyword (api-block/sanitize-user-property-name class-uuid-or-ident-or-title))]
(if (qualified-keyword? k)
k
(ldb/get-case-page (db/get-db) class-uuid-or-ident-or-title))))
(some-> (ldb/get-case-page (db/get-db) class-uuid-or-ident-or-title) :db/id))))
class (db/entity eid)]
(when-not (ldb/class? class)
(throw (ex-info "Not a tag" {:input class-uuid-or-ident-or-title})))