mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 01:36:49 +00:00
Update Repairs to new design (#13276)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
68517018cc
commit
f7090583ac
@ -188,54 +188,59 @@ class HaConfigDashboard extends LitElement {
|
||||
.isWide=${this.isWide}
|
||||
full-width
|
||||
>
|
||||
${repairsIssues.length
|
||||
? html`
|
||||
<ha-card outlined>
|
||||
<ha-config-repairs
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.total=${totalRepairIssues}
|
||||
.repairsIssues=${repairsIssues}
|
||||
@update-issues=${this._fetchIssues}
|
||||
></ha-config-repairs>
|
||||
${totalRepairIssues > repairsIssues.length
|
||||
? html`
|
||||
<a class="button" href="/config/repairs">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.repairs.more_repairs",
|
||||
{
|
||||
count: totalRepairIssues - repairsIssues.length,
|
||||
}
|
||||
)}
|
||||
</a>
|
||||
`
|
||||
: ""}
|
||||
</ha-card>
|
||||
`
|
||||
: ""}
|
||||
${canInstallUpdates.length
|
||||
? html`
|
||||
<ha-card outlined>
|
||||
<ha-config-updates
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.total=${totalUpdates}
|
||||
.updateEntities=${canInstallUpdates}
|
||||
></ha-config-updates>
|
||||
${totalUpdates > canInstallUpdates.length
|
||||
? html`
|
||||
<a class="button" href="/config/updates">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.updates.more_updates",
|
||||
{
|
||||
count: totalUpdates - canInstallUpdates.length,
|
||||
}
|
||||
)}
|
||||
</a>
|
||||
`
|
||||
: ""}
|
||||
</ha-card>
|
||||
`
|
||||
${repairsIssues.length || canInstallUpdates.length
|
||||
? html`<ha-card outlined>
|
||||
${repairsIssues.length
|
||||
? html`
|
||||
<ha-config-repairs
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.total=${totalRepairIssues}
|
||||
.repairsIssues=${repairsIssues}
|
||||
@update-issues=${this._fetchIssues}
|
||||
></ha-config-repairs>
|
||||
${totalRepairIssues > repairsIssues.length
|
||||
? html`
|
||||
<a class="button" href="/config/repairs">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.repairs.more_repairs",
|
||||
{
|
||||
count:
|
||||
totalRepairIssues - repairsIssues.length,
|
||||
}
|
||||
)}
|
||||
</a>
|
||||
`
|
||||
: ""}
|
||||
`
|
||||
: ""}
|
||||
${repairsIssues.length && canInstallUpdates.length
|
||||
? html`<hr />`
|
||||
: ""}
|
||||
${canInstallUpdates.length
|
||||
? html`
|
||||
<ha-config-updates
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.total=${totalUpdates}
|
||||
.updateEntities=${canInstallUpdates}
|
||||
></ha-config-updates>
|
||||
${totalUpdates > canInstallUpdates.length
|
||||
? html`
|
||||
<a class="button" href="/config/updates">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.updates.more_updates",
|
||||
{
|
||||
count:
|
||||
totalUpdates - canInstallUpdates.length,
|
||||
}
|
||||
)}
|
||||
</a>
|
||||
`
|
||||
: ""}
|
||||
`
|
||||
: ""}
|
||||
</ha-card>`
|
||||
: ""}
|
||||
|
||||
<ha-card outlined>
|
||||
@ -336,9 +341,12 @@ class HaConfigDashboard extends LitElement {
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
a.button {
|
||||
display: block;
|
||||
color: var(--primary-color);
|
||||
padding: 16px;
|
||||
display: inline-block;
|
||||
color: var(--primary-text-color);
|
||||
padding: 6px 16px;
|
||||
margin: 8px 16px 16px 16px;
|
||||
border-radius: 32px;
|
||||
border: 1px solid var(--divider-color);
|
||||
}
|
||||
.title {
|
||||
font-size: 16px;
|
||||
@ -368,6 +376,16 @@ class HaConfigDashboard extends LitElement {
|
||||
.keep-together {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 1px;
|
||||
background-color: var(
|
||||
--ha-card-border-color,
|
||||
var(--divider-color, #e0e0e0)
|
||||
);
|
||||
border: none;
|
||||
margin-top: 0;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
@ -81,6 +81,9 @@ class HaConfigRepairs extends LitElement {
|
||||
)}`
|
||||
: ""}
|
||||
</span>
|
||||
${!this.narrow
|
||||
? html`<ha-icon-next slot="meta"></ha-icon-next>`
|
||||
: ""}
|
||||
</ha-list-item>
|
||||
`
|
||||
)}
|
||||
|
@ -1218,7 +1218,7 @@
|
||||
"title": "{count} {count, plural,\n one {update}\n other {updates}\n}",
|
||||
"unable_to_fetch": "Unable to load updates",
|
||||
"version_available": "Version {version_available} is available",
|
||||
"more_updates": "+{count} updates",
|
||||
"more_updates": "Show all updates",
|
||||
"show": "show",
|
||||
"show_skipped": "Show skipped",
|
||||
"hide_skipped": "Hide skipped",
|
||||
@ -1231,7 +1231,7 @@
|
||||
"description": "Find and fix issues with your Home Assistant instance",
|
||||
"title": "{count} {count, plural,\n one {repair}\n other {repairs}\n}",
|
||||
"no_repairs": "There are currently no repairs available",
|
||||
"more_repairs": "+{count} repairs",
|
||||
"more_repairs": "Show all repairs",
|
||||
"show_ignored": "Show ignored",
|
||||
"hide_ignored": "Hide ignored",
|
||||
"critical": "Critical",
|
||||
|
Loading…
x
Reference in New Issue
Block a user