Colors for lists and namespaces (#74)
Show colors for namespaces bigger Show colors for lists and namespaces Add changing color for lists Add changing color for namespace Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/74
This commit is contained in:
@ -6,7 +6,11 @@ export default class ListModel extends AbstractModel {
|
||||
|
||||
constructor(data) {
|
||||
super(data)
|
||||
|
||||
|
||||
if (this.hex_color !== '' && this.hex_color.substring(0, 1) !== '#') {
|
||||
this.hex_color = '#' + this.hex_color
|
||||
}
|
||||
|
||||
// Make all tasks to task models
|
||||
this.tasks = this.tasks.map(t => {
|
||||
return new TaskModel(t)
|
||||
@ -28,6 +32,7 @@ export default class ListModel extends AbstractModel {
|
||||
tasks: [],
|
||||
namespaceID: 0,
|
||||
is_archived: false,
|
||||
hex_color: '',
|
||||
|
||||
created: null,
|
||||
updated: null,
|
||||
|
@ -6,6 +6,10 @@ export default class NamespaceModel extends AbstractModel {
|
||||
constructor(data) {
|
||||
super(data)
|
||||
|
||||
if (this.hex_color !== '' && this.hex_color.substring(0, 1) !== '#') {
|
||||
this.hex_color = '#' + this.hex_color
|
||||
}
|
||||
|
||||
this.lists = this.lists.map(l => {
|
||||
return new ListModel(l)
|
||||
})
|
||||
@ -24,6 +28,7 @@ export default class NamespaceModel extends AbstractModel {
|
||||
owner: UserModel,
|
||||
lists: [],
|
||||
is_archived: false,
|
||||
hex_color: '',
|
||||
|
||||
created: null,
|
||||
updated: null,
|
||||
|
Reference in New Issue
Block a user