mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Add new urls for images page.
This commit is contained in:
parent
7ccb81e8fb
commit
a45d91e663
1 changed files with 13 additions and 1 deletions
|
@ -99,7 +99,14 @@
|
|||
:dashboard/projects (dashboard/projects-page)
|
||||
:dashboard/elements (dashboard/elements-page)
|
||||
:dashboard/icons (dashboard/icons-page)
|
||||
:dashboard/images (dashboard/images-page)
|
||||
:dashboard/images (let [{:keys [id type]} params
|
||||
type (when (str/alpha? type) (keyword type))
|
||||
id (cond
|
||||
(str/digits? id) (parse-int id)
|
||||
(uuid-str? id) (uuid id)
|
||||
:else nil)]
|
||||
(dashboard/images-page type id))
|
||||
|
||||
:dashboard/colors (let [{:keys [id type]} params
|
||||
type (when (str/alpha? type) (keyword type))
|
||||
id (cond
|
||||
|
@ -127,10 +134,15 @@
|
|||
["/dashboard/projects" :dashboard/projects]
|
||||
["/dashboard/elements" :dashboard/elements]
|
||||
["/dashboard/icons" :dashboard/icons]
|
||||
|
||||
["/dashboard/images" :dashboard/images]
|
||||
["/dashboard/images/:type/:id" :dashboard/images]
|
||||
["/dashboard/images/:type" :dashboard/images]
|
||||
|
||||
["/dashboard/colors" :dashboard/colors]
|
||||
["/dashboard/colors/:type/:id" :dashboard/colors]
|
||||
["/dashboard/colors/:type" :dashboard/colors]
|
||||
|
||||
["/workspace/:project/:page" :workspace/page]])
|
||||
|
||||
(extend-protocol bc/IPathRepr
|
||||
|
|
Loading…
Add table
Reference in a new issue