Added global controls

This commit is contained in:
2021-12-19 03:03:37 +03:00
parent 9c881bd430
commit b4a408eddb
15 changed files with 334 additions and 123 deletions

View File

@@ -0,0 +1,55 @@
<template>
<Modal ref="modal">
<div class="title">Are you sure you want to delete all of your tasks?</div>
<div class="buttons">
<button @click="close">
Cancel
</button>
<button @click="removeAllTasksAndClose">
Delete
</button>
</div>
</Modal>
</template>
<script>
import { mapMutations } from 'vuex';
import Modal from '@/components/Modal.vue';
export default {
components: {
Modal,
},
methods: {
...mapMutations(['removeAllTasks']),
removeAllTasksAndClose() {
this.removeAllTasks();
this.close();
},
open() {
this.$refs.modal.open();
},
close() {
this.$refs.modal.close();
},
},
};
</script>
<style lang="scss" scoped>
.title {
margin-right: 32px;
}
.buttons {
margin-top: 16px;
display: flex;
justify-content: space-evenly;
> * {
padding: 6px 12px;
}
}
</style>