mirror of
https://github.com/penpot/penpot.git
synced 2025-01-26 08:29:42 -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/prevent-default e)
|
||||||
(dom/stop-propagation e)
|
(dom/stop-propagation e)
|
||||||
(on-save e))))
|
(on-save e))))
|
||||||
|
|
||||||
|
(delete []
|
||||||
|
(rs/emit! (di/delete-collection (:id coll))))
|
||||||
(on-delete []
|
(on-delete []
|
||||||
(rs/emit! (di/delete-collection (:id coll))))]
|
(udl/open! :confirm {:on-accept delete}))]
|
||||||
[:div.dashboard-title
|
[:div.dashboard-title
|
||||||
[:h2
|
[:h2
|
||||||
(if edit?
|
(if edit?
|
||||||
|
@ -205,8 +208,10 @@
|
||||||
(mx/defc grid-options
|
(mx/defc grid-options
|
||||||
[coll]
|
[coll]
|
||||||
(let [own? (= (:type coll) :own)]
|
(let [own? (= (:type coll) :own)]
|
||||||
(letfn [(on-delete [event]
|
(letfn [(delete []
|
||||||
(rs/emit! (di/delete-selected)))]
|
(rs/emit! (di/delete-selected)))
|
||||||
|
(on-delete [event]
|
||||||
|
(udl/open! :confirm {:on-accept delete}))]
|
||||||
;; MULTISELECT OPTIONS BAR
|
;; MULTISELECT OPTIONS BAR
|
||||||
[:div.multiselect-bar
|
[:div.multiselect-bar
|
||||||
(if own?
|
(if own?
|
||||||
|
|
Loading…
Add table
Reference in a new issue