Don't show the list color in the list view

This commit is contained in:
kolaente 2021-02-20 15:54:12 +01:00
parent 8e2dfcffd5
commit 074b7e53f5
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
3 changed files with 22 additions and 1 deletions

View file

@ -102,6 +102,21 @@ describe('Lists', () => {
cy.get('input.input[placeholder="Add a new task..."') cy.get('input.input[placeholder="Add a new task..."')
.should('not.exist') .should('not.exist')
}) })
it('Should only show the color of a list in the navigation and not in the list view', () => {
const lists = ListFactory.create(1, {
hex_color: '00db60',
})
TaskFactory.create(10, {
list_id: lists[0].id,
})
cy.visit(`/lists/${lists[0].id}/`)
cy.get('.menu-list li .list-menu-link .color-bubble')
.should('have.css', 'background-color', 'rgb(0, 219, 96)')
cy.get('.tasks-container .tasks .color-bubble')
.should('not.exist')
})
}) })
describe('Table View', () => { describe('Table View', () => {

View file

@ -2,9 +2,10 @@
<div :class="{'is-loading': taskService.loading}" class="task loader-container"> <div :class="{'is-loading': taskService.loading}" class="task loader-container">
<fancycheckbox :disabled="isArchived || disabled" @change="markAsDone" v-model="task.done"/> <fancycheckbox :disabled="isArchived || disabled" @change="markAsDone" v-model="task.done"/>
<span <span
v-if="showListColor && listColor !== ''"
:style="{backgroundColor: listColor }" :style="{backgroundColor: listColor }"
class="color-bubble" class="color-bubble"
v-if="listColor !== ''"> >
</span> </span>
<router-link <router-link
:to="{ name: taskDetailRoute, params: { id: task.id } }" :to="{ name: taskDetailRoute, params: { id: task.id } }"
@ -131,6 +132,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
showListColor: {
type: Boolean,
default: true,
}
}, },
watch: { watch: {
theTask(newVal) { theTask(newVal) {

View file

@ -92,6 +92,7 @@
<div class="tasks-container"> <div class="tasks-container">
<div :class="{'short': isTaskEdit}" class="tasks mt-0" v-if="tasks && tasks.length > 0"> <div :class="{'short': isTaskEdit}" class="tasks mt-0" v-if="tasks && tasks.length > 0">
<single-task-in-list <single-task-in-list
:show-list-color="false"
:disabled="!canWrite" :disabled="!canWrite"
:key="t.id" :key="t.id"
:the-task="t" :the-task="t"