Skip to content

Commit

Permalink
Application credentials: small improvements (#21233)
Browse files Browse the repository at this point in the history
* small improvements

* Update ha-config-application-credentials.ts

* Update ha-config-application-credentials.ts

---------

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
  • Loading branch information
silamon and bramkragten authored Jul 1, 2024
1 parent c71a051 commit e97be57
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ export class HaConfigApplicationCredentials extends LitElement {
private _filter = "";

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

0 comments on commit e97be57

Please sign in to comment.