mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
Remove Show button on Update. Make row clickable (#11385)
This commit is contained in:
parent
cf527e4bc2
commit
05d7e85aa3
@ -10,6 +10,7 @@ import "../../../components/ha-svg-icon";
|
|||||||
import { SupervisorAvailableUpdates } from "../../../data/supervisor/supervisor";
|
import { SupervisorAvailableUpdates } from "../../../data/supervisor/supervisor";
|
||||||
import { buttonLinkStyle } from "../../../resources/styles";
|
import { buttonLinkStyle } from "../../../resources/styles";
|
||||||
import { HomeAssistant } from "../../../types";
|
import { HomeAssistant } from "../../../types";
|
||||||
|
import "../../../components/ha-icon-next";
|
||||||
|
|
||||||
export const SUPERVISOR_UPDATE_NAMES = {
|
export const SUPERVISOR_UPDATE_NAMES = {
|
||||||
core: "Home Assistant Core",
|
core: "Home Assistant Core",
|
||||||
@ -46,34 +47,33 @@ class HaConfigUpdates extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
${updates.map(
|
${updates.map(
|
||||||
(update) => html`
|
(update) => html`
|
||||||
<paper-icon-item>
|
<a href="/hassio${update.panel_path}">
|
||||||
<span slot="item-icon" class="icon">
|
<paper-icon-item>
|
||||||
${update.update_type === "addon"
|
<span slot="item-icon" class="icon">
|
||||||
? update.icon
|
${update.update_type === "addon"
|
||||||
? html`<img src="/api/hassio${update.icon}" />`
|
? update.icon
|
||||||
: html`<ha-svg-icon .path=${mdiPackageVariant}></ha-svg-icon>`
|
? html`<img src="/api/hassio${update.icon}" />`
|
||||||
: html`<ha-logo-svg></ha-logo-svg>`}
|
: html`<ha-svg-icon
|
||||||
</span>
|
.path=${mdiPackageVariant}
|
||||||
<paper-item-body two-line>
|
></ha-svg-icon>`
|
||||||
${update.update_type === "addon"
|
: html`<ha-logo-svg></ha-logo-svg>`}
|
||||||
? update.name
|
</span>
|
||||||
: SUPERVISOR_UPDATE_NAMES[update.update_type!]}
|
<paper-item-body two-line>
|
||||||
<div secondary>
|
${update.update_type === "addon"
|
||||||
${this.hass.localize(
|
? update.name
|
||||||
"ui.panel.config.updates.version_available",
|
: SUPERVISOR_UPDATE_NAMES[update.update_type!]}
|
||||||
{
|
<div secondary>
|
||||||
version_available: update.version_latest,
|
${this.hass.localize(
|
||||||
}
|
"ui.panel.config.updates.version_available",
|
||||||
)}
|
{
|
||||||
</div>
|
version_available: update.version_latest,
|
||||||
</paper-item-body>
|
}
|
||||||
<a href="/hassio${update.panel_path}">
|
)}
|
||||||
<mwc-button
|
</div>
|
||||||
.label=${this.hass.localize("ui.panel.config.updates.show")}
|
</paper-item-body>
|
||||||
>
|
${!this.narrow ? html`<ha-icon-next></ha-icon-next>` : ""}
|
||||||
</mwc-button>
|
</paper-icon-item>
|
||||||
</a>
|
</a>
|
||||||
</paper-icon-item>
|
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
${!this._showAll && this.supervisorUpdates.length >= 4
|
${!this._showAll && this.supervisorUpdates.length >= 4
|
||||||
@ -120,10 +120,10 @@ class HaConfigUpdates extends LitElement {
|
|||||||
ha-logo-svg {
|
ha-logo-svg {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
button.show-all {
|
ha-icon-next {
|
||||||
color: var(--primary-color);
|
color: var(--secondary-text-color);
|
||||||
text-decoration: none;
|
height: 24px;
|
||||||
margin: 16px;
|
width: 24px;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user