Skip to content

Commit

Permalink
fix: colors
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed May 14, 2024
1 parent adf116e commit 13c2099
Showing 1 changed file with 29 additions and 25 deletions.
54 changes: 29 additions & 25 deletions src/views/Zniffer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,31 +283,35 @@ export default {
backgroundColor: '',
}
switch (frame.type) {
case ZWaveFrameType.Singlecast:
style.backgroundColor = 'rgba(0, 255, 0, 0.1)'
break
case ZWaveFrameType.Multicast:
style.backgroundColor = 'rgba(0, 0, 255, 0.1)'
break
case ZWaveFrameType.AckDirect:
style.backgroundColor = 'rgba(255, 0, 0, 0.1)'
break
case ZWaveFrameType.ExplorerNormal:
style.backgroundColor = 'rgba(255, 255, 0, 0.1)'
break
case ZWaveFrameType.ExplorerSearchResult:
style.backgroundColor = 'rgba(255, 0, 255, 0.1)'
break
case ZWaveFrameType.ExplorerInclusionRequest:
style.backgroundColor = 'rgba(0, 255, 255, 0.1)'
break
case ZWaveFrameType.BeamStart:
style.backgroundColor = 'rgba(255, 255, 255, 0.1)'
break
case ZWaveFrameType.BeamStop:
style.backgroundColor = 'rgba(0, 0, 0, 0.1)'
break
if (frame.corrupted) {
style.backgroundColor = 'rgba(255, 0, 0, 0.1)'
} else {
switch (frame.type) {
case ZWaveFrameType.Singlecast:
style.backgroundColor = 'rgba(0, 255, 0, 0.1)'
break
case ZWaveFrameType.Multicast:
style.backgroundColor = 'rgba(0, 0, 255, 0.1)'
break
case ZWaveFrameType.AckDirect:
style.backgroundColor = 'rgba(255, 165, 0, 0.1)'
break
case ZWaveFrameType.ExplorerNormal:
style.backgroundColor = 'rgba(255, 255, 0, 0.1)'
break
case ZWaveFrameType.ExplorerSearchResult:
style.backgroundColor = 'rgba(255, 0, 255, 0.1)'
break
case ZWaveFrameType.ExplorerInclusionRequest:
style.backgroundColor = 'rgba(0, 255, 255, 0.1)'
break
case ZWaveFrameType.BeamStart:
style.backgroundColor = 'rgba(255, 255, 255, 0.1)'
break
case ZWaveFrameType.BeamStop:
style.backgroundColor = 'rgba(0, 0, 0, 0.1)'
break
}
}
return style
Expand Down

0 comments on commit 13c2099

Please sign in to comment.