mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 21:06:34 +00:00
styling tweak
This commit is contained in:
parent
a55488f18c
commit
b715237bbf
@ -106,7 +106,7 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) {
|
|||||||
private _tooltipFormatter = (params: TopLevelFormatterParams): string => {
|
private _tooltipFormatter = (params: TopLevelFormatterParams): string => {
|
||||||
const { dataType, data } = params as CallbackDataParams;
|
const { dataType, data } = params as CallbackDataParams;
|
||||||
if (dataType === "edge") {
|
if (dataType === "edge") {
|
||||||
const { source, target } = data as any;
|
const { source, target, value } = data as any;
|
||||||
const sourceDevice = this._devices[source];
|
const sourceDevice = this._devices[source];
|
||||||
const targetDevice = this._devices[target];
|
const targetDevice = this._devices[target];
|
||||||
const sourceName =
|
const sourceName =
|
||||||
@ -119,8 +119,8 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) {
|
|||||||
if (route?.protocol_data_rate) {
|
if (route?.protocol_data_rate) {
|
||||||
tip += `<br><b>${this.hass.localize("ui.panel.config.zwave_js.visualization.data_rate")}:</b> ${this.hass.localize(`ui.panel.config.zwave_js.protocol_data_rate.${route.protocol_data_rate}`)}`;
|
tip += `<br><b>${this.hass.localize("ui.panel.config.zwave_js.visualization.data_rate")}:</b> ${this.hass.localize(`ui.panel.config.zwave_js.protocol_data_rate.${route.protocol_data_rate}`)}`;
|
||||||
}
|
}
|
||||||
if (route?.rssi) {
|
if (value) {
|
||||||
tip += `<br><b>RSSI:</b> ${route.rssi}`;
|
tip += `<br><b>RSSI:</b> ${value}`;
|
||||||
}
|
}
|
||||||
return tip;
|
return tip;
|
||||||
}
|
}
|
||||||
@ -255,10 +255,6 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) {
|
|||||||
existingLink.lineStyle = {
|
existingLink.lineStyle = {
|
||||||
...existingLink.lineStyle,
|
...existingLink.lineStyle,
|
||||||
width: Math.max(existingLink.lineStyle!.width!, width),
|
width: Math.max(existingLink.lineStyle!.width!, width),
|
||||||
color:
|
|
||||||
route.protocol_data_rate && RSSI > -100
|
|
||||||
? colorVariables["primary-color"]
|
|
||||||
: existingLink.lineStyle!.color,
|
|
||||||
type:
|
type:
|
||||||
route.protocol_data_rate > 1
|
route.protocol_data_rate > 1
|
||||||
? "solid"
|
? "solid"
|
||||||
@ -272,7 +268,7 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) {
|
|||||||
lineStyle: {
|
lineStyle: {
|
||||||
width,
|
width,
|
||||||
color:
|
color:
|
||||||
route.protocol_data_rate && RSSI > -100
|
repeater === controllerNode
|
||||||
? colorVariables["primary-color"]
|
? colorVariables["primary-color"]
|
||||||
: colorVariables["disabled-color"],
|
: colorVariables["disabled-color"],
|
||||||
type: route.protocol_data_rate > 1 ? "solid" : "dotted",
|
type: route.protocol_data_rate > 1 ? "solid" : "dotted",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user