mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 14:12:36 -05:00
move delete token to tokens actions section
This commit is contained in:
parent
5fa2048b23
commit
d3d454a43c
1 changed files with 12 additions and 12 deletions
|
@ -75,6 +75,18 @@
|
||||||
(pcb/add-token token))]
|
(pcb/add-token token))]
|
||||||
(rx/of (dch/commit-changes changes)))))))
|
(rx/of (dch/commit-changes changes)))))))
|
||||||
|
|
||||||
|
(defn delete-token
|
||||||
|
[id]
|
||||||
|
(dm/assert! (uuid? id))
|
||||||
|
(ptk/reify ::delete-token
|
||||||
|
ptk/WatchEvent
|
||||||
|
(watch [it state _]
|
||||||
|
(let [data (get state :workspace-data)
|
||||||
|
changes (-> (pcb/empty-changes it)
|
||||||
|
(pcb/with-library-data data)
|
||||||
|
(pcb/delete-token id))]
|
||||||
|
(rx/of (dch/commit-changes changes))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; TEMP (Move to test)
|
;; TEMP (Move to test)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -125,15 +137,3 @@
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(assoc-in state [:workspace-local :token-context-menu] nil))))
|
(assoc-in state [:workspace-local :token-context-menu] nil))))
|
||||||
|
|
||||||
(defn delete-token
|
|
||||||
[id]
|
|
||||||
(dm/assert! (uuid? id))
|
|
||||||
(ptk/reify ::delete-token
|
|
||||||
ptk/WatchEvent
|
|
||||||
(watch [it state _]
|
|
||||||
(let [data (get state :workspace-data)
|
|
||||||
changes (-> (pcb/empty-changes it)
|
|
||||||
(pcb/with-library-data data)
|
|
||||||
(pcb/delete-token id))]
|
|
||||||
(rx/of (dch/commit-changes changes))))))
|
|
Loading…
Add table
Reference in a new issue