From bdf992c9bfe9de176a22f7b5a6fdae1bc5e5010f Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 14 Sep 2022 18:56:51 +0200 Subject: [PATCH] feat: color the color button icon instead of the button itself --- src/components/input/button.vue | 15 +++++++++++++-- src/views/tasks/TaskDetailView.vue | 11 +++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/components/input/button.vue b/src/components/input/button.vue index 0131c287b..ae34391dc 100644 --- a/src/components/input/button.vue +++ b/src/components/input/button.vue @@ -9,9 +9,16 @@ } ]" > - + - + @@ -42,6 +49,10 @@ const props = defineProps({ type: [String, Array], default: '', }, + iconColor: { + type: String, + default: '', + }, loading: { type: Boolean, default: false, diff --git a/src/views/tasks/TaskDetailView.vue b/src/views/tasks/TaskDetailView.vue index 2c5b573b8..b75e73257 100644 --- a/src/views/tasks/TaskDetailView.vue +++ b/src/views/tasks/TaskDetailView.vue @@ -378,9 +378,8 @@ @click="setFieldActive('color')" variant="secondary" icon="fill-drip" + :icon-color="color" v-shortcut="'c'" - :class="{'has-light-text': color !== TASK_DEFAULT_COLOR && !colorIsDark(color)}" - :style="{'background-color': color !== TASK_DEFAULT_COLOR ? color : false}" > {{ $t('task.detail.actions.color') }} @@ -600,9 +599,13 @@ export default defineComponent({ return this.$route.name.includes('kanban') }, color() { - return this.task.getHexColor + const color = this.task.getHexColor ? this.task.getHexColor() - : TASK_DEFAULT_COLOR + : false + + return color === TASK_DEFAULT_COLOR + ? '' + : color }, }, methods: {