mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:27:09 +00:00
Recognise "dark", "light" label view attributes.
In a label definition (in etc/surveys/*.yaml) we can now have
"dark" or "light" attributes under "view" to force the label
text to always use either the dark or light theme. This is
useful when a label's colour causes a bad contrast in either
theme.
Example:
labels:
Daily:
view:
colour: "#EFEBE9"
description: "Of interest in the daily report"
light: true # Text always displayed in a dark colour
model:
user: true
multiple: true
This commit is contained in:
@@ -334,6 +334,8 @@
|
||||
x-small
|
||||
:color="labels[label] && labels[label].view.colour"
|
||||
:title="labels[label] && labels[label].view.description"
|
||||
:dark="labels[label] && labels[label].view.dark"
|
||||
:light="labels[label] && labels[label].view.light"
|
||||
:key="label"
|
||||
:href="$route.path+'?label='+encodeURIComponent(label)"
|
||||
>{{label}}</v-chip>
|
||||
|
||||
Reference in New Issue
Block a user