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:
@ -28,6 +28,12 @@ export default class ListService extends AbstractService {
|
||||
model.tasks = model.tasks.map(task => {
|
||||
return taskService.beforeUpdate(task)
|
||||
})
|
||||
model.hex_color = model.hex_color.substring(1, 7)
|
||||
return model
|
||||
}
|
||||
|
||||
beforeCreate(list) {
|
||||
list.hex_color = list.hex_color.substring(1, 7)
|
||||
return list
|
||||
}
|
||||
}
|
@ -22,4 +22,14 @@ export default class NamespaceService extends AbstractService {
|
||||
modelFactory(data) {
|
||||
return new NamespaceModel(data)
|
||||
}
|
||||
|
||||
beforeUpdate(namespace) {
|
||||
namespace.hex_color = namespace.hex_color.substring(1, 7)
|
||||
return namespace
|
||||
}
|
||||
|
||||
beforeCreate(namespace) {
|
||||
namespace.hex_color = namespace.hex_color.substring(1, 7)
|
||||
return namespace
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user