1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-24 20:55:49 +00:00

Follow device page link handling

This commit is contained in:
Aidan Timson
2025-12-09 16:19:32 +00:00
parent e573f2012e
commit 0c1f57e2ce

View File

@@ -222,17 +222,17 @@ class HaConfigEntryRow extends LitElement {
? item.configuration_url!.replace("homeassistant://", "/")
: item.configuration_url;
const isLocalUrl =
configurationUrl?.startsWith("/") ||
configurationUrlIsHomeAssistant;
return html`
${configurationUrl
? html`<a
slot="end"
href=${configurationUrl}
target=${isLocalUrl ? undefined : "_blank"}
rel=${isLocalUrl ? undefined : "noreferrer"}
target=${configurationUrlIsHomeAssistant
? undefined
: "_blank"}
rel=${configurationUrlIsHomeAssistant
? undefined
: "noreferrer"}
>
<ha-icon-button
.path=${mdiOpenInNew}