diff --git a/src/views/tasks/CreateTask.vue b/src/views/tasks/CreateTask.vue index ca5157a3..798855c1 100644 --- a/src/views/tasks/CreateTask.vue +++ b/src/views/tasks/CreateTask.vue @@ -45,6 +45,7 @@ :style="{'background': label.hexColor, 'color': label.textColor}" class="tag mr-2"> {{ label.title }} + @@ -122,6 +123,16 @@ const realLabels = computed(() => { ] }) +function removeLabel(label: ILabel) { + while (true) { // Using a loop to remove all labels, including possible duplicates added via quick add magic + const index = labels.value.findIndex(el => el.toLowerCase() === label.title.toLowerCase()) + if (index === -1) { + break + } + labels.value.splice(index, 1) + } +} + async function create() { if (newTask.value.title === '') { errorMessage.value = t('list.create.addTitleRequired')