mirror of
https://github.com/penpot/penpot.git
synced 2025-08-02 01:48:29 +02:00
✨ Add new metric for token update and provide token type
This commit is contained in:
parent
b893a62e40
commit
6de9de9e38
1 changed files with 5 additions and 3 deletions
|
@ -343,6 +343,7 @@
|
|||
(watch [it state _]
|
||||
(if-let [token-set (lookup-token-set state)]
|
||||
(let [data (dsh/lookup-file-data state)
|
||||
token-type (:type token)
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/with-library-data data)
|
||||
(pcb/set-token (:name token-set)
|
||||
|
@ -350,7 +351,7 @@
|
|||
token))]
|
||||
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(ptk/data-event ::ev/event {::ev/name "create-token"})))
|
||||
(ptk/data-event ::ev/event {::ev/name "create-token" :type token-type})))
|
||||
|
||||
(rx/of (create-token-with-set token)))))))
|
||||
|
||||
|
@ -367,14 +368,15 @@
|
|||
token' (->> (merge token params)
|
||||
(into {})
|
||||
(ctob/make-token))
|
||||
|
||||
token-type (:type token)
|
||||
changes (-> (pcb/empty-changes it)
|
||||
(pcb/with-library-data data)
|
||||
(pcb/set-token (:name token-set)
|
||||
(:name token)
|
||||
token'))]
|
||||
|
||||
(rx/of (dch/commit-changes changes))))))
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(ptk/data-event ::ev/event {::ev/name "edit-token" :type token-type}))))))
|
||||
|
||||
(defn delete-token
|
||||
[set-name token-name]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue