Show tag ID if no name, sort by last updated on mobile (#20788)

This commit is contained in:
Paulus Schoutsen 2024-05-13 03:56:23 -04:00 committed by GitHub
parent 2ad84b2832
commit d046700d06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,7 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
filterable: true, filterable: true,
grows: true, grows: true,
template: (tag) => template: (tag) =>
html`${tag.name} html`${tag.display_name}
${narrow ${narrow
? html`<div class="secondary"> ? html`<div class="secondary">
${tag.last_scanned_datetime ${tag.last_scanned_datetime
@ -86,11 +86,10 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
</div>` </div>`
: ""}`, : ""}`,
}, },
}; last_scanned_datetime: {
if (!narrow) {
columns.last_scanned_datetime = {
title: localize("ui.panel.config.tag.headers.last_scanned"), title: localize("ui.panel.config.tag.headers.last_scanned"),
sortable: true, sortable: true,
hidden: narrow,
direction: "desc", direction: "desc",
width: "20%", width: "20%",
template: (tag) => html` template: (tag) => html`
@ -102,8 +101,8 @@ export class HaConfigTags extends SubscribeMixin(LitElement) {
></ha-relative-time>` ></ha-relative-time>`
: this.hass.localize("ui.panel.config.tag.never_scanned")} : this.hass.localize("ui.panel.config.tag.never_scanned")}
`, `,
},
}; };
}
if (this._canWriteTags) { if (this._canWriteTags) {
columns.write = { columns.write = {
title: "", title: "",