mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Add deletion confirmation to image collection and image item.
This commit is contained in:
parent
77dec1d0e6
commit
6795a4d9a5
1 changed files with 8 additions and 3 deletions
|
@ -97,8 +97,11 @@
|
|||
(dom/prevent-default e)
|
||||
(dom/stop-propagation e)
|
||||
(on-save e))))
|
||||
|
||||
(delete []
|
||||
(rs/emit! (di/delete-collection (:id coll))))
|
||||
(on-delete []
|
||||
(rs/emit! (di/delete-collection (:id coll))))]
|
||||
(udl/open! :confirm {:on-accept delete}))]
|
||||
[:div.dashboard-title
|
||||
[:h2
|
||||
(if edit?
|
||||
|
@ -205,8 +208,10 @@
|
|||
(mx/defc grid-options
|
||||
[coll]
|
||||
(let [own? (= (:type coll) :own)]
|
||||
(letfn [(on-delete [event]
|
||||
(rs/emit! (di/delete-selected)))]
|
||||
(letfn [(delete []
|
||||
(rs/emit! (di/delete-selected)))
|
||||
(on-delete [event]
|
||||
(udl/open! :confirm {:on-accept delete}))]
|
||||
;; MULTISELECT OPTIONS BAR
|
||||
[:div.multiselect-bar
|
||||
(if own?
|
||||
|
|
Loading…
Add table
Reference in a new issue