mirror of
https://github.com/home-assistant/frontend.git
synced 2026-02-05 15:58:08 +00:00
Compare commits
1 Commits
state-card
...
protocol-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
081a13b3d7 |
@@ -222,6 +222,7 @@ export class BluetoothAdvertisementMonitorPanel extends LitElement {
|
||||
filter=${this.address || ""}
|
||||
clickable
|
||||
.tabs=${bluetoothTabs}
|
||||
back-path="/config"
|
||||
></hass-tabs-subpage-data-table>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ export class BluetoothConfigDashboard extends LitElement {
|
||||
.hass=${this.hass}
|
||||
.route=${this.route}
|
||||
.tabs=${bluetoothTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<div class="content">
|
||||
<ha-card
|
||||
|
||||
@@ -225,6 +225,7 @@ export class BluetoothConnectionMonitorPanel extends LitElement {
|
||||
)}
|
||||
@grouping-changed=${this._handleGroupingChanged}
|
||||
@collapsed-changed=${this._handleCollapseChanged}
|
||||
back-path="/config"
|
||||
></hass-tabs-subpage-data-table>
|
||||
`;
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ export class BluetoothNetworkVisualization extends LitElement {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${bluetoothTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<ha-network-graph
|
||||
.hass=${this.hass}
|
||||
|
||||
@@ -111,6 +111,7 @@ class ZHAConfigDashboard extends LitElement {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${zhaTabs}
|
||||
back-path="/config"
|
||||
has-fab
|
||||
>
|
||||
<div class="container">
|
||||
|
||||
@@ -101,6 +101,7 @@ export class ZHAGroupsDashboard extends LitElement {
|
||||
return html`
|
||||
<hass-tabs-subpage-data-table
|
||||
.tabs=${zhaTabs}
|
||||
back-path="/config"
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
|
||||
@@ -54,6 +54,7 @@ export class ZHANetworkVisualizationPage extends LitElement {
|
||||
return html`
|
||||
<hass-tabs-subpage
|
||||
.tabs=${zhaTabs}
|
||||
back-path="/config"
|
||||
.hass=${this.hass}
|
||||
.narrow=${this.narrow}
|
||||
.isWide=${this.isWide}
|
||||
|
||||
@@ -151,6 +151,7 @@ class ZWaveJSConfigDashboard extends SubscribeMixin(LitElement) {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${configTabs}
|
||||
back-path="/config"
|
||||
has-fab
|
||||
>
|
||||
<ha-icon-button
|
||||
|
||||
@@ -67,6 +67,7 @@ class ZWaveJSLogs extends SubscribeMixin(LitElement) {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${configTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<div class="container">
|
||||
<ha-card>
|
||||
|
||||
@@ -77,6 +77,7 @@ export class ZWaveJSNetworkVisualization extends SubscribeMixin(LitElement) {
|
||||
.narrow=${this.narrow}
|
||||
.route=${this.route}
|
||||
.tabs=${configTabs}
|
||||
back-path="/config"
|
||||
>
|
||||
<ha-network-graph
|
||||
.hass=${this.hass}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import type { HassEntity } from "home-assistant-js-websocket";
|
||||
import type { CSSResultGroup } from "lit";
|
||||
import { css, html, LitElement } from "lit";
|
||||
import { html, LitElement } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import "../components/entity/ha-entity-toggle";
|
||||
import "../components/entity/state-info";
|
||||
import "../components/ha-control-button-group";
|
||||
import "../components/ha-control-button";
|
||||
import "../components/ha-button";
|
||||
import { UNAVAILABLE } from "../data/entity/entity";
|
||||
import { haStyle } from "../resources/styles";
|
||||
import type { HomeAssistant } from "../types";
|
||||
@@ -27,14 +26,14 @@ class StateCardButton extends LitElement {
|
||||
.stateObj=${stateObj}
|
||||
.inDialog=${this.inDialog}
|
||||
></state-info>
|
||||
<ha-control-button-group>
|
||||
<ha-control-button
|
||||
.disabled=${stateObj.state === UNAVAILABLE}
|
||||
@click=${this._pressButton}
|
||||
>
|
||||
${this.hass.localize("ui.card.button.press")}
|
||||
</ha-control-button>
|
||||
</ha-control-button-group>
|
||||
<ha-button
|
||||
appearance="plain"
|
||||
size="small"
|
||||
@click=${this._pressButton}
|
||||
.disabled=${stateObj.state === UNAVAILABLE}
|
||||
>
|
||||
${this.hass.localize("ui.card.button.press")}
|
||||
</ha-button>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
@@ -47,24 +46,7 @@ class StateCardButton extends LitElement {
|
||||
}
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
return [
|
||||
haStyle,
|
||||
css`
|
||||
ha-control-button-group > ha-control-button {
|
||||
--control-button-padding: var(--ha-space-4);
|
||||
}
|
||||
ha-control-button {
|
||||
--control-button-focus-color: var(
|
||||
--feature-color,
|
||||
var(--primary-color)
|
||||
);
|
||||
--control-button-icon-color: var(
|
||||
--feature-color,
|
||||
var(--primary-color)
|
||||
);
|
||||
}
|
||||
`,
|
||||
];
|
||||
return haStyle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import type { HassEntity } from "home-assistant-js-websocket";
|
||||
import type { CSSResultGroup } from "lit";
|
||||
import { css, html, LitElement } from "lit";
|
||||
import { html, LitElement } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import "../components/entity/ha-entity-toggle";
|
||||
import "../components/entity/state-info";
|
||||
import "../components/ha-control-button-group";
|
||||
import "../components/ha-control-button";
|
||||
import "../components/ha-button";
|
||||
import { UNAVAILABLE } from "../data/entity/entity";
|
||||
import { haStyle } from "../resources/styles";
|
||||
import type { HomeAssistant } from "../types";
|
||||
@@ -27,14 +26,13 @@ class StateCardInputButton extends LitElement {
|
||||
.stateObj=${stateObj}
|
||||
.inDialog=${this.inDialog}
|
||||
></state-info>
|
||||
<ha-control-button-group>
|
||||
<ha-control-button
|
||||
.disabled=${stateObj.state === UNAVAILABLE}
|
||||
@click=${this._pressButton}
|
||||
>
|
||||
${this.hass.localize("ui.card.button.press")}
|
||||
</ha-control-button>
|
||||
</ha-control-button-group>
|
||||
<ha-button
|
||||
appearance="plain"
|
||||
@click=${this._pressButton}
|
||||
.disabled=${stateObj.state === UNAVAILABLE}
|
||||
>
|
||||
${this.hass.localize("ui.card.button.press")}
|
||||
</ha-button>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
@@ -47,24 +45,7 @@ class StateCardInputButton extends LitElement {
|
||||
}
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
return [
|
||||
haStyle,
|
||||
css`
|
||||
ha-control-button-group > ha-control-button {
|
||||
--control-button-padding: var(--ha-space-4);
|
||||
}
|
||||
ha-control-button {
|
||||
--control-button-focus-color: var(
|
||||
--feature-color,
|
||||
var(--primary-color)
|
||||
);
|
||||
--control-button-icon-color: var(
|
||||
--feature-color,
|
||||
var(--primary-color)
|
||||
);
|
||||
}
|
||||
`,
|
||||
];
|
||||
return haStyle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user