mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Allow homeassistant URL in repair issues (#14456)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
f969299567
commit
e6b3475b5b
@ -38,6 +38,9 @@ class DialogRepairsIssue extends LitElement {
|
|||||||
return html``;
|
return html``;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const learnMoreUrlIsHomeAssistant =
|
||||||
|
this._issue.learn_more_url?.startsWith("homeassistant://") || false;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<ha-dialog
|
<ha-dialog
|
||||||
open
|
open
|
||||||
@ -103,12 +106,17 @@ class DialogRepairsIssue extends LitElement {
|
|||||||
${this._issue.learn_more_url
|
${this._issue.learn_more_url
|
||||||
? html`
|
? html`
|
||||||
<a
|
<a
|
||||||
href=${this._issue.learn_more_url}
|
.href=${learnMoreUrlIsHomeAssistant
|
||||||
target="_blank"
|
? this._issue.learn_more_url.replace("homeassistant://", "/")
|
||||||
|
: this._issue.learn_more_url}
|
||||||
|
.target=${learnMoreUrlIsHomeAssistant ? "" : "_blank"}
|
||||||
slot="primaryAction"
|
slot="primaryAction"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<mwc-button
|
<mwc-button
|
||||||
|
@click=${learnMoreUrlIsHomeAssistant
|
||||||
|
? this.closeDialog
|
||||||
|
: undefined}
|
||||||
.label=${this.hass!.localize(
|
.label=${this.hass!.localize(
|
||||||
"ui.panel.config.repairs.dialog.learn"
|
"ui.panel.config.repairs.dialog.learn"
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user