Remove Show button on Update. Make row clickable (#11385)

This commit is contained in:
Zack Barett 2022-01-21 15:28:05 -06:00 committed by GitHub
parent cf527e4bc2
commit 05d7e85aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import "../../../components/ha-svg-icon";
import { SupervisorAvailableUpdates } from "../../../data/supervisor/supervisor";
import { buttonLinkStyle } from "../../../resources/styles";
import { HomeAssistant } from "../../../types";
import "../../../components/ha-icon-next";
export const SUPERVISOR_UPDATE_NAMES = {
core: "Home Assistant Core",
@ -46,34 +47,33 @@ class HaConfigUpdates extends LitElement {
</div>
${updates.map(
(update) => html`
<paper-icon-item>
<span slot="item-icon" class="icon">
${update.update_type === "addon"
? update.icon
? html`<img src="/api/hassio${update.icon}" />`
: html`<ha-svg-icon .path=${mdiPackageVariant}></ha-svg-icon>`
: html`<ha-logo-svg></ha-logo-svg>`}
</span>
<paper-item-body two-line>
${update.update_type === "addon"
? update.name
: SUPERVISOR_UPDATE_NAMES[update.update_type!]}
<div secondary>
${this.hass.localize(
"ui.panel.config.updates.version_available",
{
version_available: update.version_latest,
}
)}
</div>
</paper-item-body>
<a href="/hassio${update.panel_path}">
<mwc-button
.label=${this.hass.localize("ui.panel.config.updates.show")}
>
</mwc-button>
</a>
</paper-icon-item>
<a href="/hassio${update.panel_path}">
<paper-icon-item>
<span slot="item-icon" class="icon">
${update.update_type === "addon"
? update.icon
? html`<img src="/api/hassio${update.icon}" />`
: html`<ha-svg-icon
.path=${mdiPackageVariant}
></ha-svg-icon>`
: html`<ha-logo-svg></ha-logo-svg>`}
</span>
<paper-item-body two-line>
${update.update_type === "addon"
? update.name
: SUPERVISOR_UPDATE_NAMES[update.update_type!]}
<div secondary>
${this.hass.localize(
"ui.panel.config.updates.version_available",
{
version_available: update.version_latest,
}
)}
</div>
</paper-item-body>
${!this.narrow ? html`<ha-icon-next></ha-icon-next>` : ""}
</paper-icon-item>
</a>
`
)}
${!this._showAll && this.supervisorUpdates.length >= 4
@ -120,10 +120,10 @@ class HaConfigUpdates extends LitElement {
ha-logo-svg {
color: var(--secondary-text-color);
}
button.show-all {
color: var(--primary-color);
text-decoration: none;
margin: 16px;
ha-icon-next {
color: var(--secondary-text-color);
height: 24px;
width: 24px;
}
`,
];