Add support for the media browser My link (#11757)

This commit is contained in:
Paulus Schoutsen 2022-02-21 09:21:29 -08:00 committed by GitHub
parent 72b5721c88
commit a14d75deec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,10 @@ const REDIRECTS: Redirects = {
component: "history",
redirect: "/history",
},
media_browser: {
component: "media_source",
redirect: "/media-browser",
},
};
export type ParamType = "url" | "string";
@ -178,7 +182,7 @@ class HaPanelMy extends LitElement {
connectedCallback() {
super.connectedCallback();
const path = this.route.path.substr(1);
const path = this.route.path.substring(1);
if (path.startsWith("supervisor")) {
if (!isComponentLoaded(this.hass, "hassio")) {