pleroma-fe/src/components/drafts/drafts.js

34 lines
698 B
JavaScript
Raw Normal View History

2023-03-10 12:10:39 -05:00
import Draft from 'src/components/draft/draft.vue'
import List from 'src/components/list/list.vue'
import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
2023-03-10 12:10:39 -05:00
const Drafts = {
components: {
Draft,
2026-01-06 16:22:52 +02:00
List,
ConfirmModal,
},
data() {
return {
showingConfirmDialog: false
}
2023-03-10 12:10:39 -05:00
},
computed: {
2026-01-06 16:22:52 +02:00
drafts() {
2023-03-10 12:10:39 -05:00
return this.$store.getters.draftsArray
2026-01-06 16:22:52 +02:00
},
},
methods: {
abandonAll() {
this.showingConfirmDialog = true
},
doAbandonAll() {
this.$store.dispatch('abandonAllDrafts').then(() => this.hideConfirmDialog())
},
hideConfirmDialog() {
this.showingConfirmDialog = false
},
}
2023-03-10 12:10:39 -05:00
}
export default Drafts