Added the task type to the "Delete" alert window so it now asks if you want to delete the task of type

Edited the "Delete this ..." button in the edit task modal to represent the task type
This commit is contained in:
Patrick van Zadel
2020-06-23 23:06:59 +02:00
parent 7a2f05d136
commit f0837dc571
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -1014,7 +1014,8 @@ export default {
this.$emit('moveTo', this.task, 'bottom');
},
destroy () {
if (!window.confirm(this.$t('sureDelete'))) return;
const type = this.$t(this.task.type);
if (!window.confirm(this.$t('sureDelete', { type }))) return;
this.destroyTask(this.task);
this.$emit('taskDestroyed', this.task);
},
@@ -707,7 +707,7 @@
class="svg-icon d-inline-b mt-1 mb-1"
v-html="icons.destroy"
></div>
<span class="delete-text mt-1 mb-1">{{ $t('deleteTask') }}</span>
<span class="delete-text mt-1 mb-1">{{ $t('deleteTask', { type: $t(task.type) }) }}</span>
</div>
</form>
</div>
+2 -2
View File
@@ -122,8 +122,8 @@
"fortifyText": "Fortify will return all your tasks, except challenge tasks, to a neutral (yellow) state, as if you'd just added them, and top your Health off to full. This is great if all your red tasks are making the game too hard, or all your blue tasks are making the game too easy. If starting fresh sounds much more motivating, spend the Gems and catch a reprieve!",
"confirmFortify": "Are you sure?",
"fortifyComplete": "Fortify complete!",
"deleteTask": "Delete this Task",
"sureDelete": "Are you sure you want to delete this task?",
"deleteTask": "Delete this <%= type %>",
"sureDelete": "Are you sure you want to delete this <%= type %>?",
"streakCoins": "Streak Bonus!",
"taskToTop": "To top",
"taskToBottom": "To bottom",