mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 15:36:37 +02:00
Minor code reorganization and wip of colors page.
This commit is contained in:
parent
a93c6bfa45
commit
9c2c7f40ba
13 changed files with 221 additions and 56 deletions
|
@ -119,36 +119,11 @@
|
|||
(-pr-writer [mv writer _]
|
||||
(-write writer "#<event:u.s.p/create-project>")))))
|
||||
|
||||
(defn initialize-workspace
|
||||
[projectid pageid]
|
||||
(reify
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(let [s {:project projectid
|
||||
:toolboxes #{}
|
||||
:page pageid}]
|
||||
(assoc state :workspace s)))
|
||||
|
||||
IPrintWithWriter
|
||||
(-pr-writer [mv writer _]
|
||||
(-write writer "#<event:u.s.p/initialize-workspace>"))))
|
||||
|
||||
(defn set-dashboard-section
|
||||
[section]
|
||||
(reify
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(assoc-in state [:dashboard :section] section))
|
||||
|
||||
IPrintWithWriter
|
||||
(-pr-writer [mv writer _]
|
||||
(-write writer "#<event:u.s.p/go-to-project"))))
|
||||
|
||||
(defn go-to-project
|
||||
(defn go-to
|
||||
"A shortcut event that redirects the user to the
|
||||
first page of the project."
|
||||
([projectid]
|
||||
(go-to-project projectid nil))
|
||||
(go-to projectid nil))
|
||||
([projectid pageid]
|
||||
(reify
|
||||
rs/EffectEvent
|
||||
|
@ -162,4 +137,4 @@
|
|||
:page-uuid pageid})))))
|
||||
IPrintWithWriter
|
||||
(-pr-writer [mv writer _]
|
||||
(-write writer "#<event:u.s.p/go-to-project")))))
|
||||
(-write writer "#<event:u.s.p/go-to")))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue