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