Update Repairs to new design (#13276)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Zack Barett 2022-07-27 04:06:38 -05:00 committed by GitHub
parent 68517018cc
commit f7090583ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 53 deletions

View File

@ -188,9 +188,10 @@ class HaConfigDashboard extends LitElement {
.isWide=${this.isWide} .isWide=${this.isWide}
full-width full-width
> >
${repairsIssues.length || canInstallUpdates.length
? html`<ha-card outlined>
${repairsIssues.length ${repairsIssues.length
? html` ? html`
<ha-card outlined>
<ha-config-repairs <ha-config-repairs
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow} .narrow=${this.narrow}
@ -204,18 +205,20 @@ class HaConfigDashboard extends LitElement {
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.repairs.more_repairs", "ui.panel.config.repairs.more_repairs",
{ {
count: totalRepairIssues - repairsIssues.length, count:
totalRepairIssues - repairsIssues.length,
} }
)} )}
</a> </a>
` `
: ""} : ""}
</ha-card>
` `
: ""} : ""}
${repairsIssues.length && canInstallUpdates.length
? html`<hr />`
: ""}
${canInstallUpdates.length ${canInstallUpdates.length
? html` ? html`
<ha-card outlined>
<ha-config-updates <ha-config-updates
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow} .narrow=${this.narrow}
@ -228,15 +231,17 @@ class HaConfigDashboard extends LitElement {
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.updates.more_updates", "ui.panel.config.updates.more_updates",
{ {
count: totalUpdates - canInstallUpdates.length, count:
totalUpdates - canInstallUpdates.length,
} }
)} )}
</a> </a>
` `
: ""} : ""}
</ha-card>
` `
: ""} : ""}
</ha-card>`
: ""}
<ha-card outlined> <ha-card outlined>
<ha-config-navigation <ha-config-navigation
@ -336,9 +341,12 @@ class HaConfigDashboard extends LitElement {
color: var(--primary-text-color); color: var(--primary-text-color);
} }
a.button { a.button {
display: block; display: inline-block;
color: var(--primary-color); color: var(--primary-text-color);
padding: 16px; padding: 6px 16px;
margin: 8px 16px 16px 16px;
border-radius: 32px;
border: 1px solid var(--divider-color);
} }
.title { .title {
font-size: 16px; font-size: 16px;
@ -368,6 +376,16 @@ class HaConfigDashboard extends LitElement {
.keep-together { .keep-together {
display: inline-block; display: inline-block;
} }
hr {
height: 1px;
background-color: var(
--ha-card-border-color,
var(--divider-color, #e0e0e0)
);
border: none;
margin-top: 0;
}
`, `,
]; ];
} }

View File

@ -81,6 +81,9 @@ class HaConfigRepairs extends LitElement {
)}` )}`
: ""} : ""}
</span> </span>
${!this.narrow
? html`<ha-icon-next slot="meta"></ha-icon-next>`
: ""}
</ha-list-item> </ha-list-item>
` `
)} )}

View File

@ -1218,7 +1218,7 @@
"title": "{count} {count, plural,\n one {update}\n other {updates}\n}", "title": "{count} {count, plural,\n one {update}\n other {updates}\n}",
"unable_to_fetch": "Unable to load updates", "unable_to_fetch": "Unable to load updates",
"version_available": "Version {version_available} is available", "version_available": "Version {version_available} is available",
"more_updates": "+{count} updates", "more_updates": "Show all updates",
"show": "show", "show": "show",
"show_skipped": "Show skipped", "show_skipped": "Show skipped",
"hide_skipped": "Hide skipped", "hide_skipped": "Hide skipped",
@ -1231,7 +1231,7 @@
"description": "Find and fix issues with your Home Assistant instance", "description": "Find and fix issues with your Home Assistant instance",
"title": "{count} {count, plural,\n one {repair}\n other {repairs}\n}", "title": "{count} {count, plural,\n one {repair}\n other {repairs}\n}",
"no_repairs": "There are currently no repairs available", "no_repairs": "There are currently no repairs available",
"more_repairs": "+{count} repairs", "more_repairs": "Show all repairs",
"show_ignored": "Show ignored", "show_ignored": "Show ignored",
"hide_ignored": "Hide ignored", "hide_ignored": "Hide ignored",
"critical": "Critical", "critical": "Critical",