@@ -61,4 +61,11 @@
const caption = computed(() => props.model.caption || i18n.t(props.model.function.caption));
const linkSpec = computed(() => props.noLink ? {} : {name: 'channel', params: {id: props.model.id}});
const hasActionTrigger = computed(() => props.model?.relationsCount?.actionTriggers > 0);
+ const backgroundColor = computed(() => {
+ if (props.model.conflictDetails || props.model.functionId === 0) {
+ return 'yellow';
+ } else {
+ return 'grey';
+ }
+ });
diff --git a/src/frontend/src/devices/list/device-tile.vue b/src/frontend/src/devices/list/device-tile.vue
index 6c1a18661..f55ed4609 100644
--- a/src/frontend/src/devices/list/device-tile.vue
+++ b/src/frontend/src/devices/list/device-tile.vue
@@ -1,5 +1,5 @@
-
+
{{ caption }}
@@ -43,7 +43,16 @@
},
linkSpec() {
return this.noLink ? {} : {name: 'device', params: {id: this.device.id}};
- }
+ },
+ backgroundColor() {
+ if (this.device.relationsCount?.channelsWithConflict > 0) {
+ return 'yellow';
+ } else if (!this.device.enabled || this.device.locked) {
+ return 'grey';
+ } else {
+ return 'green';
+ }
+ },
}
};