mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 18:06:36 +00:00
Link via device on device page (#11554)
Co-authored-by: Zack Barett <arnett.zackary@gmail.com>
This commit is contained in:
parent
45e6ec1ee2
commit
21d86f4797
@ -5,6 +5,7 @@ import {
|
|||||||
computeDeviceName,
|
computeDeviceName,
|
||||||
DeviceRegistryEntry,
|
DeviceRegistryEntry,
|
||||||
} from "../../../../data/device_registry";
|
} from "../../../../data/device_registry";
|
||||||
|
import { haStyle } from "../../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../../types";
|
import { HomeAssistant } from "../../../../types";
|
||||||
import { loadDeviceRegistryDetailDialog } from "../device-registry-detail/show-dialog-device-registry-detail";
|
import { loadDeviceRegistryDetailDialog } from "../device-registry-detail/show-dialog-device-registry-detail";
|
||||||
|
|
||||||
@ -55,10 +56,13 @@ export class HaDeviceCard extends LitElement {
|
|||||||
"ui.panel.config.integrations.config_entry.via"
|
"ui.panel.config.integrations.config_entry.via"
|
||||||
)}
|
)}
|
||||||
<span class="hub"
|
<span class="hub"
|
||||||
|
><a
|
||||||
|
href="/config/devices/device/${this.device.via_device_id}"
|
||||||
>${this._computeDeviceName(
|
>${this._computeDeviceName(
|
||||||
this.devices,
|
this.devices,
|
||||||
this.device.via_device_id
|
this.device.via_device_id
|
||||||
)}</span
|
)}</a
|
||||||
|
></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
@ -112,7 +116,9 @@ export class HaDeviceCard extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return css`
|
return [
|
||||||
|
haStyle,
|
||||||
|
css`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@ -135,6 +141,7 @@ export class HaDeviceCard extends LitElement {
|
|||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
`;
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user