mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Add link to related area (#6381)
This commit is contained in:
parent
5d6e332044
commit
f291ea6647
@ -3,7 +3,7 @@ import "../ha-icon";
|
||||
import { customElement, html, property, LitElement } from "lit-element";
|
||||
|
||||
@customElement("ha-battery-icon")
|
||||
class HaBatteryIcon extends LitElement {
|
||||
export class HaBatteryIcon extends LitElement {
|
||||
@property() public batteryStateObj;
|
||||
|
||||
@property() public batteryChargingStateObj;
|
||||
@ -16,5 +16,3 @@ class HaBatteryIcon extends LitElement {
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("ha-battery-icon", HaBatteryIcon);
|
||||
|
@ -96,7 +96,6 @@ export class HaRelatedItems extends SubscribeMixin(LitElement) {
|
||||
</h3>
|
||||
<a
|
||||
href=${`/config/integrations#config_entry=${relatedConfigEntryId}`}
|
||||
@click=${this._close}
|
||||
>
|
||||
${this.hass.localize(`component.${entry.domain}.title`)}:
|
||||
${entry.title}
|
||||
@ -116,10 +115,7 @@ export class HaRelatedItems extends SubscribeMixin(LitElement) {
|
||||
<h3>
|
||||
${this.hass.localize("ui.components.related-items.device")}:
|
||||
</h3>
|
||||
<a
|
||||
href="/config/devices/device/${relatedDeviceId}"
|
||||
@click=${this._close}
|
||||
>
|
||||
<a href="/config/devices/device/${relatedDeviceId}">
|
||||
${device.name_by_user || device.name}
|
||||
</a>
|
||||
`;
|
||||
@ -137,7 +133,9 @@ export class HaRelatedItems extends SubscribeMixin(LitElement) {
|
||||
<h3>
|
||||
${this.hass.localize("ui.components.related-items.area")}:
|
||||
</h3>
|
||||
<a href="/config/areas/area/${relatedAreaId}">
|
||||
${area.name}
|
||||
</a>
|
||||
`;
|
||||
})
|
||||
: ""}
|
||||
@ -290,10 +288,6 @@ export class HaRelatedItems extends SubscribeMixin(LitElement) {
|
||||
fireEvent(this, "hass-more-info", { entityId });
|
||||
}
|
||||
|
||||
private _close() {
|
||||
fireEvent(this, "close-dialog");
|
||||
}
|
||||
|
||||
static get styles(): CSSResult {
|
||||
return css`
|
||||
a {
|
||||
|
@ -1,6 +1,4 @@
|
||||
import "@material/mwc-button";
|
||||
import "@polymer/paper-dialog-scrollable/paper-dialog-scrollable";
|
||||
import "@polymer/paper-input/paper-input";
|
||||
import {
|
||||
css,
|
||||
CSSResult,
|
||||
@ -14,7 +12,7 @@ import { ifDefined } from "lit-html/directives/if-defined";
|
||||
import memoizeOne from "memoize-one";
|
||||
import { isComponentLoaded } from "../../../common/config/is_component_loaded";
|
||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||
import "../../../components/dialog/ha-paper-dialog";
|
||||
import "../../../components/ha-card";
|
||||
import {
|
||||
AreaRegistryEntry,
|
||||
deleteAreaRegistryEntry,
|
||||
|
Loading…
x
Reference in New Issue
Block a user