mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix zwave_js provisioned table for narrow (#22507)
This commit is contained in:
parent
913837f064
commit
5843877cc8
@ -9,6 +9,7 @@ import {
|
|||||||
SecurityClass,
|
SecurityClass,
|
||||||
unprovisionZwaveSmartStartNode,
|
unprovisionZwaveSmartStartNode,
|
||||||
} from "../../../../../data/zwave_js";
|
} from "../../../../../data/zwave_js";
|
||||||
|
import { LocalizeFunc } from "../../../../../common/translations/localize";
|
||||||
import { showConfirmationDialog } from "../../../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../../../dialogs/generic/show-dialog-box";
|
||||||
import "../../../../../layouts/hass-tabs-subpage-data-table";
|
import "../../../../../layouts/hass-tabs-subpage-data-table";
|
||||||
import { HomeAssistant, Route } from "../../../../../types";
|
import { HomeAssistant, Route } from "../../../../../types";
|
||||||
@ -33,7 +34,7 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.route=${this.route}
|
.route=${this.route}
|
||||||
.tabs=${configTabs}
|
.tabs=${configTabs}
|
||||||
.columns=${this._columns(this.narrow)}
|
.columns=${this._columns(this.hass.localize)}
|
||||||
.data=${this._provisioningEntries}
|
.data=${this._provisioningEntries}
|
||||||
>
|
>
|
||||||
</hass-tabs-subpage-data-table>
|
</hass-tabs-subpage-data-table>
|
||||||
@ -41,11 +42,12 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _columns = memoizeOne(
|
private _columns = memoizeOne(
|
||||||
(narrow: boolean): DataTableColumnContainer<ZwaveJSProvisioningEntry> => ({
|
(
|
||||||
|
localize: LocalizeFunc
|
||||||
|
): DataTableColumnContainer<ZwaveJSProvisioningEntry> => ({
|
||||||
included: {
|
included: {
|
||||||
title: this.hass.localize(
|
showNarrow: true,
|
||||||
"ui.panel.config.zwave_js.provisioned.included"
|
title: localize("ui.panel.config.zwave_js.provisioned.included"),
|
||||||
),
|
|
||||||
type: "icon",
|
type: "icon",
|
||||||
template: (entry) =>
|
template: (entry) =>
|
||||||
entry.nodeId
|
entry.nodeId
|
||||||
@ -67,16 +69,16 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
dsk: {
|
dsk: {
|
||||||
title: this.hass.localize("ui.panel.config.zwave_js.provisioned.dsk"),
|
main: true,
|
||||||
|
title: localize("ui.panel.config.zwave_js.provisioned.dsk"),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
flex: 2,
|
flex: 2,
|
||||||
},
|
},
|
||||||
security_classes: {
|
security_classes: {
|
||||||
title: this.hass.localize(
|
title: localize(
|
||||||
"ui.panel.config.zwave_js.provisioned.security_classes"
|
"ui.panel.config.zwave_js.provisioned.security_classes"
|
||||||
),
|
),
|
||||||
hidden: narrow,
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
template: (entry) => {
|
template: (entry) => {
|
||||||
@ -91,9 +93,8 @@ class ZWaveJSProvisioned extends LitElement {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
unprovision: {
|
unprovision: {
|
||||||
title: this.hass.localize(
|
showNarrow: true,
|
||||||
"ui.panel.config.zwave_js.provisioned.unprovison"
|
title: localize("ui.panel.config.zwave_js.provisioned.unprovison"),
|
||||||
),
|
|
||||||
type: "icon-button",
|
type: "icon-button",
|
||||||
template: (entry) => html`
|
template: (entry) => html`
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user