Added clear completed todos (#9782)

This commit is contained in:
Keith Holliday
2018-01-22 08:28:42 -07:00
committed by GitHub
parent ecfcf09184
commit 38aafb6c7b
4 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<template lang="pug">
.text-center.delete-completed
.help-text {{ $t('clearCompletedDescription') }}
.btn.btn-danger(@click='clearTodos()') {{ $t('clearCompleted') }}
</template>
<style lang="scss">
.delete-completed {
padding: 1em;
.help-text {
color: #878190;
font-size: 12px;
}
.btn-danger {
font-size: 12px;
padding: .4em .6em;
margin-top: .5em;
}
}
</style>
<script>
export default {
methods: {
clearTodos () {
if (!confirm(this.$t('clearCompletedConfirm'))) return;
this.$store.dispatch('tasks:clearCompletedTodos');
},
},
};
</script>