From 1395f38a23553b931d4b3cc276979817cd3f0b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Sat, 10 Jun 2023 18:30:19 +0200 Subject: [PATCH] Replace "experimental" names (#667) --- src/components/hacs-repository-owerflow-menu.ts | 8 ++++---- .../hacs-dashboard.ts} | 4 ++-- .../hacs-repository-dashboard.ts} | 4 ++-- src/hacs-router.ts | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) rename src/{panels/hacs-experimental-panel.ts => dashboards/hacs-dashboard.ts} (99%) rename src/{panels/hacs-repository-panel.ts => dashboards/hacs-repository-dashboard.ts} (99%) diff --git a/src/components/hacs-repository-owerflow-menu.ts b/src/components/hacs-repository-owerflow-menu.ts index ed74b482..8d2cce7d 100644 --- a/src/components/hacs-repository-owerflow-menu.ts +++ b/src/components/hacs-repository-owerflow-menu.ts @@ -16,12 +16,12 @@ import { deleteResource, fetchResources } from "../../homeassistant-frontend/src import { showConfirmationDialog } from "../../homeassistant-frontend/src/dialogs/generic/show-dialog-box"; import type { RepositoryBase } from "../data/repository"; import { repositoryUninstall, repositoryUpdate } from "../data/websocket"; -import type { HacsExperimentalPanel } from "../panels/hacs-experimental-panel"; -import type { HacsRepositoryPanel } from "../panels/hacs-repository-panel"; +import type { HacsDashboard } from "../dashboards/hacs-dashboard"; +import type { HacsRepositoryDashboard } from "../dashboards/hacs-repository-dashboard"; import { showHacsDownloadDialog, showHacsFormDialog } from "./dialogs/show-hacs-dialog"; export const repositoryMenuItems = memoizeOne( - (element: HacsRepositoryPanel | HacsExperimentalPanel, repository: RepositoryBase) => [ + (element: HacsRepositoryDashboard | HacsDashboard, repository: RepositoryBase) => [ ...(element.nodeName === "HACS-EXPERIMENTAL-PANEL" ? [ { @@ -140,7 +140,7 @@ export const repositoryMenuItems = memoizeOne( ); const _repositoryRemove = async ( - element: HacsRepositoryPanel | HacsExperimentalPanel, + element: HacsRepositoryDashboard | HacsDashboard, repository: RepositoryBase ) => { if (repository.category === "plugin" && element.hacs.info?.lovelace_mode !== "yaml") { diff --git a/src/panels/hacs-experimental-panel.ts b/src/dashboards/hacs-dashboard.ts similarity index 99% rename from src/panels/hacs-experimental-panel.ts rename to src/dashboards/hacs-dashboard.ts index 94564cce..652afe66 100644 --- a/src/panels/hacs-experimental-panel.ts +++ b/src/dashboards/hacs-dashboard.ts @@ -73,8 +73,8 @@ const defaultKeyData = { filterable: true, }; -@customElement("hacs-experimental-panel") -export class HacsExperimentalPanel extends LitElement { +@customElement("hacs-dashboard") +export class HacsDashboard extends LitElement { @property({ attribute: false }) public hacs!: Hacs; @property({ attribute: false }) public hass!: HomeAssistant; diff --git a/src/panels/hacs-repository-panel.ts b/src/dashboards/hacs-repository-dashboard.ts similarity index 99% rename from src/panels/hacs-repository-panel.ts rename to src/dashboards/hacs-repository-dashboard.ts index f8b90b8e..498e276f 100644 --- a/src/panels/hacs-repository-panel.ts +++ b/src/dashboards/hacs-repository-dashboard.ts @@ -31,8 +31,8 @@ import { getRepositories, repositoryAdd } from "../data/websocket"; import { HacsStyles } from "../styles/hacs-common-style"; import { markdownWithRepositoryContext } from "../tools/markdown"; -@customElement("hacs-repository-panel") -export class HacsRepositoryPanel extends LitElement { +@customElement("hacs-repository-dashboard") +export class HacsRepositoryDashboard extends LitElement { @property({ attribute: false }) public hacs!: Hacs; @property({ attribute: false }) public hass!: HomeAssistant; diff --git a/src/hacs-router.ts b/src/hacs-router.ts index 67c5aca2..7487caa5 100644 --- a/src/hacs-router.ts +++ b/src/hacs-router.ts @@ -70,12 +70,12 @@ class HacsRouter extends HassRouterPage { load: () => import("./hacs-my-redirect"), }, dashboard: { - tag: "hacs-experimental-panel", - load: () => import("./panels/hacs-experimental-panel"), + tag: "hacs-dashboard", + load: () => import("./dashboards/hacs-dashboard"), }, repository: { - tag: "hacs-repository-panel", - load: () => import("./panels/hacs-repository-panel"), + tag: "hacs-repository-dashboard", + load: () => import("./dashboards/hacs-repository-dashboard"), }, }, };