mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
Add settings section dummy pages.
This commit is contained in:
parent
53fd03f2a8
commit
23ee74977b
4 changed files with 28 additions and 56 deletions
|
@ -60,9 +60,13 @@
|
|||
["/" [["auth/login" :auth/login]
|
||||
["auth/register" :auth/register]
|
||||
["auth/recover" :auth/recover-password]
|
||||
|
||||
["settings/" [["profile" :settings/profile]
|
||||
["password" :settings/password]
|
||||
["notifications" :settings/notifications]]]
|
||||
|
||||
["dashboard/" [["projects" :dashboard/projects]
|
||||
["elements" :dashboard/elements]
|
||||
["user-settings" :dashboard/user-settings]
|
||||
["icons" :dashboard/icons]
|
||||
["colors" :dashboard/colors]]]
|
||||
["workspace/" [[page-route :workspace/page]]]]])
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
[uxbox.ui.lightbox :as ui-lightbox]
|
||||
[uxbox.ui.auth :as ui-auth]
|
||||
[uxbox.ui.dashboard :as ui-dashboard]
|
||||
[uxbox.ui.settings :as ui-settings]
|
||||
[uxbox.ui.workspace :refer (workspace)]
|
||||
[uxbox.ui.mixins :as mx]
|
||||
[uxbox.ui.shapes]))
|
||||
|
@ -46,7 +47,9 @@
|
|||
:dashboard/elements (ui-dashboard/elements-page)
|
||||
:dashboard/icons (ui-dashboard/icons-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)
|
||||
pageid (:page-uuid params)]
|
||||
(workspace projectid pageid))
|
||||
|
|
|
@ -139,36 +139,3 @@
|
|||
:transfer-state colors-page-transfer-state
|
||||
:name "colors"
|
||||
: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
|
||||
[own open?]
|
||||
(let [open-settings-dialog #(lightbox/open! :settings)
|
||||
;;open-user-settings #(dashboard/user-settings-page/open! :user-settings)
|
||||
]
|
||||
(html
|
||||
[:ul.dropdown {:class (when-not open?
|
||||
"hide")}
|
||||
[:li
|
||||
i/page
|
||||
[:span "Page settings"]]
|
||||
[:li
|
||||
i/grid
|
||||
[:span {:on-click open-settings-dialog} "Grid settings"]]
|
||||
[:li
|
||||
i/eye
|
||||
[:span "Preview"]]
|
||||
[:li
|
||||
i/user
|
||||
[:span "Your account"]]
|
||||
[:li {:on-click #(rs/emit! (da/logout))}
|
||||
i/exit
|
||||
[:span "Exit"]]])))
|
||||
(let [open-settings-dialog #(lightbox/open! :settings)]
|
||||
(html
|
||||
[:ul.dropdown {:class (when-not open?
|
||||
"hide")}
|
||||
[:li
|
||||
i/page
|
||||
[:span "Page settings"]]
|
||||
[:li {:on-click open-settings-dialog}
|
||||
i/grid
|
||||
[:span "Grid settings"]]
|
||||
[:li
|
||||
i/eye
|
||||
[:span "Preview"]]
|
||||
[:li {:on-click #(r/go :settings/profile)}
|
||||
i/user
|
||||
[:span "Your account"]]
|
||||
[:li {:on-click #(rs/emit! (da/logout))}
|
||||
i/exit
|
||||
[:span "Exit"]]])))
|
||||
|
||||
(def user-menu
|
||||
(mx/component
|
||||
|
|
Loading…
Reference in a new issue