mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 02:36:37 +00:00
Remove conference banner (#7731)
This commit is contained in:
parent
c1ba8ba6b8
commit
1289bd03b2
Binary file not shown.
Before Width: | Height: | Size: 30 KiB |
@ -21,10 +21,7 @@ import { HomeAssistant } from "../../../types";
|
|||||||
import "../ha-config-section";
|
import "../ha-config-section";
|
||||||
import { configSections } from "../ha-panel-config";
|
import { configSections } from "../ha-panel-config";
|
||||||
import "./ha-config-navigation";
|
import "./ha-config-navigation";
|
||||||
import { mdiClose, mdiCloudLock } from "@mdi/js";
|
import { mdiCloudLock } from "@mdi/js";
|
||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
|
||||||
|
|
||||||
const CONF_HAPPENING = new Date() < new Date("2020-12-13T23:00:00Z");
|
|
||||||
|
|
||||||
@customElement("ha-config-dashboard")
|
@customElement("ha-config-dashboard")
|
||||||
class HaConfigDashboard extends LitElement {
|
class HaConfigDashboard extends LitElement {
|
||||||
@ -71,24 +68,6 @@ class HaConfigDashboard extends LitElement {
|
|||||||
</ha-card>
|
</ha-card>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${CONF_HAPPENING && !localStorage.dismissConf2020
|
|
||||||
? html`
|
|
||||||
<ha-card class="conf-card">
|
|
||||||
<a
|
|
||||||
target="_blank"
|
|
||||||
href="https://www.home-assistant.io/conference"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
<img src="/static/images/conference.png" />
|
|
||||||
<div class="carrot"><ha-icon-next></ha-icon-next></div>
|
|
||||||
</a>
|
|
||||||
<ha-svg-icon
|
|
||||||
.path=${mdiClose}
|
|
||||||
@click=${this._dismissConference}
|
|
||||||
></ha-svg-icon>
|
|
||||||
</ha-card>
|
|
||||||
`
|
|
||||||
: ""}
|
|
||||||
${Object.values(configSections).map(
|
${Object.values(configSections).map(
|
||||||
(section) => html`
|
(section) => html`
|
||||||
<ha-card>
|
<ha-card>
|
||||||
@ -164,33 +143,6 @@ class HaConfigDashboard extends LitElement {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _dismissConference() {
|
|
||||||
if (
|
|
||||||
await showConfirmationDialog(this, {
|
|
||||||
title: "Home Assistant Conference",
|
|
||||||
text: html`
|
|
||||||
If you've
|
|
||||||
<a
|
|
||||||
target="_blank"
|
|
||||||
href="https://hopin.to/events/home-assistant-conference"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>bought your ticket</a
|
|
||||||
>
|
|
||||||
or have
|
|
||||||
<a
|
|
||||||
target="_blank"
|
|
||||||
href="https://www.youtube.com/watch?v=xSB_MuKkgxE"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>subscribed to the livestream</a
|
|
||||||
>, you might want to dismiss this banner. Do you want to continue?
|
|
||||||
`,
|
|
||||||
})
|
|
||||||
) {
|
|
||||||
localStorage.dismissConf2020 = "1";
|
|
||||||
this.requestUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static get styles(): CSSResultArray {
|
static get styles(): CSSResultArray {
|
||||||
return [
|
return [
|
||||||
haStyle,
|
haStyle,
|
||||||
@ -214,28 +166,6 @@ class HaConfigDashboard extends LitElement {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
}
|
}
|
||||||
.conf-card {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.conf-card img {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.conf-card .carrot {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 16px;
|
|
||||||
bottom: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.conf-card ha-svg-icon {
|
|
||||||
position: absolute;
|
|
||||||
bottom: -4px;
|
|
||||||
left: -4px;
|
|
||||||
color: #a2cdf3;
|
|
||||||
}
|
|
||||||
.promo-advanced {
|
.promo-advanced {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user