From f41330a29b8b02ecbbb4c1db851c202c89336dd8 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Thu, 22 Dec 2022 15:43:55 +0100 Subject: [PATCH] Allign MQTT config panel controls (#14818) Co-authored-by: Bram Kragten --- .../mqtt/mqtt-config-panel.ts | 68 ++++++++++------ .../mqtt/mqtt-subscribe-card.ts | 77 ++++++++++++------- 2 files changed, 97 insertions(+), 48 deletions(-) diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts index a60764a184..5ab4a00ab2 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts @@ -50,28 +50,30 @@ class HaPanelDevMqtt extends LitElement { )} >
- - ${qosLevel.map( - (qos) => - html`${qos}` - )} - - - - +
+ + ${qosLevel.map( + (qos) => + html`${qos}` + )} + + + + +

${this.hass.localize("ui.panel.config.mqtt.payload")}

- - ${qosLevel.map( - (qos) => html`${qos}` - )} - - - ${this._subscribed - ? this.hass.localize("ui.panel.config.mqtt.stop_listening") - : this.hass.localize("ui.panel.config.mqtt.start_listening")} - +
+ + ${qosLevel.map( + (qos) => + html`${qos}` + )} + + + ${this._subscribed + ? this.hass.localize("ui.panel.config.mqtt.stop_listening") + : this.hass.localize("ui.panel.config.mqtt.start_listening")} + +
${this._messages.map( @@ -170,6 +173,28 @@ class MqttSubscribeCard extends LitElement { pre { font-family: var(--code-font-family, monospace); } + .panel-dev-mqtt-subscribe-fields { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + } + ha-select { + width: 96px; + margin: 0 8px; + } + ha-textfield { + flex: 1; + } + @media screen and (max-width: 600px) { + ha-select { + margin-left: 0px; + margin-top: 8px; + } + ha-textfield { + flex: auto; + width: 100%; + } + } `; } }