mirror of
https://github.com/penpot/penpot.git
synced 2025-07-24 23:57:24 +02:00
🎉 Link with components of other files
This commit is contained in:
parent
f837bad894
commit
1ad9a7f82f
11 changed files with 329 additions and 96 deletions
|
@ -16,6 +16,7 @@
|
|||
[potok.core :as ptk]
|
||||
[reitit.core :as r]
|
||||
[app.common.data :as d]
|
||||
[app.config :as cfg]
|
||||
[app.util.browser-history :as bhistory]
|
||||
[app.util.timers :as ts])
|
||||
(:import
|
||||
|
@ -112,6 +113,19 @@
|
|||
|
||||
(def navigate nav)
|
||||
|
||||
(deftype NavigateNewWindow [id params qparams]
|
||||
ptk/EffectEvent
|
||||
(effect [_ state stream]
|
||||
(let [router (:router state)
|
||||
path (resolve router id params qparams)
|
||||
uri (str cfg/public-uri "/#" path)]
|
||||
(js/window.open uri "_blank"))))
|
||||
|
||||
(defn nav-new-window
|
||||
([id] (nav-new-window id nil nil))
|
||||
([id params] (nav-new-window id params nil))
|
||||
([id params qparams] (NavigateNewWindow. id params qparams)))
|
||||
|
||||
;; --- History API
|
||||
|
||||
(defn initialize-history
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue