Using SelectViewModel, bulk deletion of item attachments

This commit is contained in:
Stefan Scheidewig
2021-04-18 18:38:38 +02:00
parent 1db5eaf5ee
commit decae84aec
4 changed files with 79 additions and 30 deletions

View File

@ -182,6 +182,7 @@ attachHeader texts settings model _ attach =
]
, href "#"
, title texts.deleteAttachments
, onClick RequestDeleteSelected
]
[ i [ class "fa fa-trash" ] []
]
@ -352,8 +353,8 @@ menuItem texts model pos attach =
iconClass =
case model.viewMode of
SelectView _ ->
if Set.member attach.id model.selectedAttachments then
SelectView svm ->
if Set.member attach.id svm.ids then
"fa fa-check-circle ml-1"
else
"fa fa-circle ml-1"