Compare commits

..

1 Commits

Author SHA1 Message Date
Jakob Röhrl
4d72435209 toast undo
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
2020-09-24 09:11:12 +02:00
2 changed files with 2 additions and 18 deletions

View File

@@ -120,7 +120,6 @@
:lang="lang"
:format="format"
:disabled="saving || !canEdit"
:shortcuts="shortcuts"
confirm />
<Actions v-if="canEdit">
<ActionButton v-if="copiedCard.duedate" icon="icon-delete" @click="removeDue()">
@@ -300,23 +299,6 @@ export default {
stringify: this.stringify,
parse: this.parse,
},
shortcuts: [
{
text: 'Today',
onClick() {
const date = new Date()
return date
},
},
{
text: 'Tomorrow',
onClick() {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
return date
},
},
],
}
},
computed: {

View File

@@ -75,6 +75,7 @@ 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'
export default {
name: 'CardMenu',
@@ -129,6 +130,7 @@ export default {
},
deleteCard() {
this.$store.dispatch('deleteCard', this.card)
showUndo('undo', this.$store.dispatch('cardUndoDelete', this.card))
},
archiveUnarchiveCard() {
this.$store.dispatch('archiveUnarchiveCard', { ...this.card, archived: !this.card.archived })