mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
Rename workspace routes.
This commit is contained in:
parent
17fc5edcda
commit
9e0edbc082
3 changed files with 7 additions and 11 deletions
|
@ -153,11 +153,11 @@
|
|||
rs/EffectEvent
|
||||
(-apply-effect [_ state]
|
||||
(if pageid
|
||||
(rs/emit! (r/navigate :main/page {:project-uuid projectid
|
||||
:page-uuid pageid}))
|
||||
(rs/emit! (r/navigate :workspace/page {:project-uuid projectid
|
||||
:page-uuid pageid}))
|
||||
(let [pages (project-pages state projectid)
|
||||
pageid (:id (first pages))]
|
||||
(rs/emit! (r/navigate :main/page {:project-uuid projectid
|
||||
(rs/emit! (r/navigate :workspace/page {:project-uuid projectid
|
||||
:page-uuid pageid})))))
|
||||
IPrintWithWriter
|
||||
(-pr-writer [mv writer _]
|
||||
|
|
|
@ -49,9 +49,6 @@
|
|||
;; Router declaration
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(def ^:private project-route
|
||||
[[bidi/uuid :project-uuid]])
|
||||
|
||||
(def ^:private page-route
|
||||
[[bidi/uuid :project-uuid] "/" [bidi/uuid :page-uuid]])
|
||||
|
||||
|
@ -63,8 +60,7 @@
|
|||
["elements" :dashboard/elements]
|
||||
["icons" :dashboard/icons]
|
||||
["colors" :dashboard/colors]]]
|
||||
["workspace/" [[project-route :main/project]
|
||||
[page-route :main/page]]]]])
|
||||
["workspace/" [[page-route :workspace/page]]]]])
|
||||
|
||||
(defonce +router+
|
||||
(let [opts {:on-navigate #(rs/emit! (update-location %))
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
:dashboard/elements (ui.dashboard.elements/elements)
|
||||
:dashboard/icons (ui.dashboard.elements/icons)
|
||||
:dashboard/colors (ui.dashboard.elements/colors)
|
||||
:main/page (let [projectid (:project-uuid location-params)
|
||||
pageid (:page-uuid location-params)]
|
||||
(ui.w/workspace projectid pageid))
|
||||
:workspace/page (let [projectid (:project-uuid location-params)
|
||||
pageid (:page-uuid location-params)]
|
||||
(ui.w/workspace projectid pageid))
|
||||
nil
|
||||
)])))
|
||||
|
||||
|
|
Loading…
Reference in a new issue