fix: setting a label on a task fails if the kanban view is open in the background

This commit is contained in:
kolaente 2022-07-08 23:30:03 +02:00
parent a073cfac66
commit 990639dd24
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 2 deletions

View File

@ -4,9 +4,9 @@
:class="{
'is-loading': loadingInternal || loading,
'draggable': !(loadingInternal || loading),
'has-light-text': task.getHexColor() !== TASK_DEFAULT_COLOR && !colorIsDark(task.getHexColor()),
'has-light-text': color !== TASK_DEFAULT_COLOR && !colorIsDark(color),
}"
:style="{'background-color': task.hexColor !== '#' && task.hexColor !== '' ? task.hexColor : false}"
:style="{'background-color': color !== TASK_DEFAULT_COLOR ? color : false}"
@click.exact="openTaskDetail()"
@click.ctrl="() => toggleTaskDone(task)"
@click.meta="() => toggleTaskDone(task)"
@ -103,6 +103,13 @@ export default defineComponent({
default: false,
},
},
computed: {
color() {
return this.task.getHexColor
? this.task.getHexColor()
: TASK_DEFAULT_COLOR
},
},
methods: {
colorIsDark,
async toggleTaskDone(task) {