1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Fix My link missing repository_url for app pages

The "m" shortcut to create My Home Assistant links was not including the
repository_url parameter for app pages. Two issues fixed:
1. optional_params from redirect config were never processed in _createMyLink
2. ha-config-app-dashboard was stripping repository_url from the URL on load

https://claude.ai/code/session_019Pcu6GyizXJAUCWtrxCVg5
This commit is contained in:
Claude
2026-03-28 12:22:24 +00:00
parent b9b249a317
commit dc8b12e1ec
2 changed files with 14 additions and 3 deletions

View File

@@ -63,9 +63,12 @@ class HaConfigAppDashboard extends LitElement {
this._fromStore = extractSearchParam("store") === "true";
const repositoryUrl = extractSearchParam("repository_url");
if (repositoryUrl) {
navigate(`/config/app/${this.route.path.split("/")[1]}`, {
replace: true,
});
navigate(
`/config/app/${this.route.path.split("/")[1]}?repository_url=${encodeURIComponent(repositoryUrl)}`,
{
replace: true,
}
);
}
await this._loadAddon(repositoryUrl);
this.addEventListener("hass-api-called", (ev) => this._apiCalled(ev));

View File

@@ -290,6 +290,14 @@ export default <T extends Constructor<HassElement>>(superClass: T) =>
}
}
}
if (redirect.optional_params) {
const params = extractSearchParamsObject();
for (const key of Object.keys(redirect.optional_params)) {
if (key in params) {
myParams.append(key, params[key]);
}
}
}
if (redirect.redirect === "/config/integrations/integration") {
myParams.append("domain", targetPath.split("/")[4]);
} else if (redirect.redirect === "/config/app") {