Lots of changes and modernization. WIP

This commit is contained in:
2022-07-13 21:02:47 +00:00
parent 69e9642b4b
commit 466a5eb5e7
26 changed files with 1691 additions and 1185 deletions

View File

@@ -0,0 +1,16 @@
// Loads in ha-config-dashboard which is used to copy styling
export const loadDevTools = async () => {
if (customElements.get("ha-config-dashboard")) return;
const ppResolver = document.createElement("partial-panel-resolver");
const routes = (ppResolver as any).getRoutes([
{
component_name: "config",
url_path: "a",
},
]);
await routes?.routes?.a?.load?.();
const configRouter = document.createElement("ha-panel-config");
await (configRouter as any)?.routerOptions?.routes?.dashboard?.load?.(); // Load ha-config-dashboard
await (configRouter as any)?.routerOptions?.routes?.cloud?.load?.(); // Load ha-settings-row
await customElements.whenDefined("ha-config-dashboard");
};