From 9e0edbc082a7d6f10eb7cd4f4b3e567ac2603a82 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 16 Dec 2015 14:10:02 +0200 Subject: [PATCH] Rename workspace routes. --- frontend/uxbox/data/projects.cljs | 6 +++--- frontend/uxbox/router.cljs | 6 +----- frontend/uxbox/ui.cljs | 6 +++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/frontend/uxbox/data/projects.cljs b/frontend/uxbox/data/projects.cljs index 5fee97a16..760bbc9aa 100644 --- a/frontend/uxbox/data/projects.cljs +++ b/frontend/uxbox/data/projects.cljs @@ -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 _] diff --git a/frontend/uxbox/router.cljs b/frontend/uxbox/router.cljs index 4fbb2322e..5efe7171a 100644 --- a/frontend/uxbox/router.cljs +++ b/frontend/uxbox/router.cljs @@ -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 %)) diff --git a/frontend/uxbox/ui.cljs b/frontend/uxbox/ui.cljs index d8fac57db..62a1cb385 100644 --- a/frontend/uxbox/ui.cljs +++ b/frontend/uxbox/ui.cljs @@ -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 )])))