fix: can't open recent pages on desktop

Closed https://github.com/logseq/logseq/issues/1206
pull/1220/head
Tienson Qin 2021-01-30 16:28:19 +08:00
parent 7e02e8d95f
commit 6147d0cd6a
2 changed files with 4 additions and 3 deletions

View File

@ -63,14 +63,14 @@
[:a.mb-1 {:key (str "recent-page-" page) [:a.mb-1 {:key (str "recent-page-" page)
:href (rfe/href :page {:name page}) :href (rfe/href :page {:name page})
:on-click (fn [e] :on-click (fn [e]
(.preventDefault e)
(when (gobj/get e "shiftKey") (when (gobj/get e "shiftKey")
(when-let [page (db/pull [:page/name (string/lower-case page)])] (when-let [page (db/pull [:page/name (string/lower-case page)])]
(state/sidebar-add-block! (state/sidebar-add-block!
(state/get-current-repo) (state/get-current-repo)
(:db/id page) (:db/id page)
:page :page
{:page page}))))} {:page page}))
(.preventDefault e)))}
page]))])) page]))]))
(rum/defc contents < rum/reactive db-mixins/query (rum/defc contents < rum/reactive db-mixins/query

View File

@ -127,7 +127,8 @@
[repo] [repo]
(when-let [conn (conn/get-conn repo)] (when-let [conn (conn/get-conn repo)]
(->> (d/q (->> (d/q
'[:find ?path ?modified-at '[:find ?path
;; ?modified-at
:where :where
[?file :file/path ?path] [?file :file/path ?path]
;; [?file :file/last-modified-at ?modified-at] ;; [?file :file/last-modified-at ?modified-at]