Conversation
|
Nice! Let’s call it "Undo deletion", and does it maybe look more clickable if we make it a button? Also, the |
f70b5bc to
43dad87
Compare
|
I did a complete re-work of this (backend deletes directly and re-creates on undo, fronted uses @nextcloud/dialogs). Here are some impressions: deleting a single noteThe Toast is closed after a timeout of 12 seconds. I used a longer timeout than normal due to the discussion under nextcloud-libraries/nextcloud-vue#705 (comment) deleting multiple notesIf another note is deleted before the timeout is expired, the Toast is adjusted and the timeout is reset: Pressing "Undo delete" will restore all deleted notes within the timeout-period (here: three). |
|
So @skjnldsv and I recently talked about Undo, so looping him in. :) Also @korelstar only one thing about the notification: To prevent misclicks and accidental closing of the notification when you actually want to undo, can we remove the X button? It will automatically close anyway. :) |
|
Oooh, never seen this!! :O |
|
Of course, we can remove the "x" button. I'm already watching nextcloud-libraries/nextcloud-dialogs#106, where a standardization is developed (there, the "x" button is removed). As far as I can see, that approach is similar, so I would switch so the standardized solution, when finished. |
|
You rock! |


Fixes #417, see discussion under nextcloud-libraries/nextcloud-vue#705, especially nextcloud-libraries/nextcloud-vue#705 (comment). Thanks to @paulschwoerer for help on implementing this. For now, I'm using the (old)
OC.NotificationAPI, since I want to be compatible to Nextcloud 15/16. We will switch to the newOCP.ToastAPI later.@jancborchardt Is this how you imagined?