Compare commits

...

8 Commits

Author SHA1 Message Date
Bram Kragten
aa4f0929e0 Bumped version to 20201111.2 2020-11-17 22:24:30 +01:00
Thomas Lovén
f99b9215e3 Fix date picker row alignment (#7704) 2020-11-17 22:23:21 +01:00
Paulus Schoutsen
c51d621fee Allow dismissing (#7712) 2020-11-17 22:22:39 +01:00
Bram Kragten
3fb35871c7 Bumped version to 20201111.1 2020-11-16 22:02:28 +01:00
Donnie
d6d20cd704 Quick Bar should only capitalize letters in Command Palette (#7671) 2020-11-16 22:02:02 +01:00
Bram Kragten
9cc6a6b885 Fix number format in state-card-display (#7703) 2020-11-16 22:01:48 +01:00
Philip Allgaier
ee0be7b6d0 Add missing 1px to prevent slider pin cutoff (#7657) 2020-11-16 22:01:32 +01:00
Bram Kragten
7e6153ba7d Merge pull request #7654 from home-assistant/dev 2020-11-11 15:40:04 +01:00
7 changed files with 72 additions and 9 deletions

3
.gitignore vendored
View File

@@ -33,3 +33,6 @@ yarn-error.log
#asdf
.tool-versions
# Home Assistant config
/config

View File

@@ -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",

View File

@@ -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();

View File

@@ -14,7 +14,7 @@ class HaLabeledSlider extends PolymerElement {
}
.title {
margin: 4px 0 8px;
margin: 5px 0 8px;
color: var(--primary-text-color);
}

View File

@@ -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;
}
`,

View File

@@ -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);

View File

@@ -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>
`;
}