mirror of
https://github.com/logseq/logseq.git
synced 2026-04-28 08:04:40 +00:00
Merge remote-tracking branch 'upstream/master' into whiteboards
This commit is contained in:
@@ -38,20 +38,19 @@
|
||||
(defn redirect-to-page!
|
||||
"Must ensure `page-name` is dereferenced (not an alias), or it will create a wrong new page with that name (#3511)."
|
||||
([page-name]
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name)
|
||||
(redirect! {:to :page
|
||||
:path-params {:name (str page-name)}}))
|
||||
([page-name anchor]
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name)
|
||||
(redirect! {:to :page
|
||||
:path-params {:name (str page-name)}
|
||||
:query-params {:anchor anchor}}))
|
||||
([page-name anchor push]
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name)
|
||||
(redirect! {:to :page
|
||||
:path-params {:name (str page-name)}
|
||||
:query-params {:anchor anchor}
|
||||
:push push})))
|
||||
(redirect-to-page! page-name {}))
|
||||
([page-name {:keys [anchor push click-from-recent?]
|
||||
:or {click-from-recent? false}}]
|
||||
(recent-handler/add-page-to-recent! (state/get-current-repo) page-name
|
||||
click-from-recent?)
|
||||
(let [m (cond->
|
||||
{:to :page
|
||||
:path-params {:name (str page-name)}}
|
||||
anchor
|
||||
(assoc :query-params {:anchor anchor})
|
||||
push
|
||||
(assoc :push push))]
|
||||
(redirect! m))))
|
||||
|
||||
(defn redirect-to-whiteboard!
|
||||
([name]
|
||||
|
||||
Reference in New Issue
Block a user