Merge pull request #2330 from nextcloud/enh/ToastUndo2
undo with toasts
This commit is contained in:
@@ -117,9 +117,11 @@ import { mapGetters, mapState } from 'vuex'
|
||||
import { Container, Draggable } from 'vue-smooth-dnd'
|
||||
|
||||
import { Actions, ActionButton, Modal } from '@nextcloud/vue'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import { showError, showUndo } from '@nextcloud/dialogs'
|
||||
import CardItem from '../cards/CardItem'
|
||||
|
||||
import '@nextcloud/dialogs/styles/toast.scss'
|
||||
|
||||
export default {
|
||||
name: 'Stack',
|
||||
components: {
|
||||
@@ -210,6 +212,7 @@ export default {
|
||||
},
|
||||
deleteStack(stack) {
|
||||
this.$store.dispatch('deleteStack', stack)
|
||||
showUndo(t('deck', 'List deleted'), () => this.$store.dispatch('stackUndoDelete', stack))
|
||||
},
|
||||
archiveAllCardsFromStack(stack) {
|
||||
|
||||
|
||||
@@ -75,6 +75,8 @@ import { mapGetters, mapState } from 'vuex'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { showUndo } from '@nextcloud/dialogs'
|
||||
import '@nextcloud/dialogs/styles/toast.scss'
|
||||
|
||||
export default {
|
||||
name: 'CardMenu',
|
||||
@@ -129,6 +131,7 @@ export default {
|
||||
},
|
||||
deleteCard() {
|
||||
this.$store.dispatch('deleteCard', this.card)
|
||||
showUndo(t('deck', 'Card deleted'), () => this.$store.dispatch('cardUndoDelete', this.card))
|
||||
},
|
||||
archiveUnarchiveCard() {
|
||||
this.$store.dispatch('archiveUnarchiveCard', { ...this.card, archived: !this.card.archived })
|
||||
|
||||
Reference in New Issue
Block a user