mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 02:16:35 +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"
|
||||||
>${this._computeDeviceName(
|
><a
|
||||||
this.devices,
|
href="/config/devices/device/${this.device.via_device_id}"
|
||||||
this.device.via_device_id
|
>${this._computeDeviceName(
|
||||||
)}</span
|
this.devices,
|
||||||
|
this.device.via_device_id
|
||||||
|
)}</a
|
||||||
|
></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
@ -112,29 +116,32 @@ export class HaDeviceCard extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get styles(): CSSResultGroup {
|
static get styles(): CSSResultGroup {
|
||||||
return css`
|
return [
|
||||||
:host {
|
haStyle,
|
||||||
display: block;
|
css`
|
||||||
}
|
:host {
|
||||||
ha-card {
|
display: block;
|
||||||
flex: 1 0 100%;
|
}
|
||||||
min-width: 0;
|
ha-card {
|
||||||
}
|
flex: 1 0 100%;
|
||||||
.device {
|
min-width: 0;
|
||||||
width: 30%;
|
}
|
||||||
}
|
.device {
|
||||||
.area {
|
width: 30%;
|
||||||
color: var(--primary-text-color);
|
}
|
||||||
}
|
.area {
|
||||||
.extra-info {
|
color: var(--primary-text-color);
|
||||||
margin-top: 8px;
|
}
|
||||||
word-wrap: break-word;
|
.extra-info {
|
||||||
}
|
margin-top: 8px;
|
||||||
.manuf,
|
word-wrap: break-word;
|
||||||
.model {
|
}
|
||||||
color: var(--secondary-text-color);
|
.manuf,
|
||||||
word-wrap: break-word;
|
.model {
|
||||||
}
|
color: var(--secondary-text-color);
|
||||||
`;
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user