mirror of
https://github.com/penpot/penpot.git
synced 2026-09-11 22:49:30 +00:00
Add settings section dummy pages.
This commit is contained in:
parent
53fd03f2a8
commit
23ee74977b
@ -60,9 +60,13 @@
|
|||||||
["/" [["auth/login" :auth/login]
|
["/" [["auth/login" :auth/login]
|
||||||
["auth/register" :auth/register]
|
["auth/register" :auth/register]
|
||||||
["auth/recover" :auth/recover-password]
|
["auth/recover" :auth/recover-password]
|
||||||
|
|
||||||
|
["settings/" [["profile" :settings/profile]
|
||||||
|
["password" :settings/password]
|
||||||
|
["notifications" :settings/notifications]]]
|
||||||
|
|
||||||
["dashboard/" [["projects" :dashboard/projects]
|
["dashboard/" [["projects" :dashboard/projects]
|
||||||
["elements" :dashboard/elements]
|
["elements" :dashboard/elements]
|
||||||
["user-settings" :dashboard/user-settings]
|
|
||||||
["icons" :dashboard/icons]
|
["icons" :dashboard/icons]
|
||||||
["colors" :dashboard/colors]]]
|
["colors" :dashboard/colors]]]
|
||||||
["workspace/" [[page-route :workspace/page]]]]])
|
["workspace/" [[page-route :workspace/page]]]]])
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
[uxbox.ui.lightbox :as ui-lightbox]
|
[uxbox.ui.lightbox :as ui-lightbox]
|
||||||
[uxbox.ui.auth :as ui-auth]
|
[uxbox.ui.auth :as ui-auth]
|
||||||
[uxbox.ui.dashboard :as ui-dashboard]
|
[uxbox.ui.dashboard :as ui-dashboard]
|
||||||
|
[uxbox.ui.settings :as ui-settings]
|
||||||
[uxbox.ui.workspace :refer (workspace)]
|
[uxbox.ui.workspace :refer (workspace)]
|
||||||
[uxbox.ui.mixins :as mx]
|
[uxbox.ui.mixins :as mx]
|
||||||
[uxbox.ui.shapes]))
|
[uxbox.ui.shapes]))
|
||||||
@ -46,7 +47,9 @@
|
|||||||
:dashboard/elements (ui-dashboard/elements-page)
|
:dashboard/elements (ui-dashboard/elements-page)
|
||||||
:dashboard/icons (ui-dashboard/icons-page)
|
:dashboard/icons (ui-dashboard/icons-page)
|
||||||
:dashboard/colors (ui-dashboard/colors-page)
|
:dashboard/colors (ui-dashboard/colors-page)
|
||||||
:dashboard/user-settings (ui-dashboard/user-settings-page)
|
:settings/profile (ui-settings/profile-page)
|
||||||
|
:settings/password (ui-settings/password-page)
|
||||||
|
:settings/notifications (ui-settings/notifications-page)
|
||||||
:workspace/page (let [projectid (:project-uuid params)
|
:workspace/page (let [projectid (:project-uuid params)
|
||||||
pageid (:page-uuid params)]
|
pageid (:page-uuid params)]
|
||||||
(workspace projectid pageid))
|
(workspace projectid pageid))
|
||||||
|
|||||||
@ -139,36 +139,3 @@
|
|||||||
:transfer-state colors-page-transfer-state
|
:transfer-state colors-page-transfer-state
|
||||||
:name "colors"
|
:name "colors"
|
||||||
:mixins [mx/static]}))
|
:mixins [mx/static]}))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
;; Page: User settings
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
||||||
|
|
||||||
(defn user-settings-page-render
|
|
||||||
[own]
|
|
||||||
(html
|
|
||||||
[:main.dashboard-main
|
|
||||||
(header)
|
|
||||||
[:section.dashboard-content
|
|
||||||
(ui.library-bar/library-bar)
|
|
||||||
[:section.dashboard-grid.library
|
|
||||||
(elements/page-title)
|
|
||||||
(elements/grid)]]]))
|
|
||||||
|
|
||||||
(defn user-settings-page-will-mount
|
|
||||||
[own]
|
|
||||||
(rs/emit! (dd/initialize :dashboard/user-settings))
|
|
||||||
own)
|
|
||||||
|
|
||||||
(defn user-settings-page-transfer-state
|
|
||||||
[old-state state]
|
|
||||||
(rs/emit! (dd/initialize :dashboard/user-settings))
|
|
||||||
state)
|
|
||||||
|
|
||||||
(def ^:static user-settings-page
|
|
||||||
(mx/component
|
|
||||||
{:render user-settings-page-render
|
|
||||||
:will-mount user-settings-page-will-mount
|
|
||||||
:transfer-state user-settings-page-transfer-state
|
|
||||||
:name "user-settings-page"
|
|
||||||
:mixins [mx/static]}))
|
|
||||||
|
|||||||
@ -17,27 +17,25 @@
|
|||||||
|
|
||||||
(defn menu-render
|
(defn menu-render
|
||||||
[own open?]
|
[own open?]
|
||||||
(let [open-settings-dialog #(lightbox/open! :settings)
|
(let [open-settings-dialog #(lightbox/open! :settings)]
|
||||||
;;open-user-settings #(dashboard/user-settings-page/open! :user-settings)
|
(html
|
||||||
]
|
[:ul.dropdown {:class (when-not open?
|
||||||
(html
|
"hide")}
|
||||||
[:ul.dropdown {:class (when-not open?
|
[:li
|
||||||
"hide")}
|
i/page
|
||||||
[:li
|
[:span "Page settings"]]
|
||||||
i/page
|
[:li {:on-click open-settings-dialog}
|
||||||
[:span "Page settings"]]
|
i/grid
|
||||||
[:li
|
[:span "Grid settings"]]
|
||||||
i/grid
|
[:li
|
||||||
[:span {:on-click open-settings-dialog} "Grid settings"]]
|
i/eye
|
||||||
[:li
|
[:span "Preview"]]
|
||||||
i/eye
|
[:li {:on-click #(r/go :settings/profile)}
|
||||||
[:span "Preview"]]
|
i/user
|
||||||
[:li
|
[:span "Your account"]]
|
||||||
i/user
|
[:li {:on-click #(rs/emit! (da/logout))}
|
||||||
[:span "Your account"]]
|
i/exit
|
||||||
[:li {:on-click #(rs/emit! (da/logout))}
|
[:span "Exit"]]])))
|
||||||
i/exit
|
|
||||||
[:span "Exit"]]])))
|
|
||||||
|
|
||||||
(def user-menu
|
(def user-menu
|
||||||
(mx/component
|
(mx/component
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user