mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-13 03:09:26 +00:00
Compare commits
8 Commits
template-e
...
20201111.2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
aa4f0929e0 | ||
![]() |
f99b9215e3 | ||
![]() |
c51d621fee | ||
![]() |
3fb35871c7 | ||
![]() |
d6d20cd704 | ||
![]() |
9cc6a6b885 | ||
![]() |
ee0be7b6d0 | ||
![]() |
7e6153ba7d |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -33,3 +33,6 @@ yarn-error.log
|
||||
|
||||
#asdf
|
||||
.tool-versions
|
||||
|
||||
# Home Assistant config
|
||||
/config
|
||||
|
2
setup.py
2
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="home-assistant-frontend",
|
||||
version="20201111.0",
|
||||
version="20201111.2",
|
||||
description="The Home Assistant frontend",
|
||||
url="https://github.com/home-assistant/home-assistant-polymer",
|
||||
author="The Home Assistant Authors",
|
||||
|
@@ -2,6 +2,22 @@ import "@vaadin/vaadin-date-picker/theme/material/vaadin-date-picker";
|
||||
|
||||
const VaadinDatePicker = customElements.get("vaadin-date-picker");
|
||||
|
||||
const documentContainer = document.createElement("template");
|
||||
documentContainer.setAttribute("style", "display: none;");
|
||||
documentContainer.innerHTML = `
|
||||
<dom-module id="ha-date-input-styles" theme-for="vaadin-text-field">
|
||||
<template>
|
||||
<style>
|
||||
[part="input-field"] {
|
||||
top: 2px;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
||||
`;
|
||||
document.head.appendChild(documentContainer.content);
|
||||
|
||||
export class HaDateInput extends VaadinDatePicker {
|
||||
constructor() {
|
||||
super();
|
||||
|
@@ -14,7 +14,7 @@ class HaLabeledSlider extends PolymerElement {
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 4px 0 8px;
|
||||
margin: 5px 0 8px;
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
|
||||
|
@@ -207,6 +207,7 @@ export class QuickBar extends LitElement {
|
||||
.item=${item}
|
||||
index=${ifDefined(index)}
|
||||
graphic="icon"
|
||||
class=${this._commandMode ? "command-item" : ""}
|
||||
>
|
||||
${item.iconPath
|
||||
? html`<ha-svg-icon
|
||||
@@ -526,6 +527,9 @@ export class QuickBar extends LitElement {
|
||||
|
||||
mwc-list-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
mwc-list-item.command-item {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
`,
|
||||
|
@@ -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 {
|
||||
</ha-card>
|
||||
`
|
||||
: ""}
|
||||
${CONF_HAPPENING
|
||||
${CONF_HAPPENING && !localStorage.dismissConf2020
|
||||
? html`
|
||||
<ha-card class="conf-card"
|
||||
><a
|
||||
<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-card>
|
||||
<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(
|
||||
@@ -157,6 +164,33 @@ 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 {
|
||||
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);
|
||||
|
@@ -52,7 +52,7 @@ class StateCardDisplay extends LocalizeMixin(PolymerElement) {
|
||||
|
||||
${this.stateInfoTemplate}
|
||||
<div class$="[[computeClassNames(stateObj)]]">
|
||||
[[computeStateDisplay(localize, stateObj, language)]]
|
||||
[[computeStateDisplay(localize, stateObj, hass.language)]]
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user