mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
parent
e0a6d2efe5
commit
f5653d0da5
@ -534,6 +534,10 @@ export class HaDataTable extends LitElement {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mdc-data-table__cell.mdc-data-table__cell--icon {
|
||||||
|
overflow: initial;
|
||||||
|
}
|
||||||
|
|
||||||
.mdc-data-table__header-cell--checkbox,
|
.mdc-data-table__header-cell--checkbox,
|
||||||
.mdc-data-table__cell--checkbox {
|
.mdc-data-table__cell--checkbox {
|
||||||
/* @noflip */
|
/* @noflip */
|
||||||
|
@ -29,6 +29,7 @@ import { configSections } from "../ha-panel-config";
|
|||||||
import { showEntityEditorDialog } from "../entities/show-dialog-entity-editor";
|
import { showEntityEditorDialog } from "../entities/show-dialog-entity-editor";
|
||||||
import { showHelperDetailDialog } from "./show-dialog-helper-detail";
|
import { showHelperDetailDialog } from "./show-dialog-helper-detail";
|
||||||
import { HELPER_DOMAINS } from "./const";
|
import { HELPER_DOMAINS } from "./const";
|
||||||
|
import { domainIcon } from "../../../common/entity/domain_icon";
|
||||||
|
|
||||||
@customElement("ha-config-helpers")
|
@customElement("ha-config-helpers")
|
||||||
export class HaConfigHelpers extends LitElement {
|
export class HaConfigHelpers extends LitElement {
|
||||||
@ -44,8 +45,8 @@ export class HaConfigHelpers extends LitElement {
|
|||||||
icon: {
|
icon: {
|
||||||
title: "",
|
title: "",
|
||||||
type: "icon",
|
type: "icon",
|
||||||
template: (icon) => html`
|
template: (icon, helper: any) => html`
|
||||||
<ha-icon slot="item-icon" .icon=${icon}></ha-icon>
|
<ha-icon .icon=${icon || domainIcon(helper.type)}></ha-icon>
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
@ -76,7 +77,7 @@ export class HaConfigHelpers extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "30%",
|
width: "25%",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
columns.type = {
|
columns.type = {
|
||||||
@ -84,7 +85,7 @@ export class HaConfigHelpers extends LitElement {
|
|||||||
"ui.panel.config.helpers.picker.headers.type"
|
"ui.panel.config.helpers.picker.headers.type"
|
||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
width: "30%",
|
width: "25%",
|
||||||
filterable: true,
|
filterable: true,
|
||||||
template: (type) =>
|
template: (type) =>
|
||||||
html`
|
html`
|
||||||
@ -92,6 +93,27 @@ export class HaConfigHelpers extends LitElement {
|
|||||||
type}
|
type}
|
||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
|
columns.editable = {
|
||||||
|
title: "",
|
||||||
|
type: "icon",
|
||||||
|
template: (editable) => html`
|
||||||
|
${!editable
|
||||||
|
? html`
|
||||||
|
<div
|
||||||
|
tabindex="0"
|
||||||
|
style="display:inline-block; position: relative;"
|
||||||
|
>
|
||||||
|
<ha-icon icon="hass:pencil-off"></ha-icon>
|
||||||
|
<paper-tooltip position="left">
|
||||||
|
${this.hass.localize(
|
||||||
|
"ui.panel.config.entities.picker.status.readonly"
|
||||||
|
)}
|
||||||
|
</paper-tooltip>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
`,
|
||||||
|
};
|
||||||
return columns;
|
return columns;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user