mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 12:16:39 +00:00
ha-config-devices-dashboard: add "disabled" column (#24730)
add "disabled" column
This commit is contained in:
parent
d77f962087
commit
60010c82bd
@ -5,6 +5,7 @@ import {
|
|||||||
mdiMenuDown,
|
mdiMenuDown,
|
||||||
mdiPlus,
|
mdiPlus,
|
||||||
mdiTextureBox,
|
mdiTextureBox,
|
||||||
|
mdiCancel,
|
||||||
} from "@mdi/js";
|
} from "@mdi/js";
|
||||||
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
|
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
|
||||||
import { LitElement, css, html, nothing } from "lit";
|
import { LitElement, css, html, nothing } from "lit";
|
||||||
@ -612,13 +613,31 @@ export class HaConfigDeviceDashboard extends SubscribeMixin(LitElement) {
|
|||||||
: "—",
|
: "—",
|
||||||
},
|
},
|
||||||
disabled_by: {
|
disabled_by: {
|
||||||
title: "",
|
title: localize("ui.panel.config.devices.picker.state"),
|
||||||
label: localize("ui.panel.config.devices.data_table.disabled_by"),
|
type: "icon",
|
||||||
hidden: true,
|
defaultHidden: true,
|
||||||
|
sortable: true,
|
||||||
|
filterable: true,
|
||||||
|
minWidth: "80px",
|
||||||
|
maxWidth: "80px",
|
||||||
template: (device) =>
|
template: (device) =>
|
||||||
device.disabled_by
|
device.disabled_by
|
||||||
? this.hass.localize("ui.panel.config.devices.disabled")
|
? html`
|
||||||
: "",
|
<div
|
||||||
|
tabindex="0"
|
||||||
|
style="display:inline-block; position: relative;"
|
||||||
|
>
|
||||||
|
<ha-tooltip
|
||||||
|
placement="left"
|
||||||
|
.content=${this.hass.localize(
|
||||||
|
"ui.panel.config.entities.picker.status.disabled"
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<ha-svg-icon .path=${mdiCancel}></ha-svg-icon>
|
||||||
|
</ha-tooltip>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
: "—",
|
||||||
},
|
},
|
||||||
labels: {
|
labels: {
|
||||||
title: "",
|
title: "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user