Add support for my backup links (#12172)

This commit is contained in:
Joakim Sørensen 2022-03-31 16:05:39 +02:00 committed by GitHub
parent edc15940a2
commit 11696c566a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,6 +117,10 @@ const REDIRECTS: Redirects = {
component: "lovelace",
redirect: "/config/lovelace/resources",
},
backup: {
component: "backup",
redirect: "/config/backup",
},
people: {
component: "person",
redirect: "/config/person",
@ -184,6 +188,13 @@ class HaPanelMy extends LitElement {
super.connectedCallback();
const path = this.route.path.substring(1);
if (path === "backup" && isComponentLoaded(this.hass, "hassio")) {
navigate("/hassio/backups", {
replace: true,
});
return;
}
if (path.startsWith("supervisor")) {
if (!isComponentLoaded(this.hass, "hassio")) {
this._error = "no_supervisor";