Application credentials: small improvements (#21233)

* small improvements

* Update ha-config-application-credentials.ts

* Update ha-config-application-credentials.ts

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Simon Lamon 2024-07-01 13:11:52 +02:00 committed by GitHub
parent c71a051b6d
commit e97be57e3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,12 +77,13 @@ export class HaConfigApplicationCredentials extends LitElement {
private _filter = ""; private _filter = "";
private _columns = memoizeOne( private _columns = memoizeOne(
(narrow: boolean, localize: LocalizeFunc): DataTableColumnContainer => { (localize: LocalizeFunc): DataTableColumnContainer => {
const columns: DataTableColumnContainer<ApplicationCredential> = { const columns: DataTableColumnContainer<ApplicationCredential> = {
name: { name: {
title: localize( title: localize(
"ui.panel.config.application_credentials.picker.headers.name" "ui.panel.config.application_credentials.picker.headers.name"
), ),
main: true,
sortable: true, sortable: true,
filterable: true, filterable: true,
direction: "asc", direction: "asc",
@ -94,7 +95,6 @@ export class HaConfigApplicationCredentials extends LitElement {
), ),
filterable: true, filterable: true,
width: "30%", width: "30%",
hidden: narrow,
}, },
localizedDomain: { localizedDomain: {
title: localize( title: localize(
@ -109,6 +109,9 @@ export class HaConfigApplicationCredentials extends LitElement {
title: "", title: "",
width: "64px", width: "64px",
type: "overflow-menu", type: "overflow-menu",
showNarrow: true,
hideable: false,
moveable: false,
template: (credential) => html` template: (credential) => html`
<ha-icon-overflow-menu <ha-icon-overflow-menu
.hass=${this.hass} .hass=${this.hass}
@ -153,7 +156,7 @@ export class HaConfigApplicationCredentials extends LitElement {
.route=${this.route} .route=${this.route}
back-path="/config" back-path="/config"
.tabs=${configSections.devices} .tabs=${configSections.devices}
.columns=${this._columns(this.narrow, this.hass.localize)} .columns=${this._columns(this.hass.localize)}
.data=${this._getApplicationCredentials( .data=${this._getApplicationCredentials(
this._applicationCredentials, this._applicationCredentials,
this.hass.localize this.hass.localize
@ -356,6 +359,9 @@ export class HaConfigApplicationCredentials extends LitElement {
margin-inline-start: 8px; margin-inline-start: 8px;
margin-inline-end: initial; margin-inline-end: initial;
} }
.warning {
--mdc-theme-primary: var(--error-color);
}
`; `;
} }
} }