Compare commits

...

2 Commits

Author SHA1 Message Date
Bram Kragten
c094f3375a Fix width of entity editor 2020-09-02 22:18:28 +02:00
Bram Kragten
1d7f3e4d66 Fix layout of domain toggler dialog 2020-09-02 18:47:53 +02:00
2 changed files with 21 additions and 18 deletions

View File

@@ -10,8 +10,8 @@ import {
} from "lit-element";
import { fireEvent } from "../../common/dom/fire_event";
import { createCloseHeading } from "../../components/ha-dialog";
import "../../components/ha-switch";
import "../../components/ha-formfield";
import "../../components/ha-switch";
import { domainToName } from "../../data/integration";
import { haStyleDialog } from "../../resources/styles";
import { HomeAssistant } from "../../types";
@@ -59,16 +59,18 @@ class DomainTogglerDialog extends LitElement implements HassDialog {
(domain) =>
html`
<ha-formfield .label=${domain[0]}>
<ha-switch
.domain=${domain[1]}
.checked=${!this._params!.exposedDomains ||
this._params!.exposedDomains.includes(domain[1])}
@change=${this._handleSwitch}
>
</ha-switch>
</ha-formfield>
<ha-switch
.domain=${domain[1]}
.checked=${!this._params!.exposedDomains ||
this._params!.exposedDomains.includes(domain[1])}
@change=${this._handleSwitch}
>
</ha-switch>
</ha-formfield>
<mwc-button .domain=${domain[1]} @click=${this._handleReset}>
${this.hass.localize("ui.dialogs.domain_toggler.reset_entities")}
${this.hass.localize(
"ui.dialogs.domain_toggler.reset_entities"
)}
</mwc-button>
`
)}
@@ -96,7 +98,8 @@ class DomainTogglerDialog extends LitElement implements HassDialog {
}
div {
display: grid;
grid-template-columns: auto auto auto;
grid-template-columns: auto auto;
grid-row-gap: 8px;
align-items: center;
}
`,

View File

@@ -1,25 +1,26 @@
import "@material/mwc-tab-bar";
import "@material/mwc-tab";
import "@material/mwc-icon-button";
import "@material/mwc-tab";
import "@material/mwc-tab-bar";
import { mdiClose, mdiTune } from "@mdi/js";
import { HassEntity } from "home-assistant-js-websocket";
import {
css,
CSSResult,
customElement,
html,
internalProperty,
LitElement,
property,
internalProperty,
TemplateResult,
} from "lit-element";
import { cache } from "lit-html/directives/cache";
import { fireEvent } from "../../../common/dom/fire_event";
import { dynamicElement } from "../../../common/dom/dynamic-element-directive";
import { fireEvent } from "../../../common/dom/fire_event";
import { computeStateName } from "../../../common/entity/compute_state_name";
import "../../../components/ha-dialog";
import "../../../components/ha-header-bar";
import "../../../components/ha-svg-icon";
import "../../../components/ha-related-items";
import "../../../components/ha-svg-icon";
import {
EntityRegistryEntry,
ExtEntityRegistryEntry,
@@ -30,7 +31,6 @@ import type { HomeAssistant } from "../../../types";
import { PLATFORMS_WITH_SETTINGS_TAB } from "./const";
import "./entity-registry-settings";
import type { EntityRegistryDetailDialogParams } from "./show-dialog-entity-editor";
import { mdiClose, mdiTune } from "@mdi/js";
interface Tabs {
[key: string]: Tab;
@@ -252,7 +252,7 @@ export class DialogEntityEditor extends LitElement {
@media all and (min-width: 451px) and (min-height: 501px) {
.wrapper {
width: 400px;
min-width: 400px;
}
}