mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
34 lines
611 B
Vue
34 lines
611 B
Vue
<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 (!window.confirm(this.$t('clearCompletedConfirm'))) return;
|
|
this.$store.dispatch('tasks:clearCompletedTodos');
|
|
},
|
|
},
|
|
};
|
|
</script>
|