mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 15:56:35 +00:00
Repair issue fixes (#13272)
This commit is contained in:
parent
b9ae0e72b1
commit
b443ec0af5
@ -196,6 +196,7 @@ class HaConfigDashboard extends LitElement {
|
||||
.narrow=${this.narrow}
|
||||
.total=${totalRepairIssues}
|
||||
.repairsIssues=${repairsIssues}
|
||||
@update-issues=${this._fetchIssues}
|
||||
></ha-config-repairs>
|
||||
${totalRepairIssues > repairsIssues.length
|
||||
? html`
|
||||
@ -279,7 +280,9 @@ class HaConfigDashboard extends LitElement {
|
||||
);
|
||||
|
||||
private async _fetchIssues(): Promise<void> {
|
||||
const repairsIssues = (await fetchRepairsIssues(this.hass)).issues;
|
||||
const repairsIssues = (await fetchRepairsIssues(this.hass)).issues.filter(
|
||||
(issue) => !issue.ignored
|
||||
);
|
||||
|
||||
this._repairsIssues = {
|
||||
issues: repairsIssues
|
||||
|
@ -43,7 +43,6 @@ class DialogRepairsIssue extends LitElement {
|
||||
@closed=${this.closeDialog}
|
||||
scrimClickAction
|
||||
escapeKeyAction
|
||||
.hideActions=${!this._issue.learn_more_url}
|
||||
.heading=${createCloseHeading(
|
||||
this.hass,
|
||||
this.hass.localize(
|
||||
@ -86,7 +85,7 @@ class DialogRepairsIssue extends LitElement {
|
||||
? html`
|
||||
<br /><span class="dismissed">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.repairs.dialog.dismissed_in_version",
|
||||
"ui.panel.config.repairs.dialog.ignored_in_version",
|
||||
{ version: this._issue.dismissed_version }
|
||||
)}</span
|
||||
>
|
||||
|
@ -48,6 +48,7 @@ class HaConfigRepairs extends LitElement {
|
||||
graphic="avatar"
|
||||
.hasMeta=${!this.narrow}
|
||||
.issue=${issue}
|
||||
class=${issue.ignored ? "ignored" : ""}
|
||||
@click=${this._openShowMoreDialog}
|
||||
>
|
||||
<img
|
||||
@ -73,6 +74,12 @@ class HaConfigRepairs extends LitElement {
|
||||
${issue.created
|
||||
? relativeTime(new Date(issue.created), this.hass.locale)
|
||||
: ""}
|
||||
${issue.ignored
|
||||
? ` - ${this.hass.localize(
|
||||
"ui.panel.config.repairs.dialog.ignored_in_version_short",
|
||||
{ version: issue.dismissed_version }
|
||||
)}`
|
||||
: ""}
|
||||
</span>
|
||||
</ha-list-item>
|
||||
`
|
||||
@ -108,6 +115,9 @@ class HaConfigRepairs extends LitElement {
|
||||
padding: 16px;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.ignored {
|
||||
opacity: var(--light-secondary-opacity);
|
||||
}
|
||||
button.show-more {
|
||||
color: var(--primary-color);
|
||||
text-align: left;
|
||||
|
@ -1245,7 +1245,8 @@
|
||||
"unignore": "Unignore",
|
||||
"alert_not_fixable": "We can not repair this issue for you.",
|
||||
"breaks_in_version": "This will break in version {version}. Please fix this issue before upgrading.",
|
||||
"dismissed_in_version": "This issue was dismissed in version {version}."
|
||||
"ignored_in_version_short": "Ignored in version {version}",
|
||||
"ignored_in_version": "This issue was ignored in version {version}."
|
||||
}
|
||||
},
|
||||
"areas": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user