mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +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``;
|
||||
}
|
||||
|
||||
const learnMoreUrlIsHomeAssistant =
|
||||
this._issue.learn_more_url?.startsWith("homeassistant://") || false;
|
||||
|
||||
return html`
|
||||
<ha-dialog
|
||||
open
|
||||
@ -103,12 +106,17 @@ class DialogRepairsIssue extends LitElement {
|
||||
${this._issue.learn_more_url
|
||||
? html`
|
||||
<a
|
||||
href=${this._issue.learn_more_url}
|
||||
target="_blank"
|
||||
.href=${learnMoreUrlIsHomeAssistant
|
||||
? this._issue.learn_more_url.replace("homeassistant://", "/")
|
||||
: this._issue.learn_more_url}
|
||||
.target=${learnMoreUrlIsHomeAssistant ? "" : "_blank"}
|
||||
slot="primaryAction"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<mwc-button
|
||||
@click=${learnMoreUrlIsHomeAssistant
|
||||
? this.closeDialog
|
||||
: undefined}
|
||||
.label=${this.hass!.localize(
|
||||
"ui.panel.config.repairs.dialog.learn"
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user