Labels on tasks #25
|
@ -12,7 +12,7 @@
|
|||
class="tag"
|
||||
:class="{'disabled': user.infos.id !== l.created_by.id}"
|
||||
@click="editLabel(l)"
|
||||
:style="{'background': l.hex_color, 'color': l.hasDarkColor() ? '#4a4a4a' : '#e5e5e5'}"
|
||||
:style="{'background': l.hex_color, 'color': l.textColor}"
|
||||
>
|
||||
<span
|
||||
v-if="user.infos.id !== l.created_by.id"
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
tag-placeholder="Add this as new label"
|
||||
>
|
||||
<template slot="tag" slot-scope="{ option, remove }">
|
||||
<span class="tag" :style="{'background': option.hex_color, 'color': option.hasDarkColor() ? '#4a4a4a' : '#e5e5e5'}">
|
||||
<span class="tag" :style="{'background': option.hex_color, 'color': option.textColor}">
|
||||
<span>{{ option.title }}</span>
|
||||
<a class="delete is-small" @click="removeLabel(option)"></a>
|
||||
</span>
|
||||
|
|
|
@ -8,7 +8,10 @@ export default class LabelModel extends AbstractModel {
|
|||
if (this.hex_color === '') {
|
||||
this.hex_color = 'e8e8e8'
|
||||
}
|
||||
this.hex_color = '#' + this.hex_color
|
||||
if (this.hex_color.substring(0, 1) !== '#') {
|
||||
this.hex_color = '#' + this.hex_color
|
||||
}
|
||||
this.textColor = this.hasDarkColor() ? '#4a4a4a' : '#e5e5e5'
|
||||
this.created_by = new UserModel(this.created_by)
|
||||
}
|
||||
|
||||
|
@ -20,6 +23,7 @@ export default class LabelModel extends AbstractModel {
|
|||
description: '',
|
||||
created_by: UserModel,
|
||||
listID: 0,
|
||||
textColor: '',
|
||||
|
||||
created: 0,
|
||||
updated: 0
|
||||
|
|
Reference in New Issue
Block a user