diff --git a/src/i18n/lang/en.json b/src/i18n/lang/en.json index dd98d5ab..e1d66ae2 100644 --- a/src/i18n/lang/en.json +++ b/src/i18n/lang/en.json @@ -729,7 +729,12 @@ "addSuccess": "The label has been added successfully.", "createSuccess": "The label has been created successfully.", "removeSuccess": "The label has been removed successfully.", - "addCreateSuccess": "The label has been created and added successfully." + "addCreateSuccess": "The label has been created and added successfully.", + "delete": { + "header": "Delete this label", + "text1": "Are you sure you want to delete this label?", + "text2": "This will remove it from all tasks and cannot be restored." + } }, "priority": { "unset": "Unset", diff --git a/src/views/labels/ListLabels.vue b/src/views/labels/ListLabels.vue index b1d5cfe6..57fa7c4d 100644 --- a/src/views/labels/ListLabels.vue +++ b/src/views/labels/ListLabels.vue @@ -38,7 +38,7 @@ v-else> {{ l.title }} - +
@@ -83,7 +83,7 @@
@@ -92,6 +92,19 @@
+ + + + + + @@ -117,6 +130,8 @@ export default defineComponent({ labelEditLabel: new LabelModel(), isLabelEdit: false, editorActive: false, + showDeleteModal: false, + labelToDelete: null, } }, created() { @@ -133,6 +148,8 @@ export default defineComponent({ }), methods: { deleteLabel(label) { + this.showDeleteModal = false + this.isLabelEdit = false return this.$store.dispatch('labels/deleteLabel', label) }, editLabelSubmit() { @@ -160,6 +177,10 @@ export default defineComponent({ this.editorActive = false this.$nextTick(() => this.editorActive = true) }, + showDeleteDialoge(label) { + this.labelToDelete = label + this.showDeleteModal = true + }, }, })