diff --git a/.gitignore b/.gitignore index 74fe1c8f92..317cc85ab2 100644 --- a/.gitignore +++ b/.gitignore @@ -37,4 +37,4 @@ yarn-error.log .tool-versions # Home Assistant config -config \ No newline at end of file +/config diff --git a/src/panels/config/dashboard/ha-config-dashboard.ts b/src/panels/config/dashboard/ha-config-dashboard.ts index f16118a47d..9ef4aa5b67 100644 --- a/src/panels/config/dashboard/ha-config-dashboard.ts +++ b/src/panels/config/dashboard/ha-config-dashboard.ts @@ -13,6 +13,7 @@ import { import { isComponentLoaded } from "../../../common/config/is_component_loaded"; import "../../../components/ha-card"; import "../../../components/ha-icon-next"; +import "../../../components/ha-svg-icon"; import "../../../components/ha-menu-button"; import { CloudStatus } from "../../../data/cloud"; import { haStyle } from "../../../resources/styles"; @@ -20,7 +21,8 @@ import { HomeAssistant } from "../../../types"; import "../ha-config-section"; import { configSections } from "../ha-panel-config"; import "./ha-config-navigation"; -import { mdiCloudLock } from "@mdi/js"; +import { mdiClose, mdiCloudLock } from "@mdi/js"; +import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box"; const CONF_HAPPENING = new Date() < new Date("2020-12-13T23:00:00Z"); @@ -69,17 +71,22 @@ class HaConfigDashboard extends LitElement { ` : ""} - ${CONF_HAPPENING + ${CONF_HAPPENING && !localStorage.dismissConf2020 ? html` - + -
+
+ + + ` : ""} ${Object.values(configSections).map( @@ -157,6 +164,33 @@ class HaConfigDashboard extends LitElement { `; } + private async _dismissConference() { + if ( + await showConfirmationDialog(this, { + title: "Home Assistant Conference", + text: html` + If you've + bought your ticket + or have + subscribed to the livestream, you might want to dismiss this banner. Do you want to continue? + `, + }) + ) { + localStorage.dismissConf2020 = "1"; + this.requestUpdate(); + } + } + static get styles(): CSSResultArray { return [ haStyle, @@ -196,6 +230,12 @@ class HaConfigDashboard extends LitElement { align-items: center; color: white; } + .conf-card ha-svg-icon { + position: absolute; + bottom: -4px; + left: -4px; + color: #a2cdf3; + } .promo-advanced { text-align: center; color: var(--secondary-text-color);