mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-01 13:47:20 +00:00
Compare commits
2 Commits
reduce-mot
...
fix-domain
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c094f3375a | ||
|
|
1d7f3e4d66 |
@@ -10,8 +10,8 @@ import {
|
|||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
import { createCloseHeading } from "../../components/ha-dialog";
|
import { createCloseHeading } from "../../components/ha-dialog";
|
||||||
import "../../components/ha-switch";
|
|
||||||
import "../../components/ha-formfield";
|
import "../../components/ha-formfield";
|
||||||
|
import "../../components/ha-switch";
|
||||||
import { domainToName } from "../../data/integration";
|
import { domainToName } from "../../data/integration";
|
||||||
import { haStyleDialog } from "../../resources/styles";
|
import { haStyleDialog } from "../../resources/styles";
|
||||||
import { HomeAssistant } from "../../types";
|
import { HomeAssistant } from "../../types";
|
||||||
@@ -59,16 +59,18 @@ class DomainTogglerDialog extends LitElement implements HassDialog {
|
|||||||
(domain) =>
|
(domain) =>
|
||||||
html`
|
html`
|
||||||
<ha-formfield .label=${domain[0]}>
|
<ha-formfield .label=${domain[0]}>
|
||||||
<ha-switch
|
<ha-switch
|
||||||
.domain=${domain[1]}
|
.domain=${domain[1]}
|
||||||
.checked=${!this._params!.exposedDomains ||
|
.checked=${!this._params!.exposedDomains ||
|
||||||
this._params!.exposedDomains.includes(domain[1])}
|
this._params!.exposedDomains.includes(domain[1])}
|
||||||
@change=${this._handleSwitch}
|
@change=${this._handleSwitch}
|
||||||
>
|
>
|
||||||
</ha-switch>
|
</ha-switch>
|
||||||
</ha-formfield>
|
</ha-formfield>
|
||||||
<mwc-button .domain=${domain[1]} @click=${this._handleReset}>
|
<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>
|
</mwc-button>
|
||||||
`
|
`
|
||||||
)}
|
)}
|
||||||
@@ -96,7 +98,8 @@ class DomainTogglerDialog extends LitElement implements HassDialog {
|
|||||||
}
|
}
|
||||||
div {
|
div {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto auto auto;
|
grid-template-columns: auto auto;
|
||||||
|
grid-row-gap: 8px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
|
|||||||
@@ -1,25 +1,26 @@
|
|||||||
import "@material/mwc-tab-bar";
|
|
||||||
import "@material/mwc-tab";
|
|
||||||
import "@material/mwc-icon-button";
|
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 { HassEntity } from "home-assistant-js-websocket";
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} from "lit-element";
|
||||||
import { cache } from "lit-html/directives/cache";
|
import { cache } from "lit-html/directives/cache";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
|
||||||
import { dynamicElement } from "../../../common/dom/dynamic-element-directive";
|
import { dynamicElement } from "../../../common/dom/dynamic-element-directive";
|
||||||
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
import { computeStateName } from "../../../common/entity/compute_state_name";
|
import { computeStateName } from "../../../common/entity/compute_state_name";
|
||||||
import "../../../components/ha-dialog";
|
import "../../../components/ha-dialog";
|
||||||
import "../../../components/ha-header-bar";
|
import "../../../components/ha-header-bar";
|
||||||
import "../../../components/ha-svg-icon";
|
|
||||||
import "../../../components/ha-related-items";
|
import "../../../components/ha-related-items";
|
||||||
|
import "../../../components/ha-svg-icon";
|
||||||
import {
|
import {
|
||||||
EntityRegistryEntry,
|
EntityRegistryEntry,
|
||||||
ExtEntityRegistryEntry,
|
ExtEntityRegistryEntry,
|
||||||
@@ -30,7 +31,6 @@ import type { HomeAssistant } from "../../../types";
|
|||||||
import { PLATFORMS_WITH_SETTINGS_TAB } from "./const";
|
import { PLATFORMS_WITH_SETTINGS_TAB } from "./const";
|
||||||
import "./entity-registry-settings";
|
import "./entity-registry-settings";
|
||||||
import type { EntityRegistryDetailDialogParams } from "./show-dialog-entity-editor";
|
import type { EntityRegistryDetailDialogParams } from "./show-dialog-entity-editor";
|
||||||
import { mdiClose, mdiTune } from "@mdi/js";
|
|
||||||
|
|
||||||
interface Tabs {
|
interface Tabs {
|
||||||
[key: string]: Tab;
|
[key: string]: Tab;
|
||||||
@@ -252,7 +252,7 @@ export class DialogEntityEditor extends LitElement {
|
|||||||
|
|
||||||
@media all and (min-width: 451px) and (min-height: 501px) {
|
@media all and (min-width: 451px) and (min-height: 501px) {
|
||||||
.wrapper {
|
.wrapper {
|
||||||
width: 400px;
|
min-width: 400px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user