From 3e4955becd3f23e58d8576f95fbca061ded7782c Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 3 Dec 2020 14:18:17 +0100 Subject: [PATCH] UI tweaks for BP (#7883) Co-authored-by: Paulus Schoutsen --- src/components/ha-blueprint-picker.ts | 1 + src/components/ha-settings-row.ts | 16 +++-- .../automation/blueprint-automation-editor.ts | 61 +++++++++---------- .../config/blueprint/ha-blueprint-overview.ts | 6 +- src/translations/en.json | 1 - 5 files changed, 43 insertions(+), 42 deletions(-) diff --git a/src/components/ha-blueprint-picker.ts b/src/components/ha-blueprint-picker.ts index f9c19a0bce..e75db74552 100644 --- a/src/components/ha-blueprint-picker.ts +++ b/src/components/ha-blueprint-picker.ts @@ -52,6 +52,7 @@ class HaBluePrintPicker extends LitElement { .label=${this.label || this.hass.localize("ui.components.blueprint-picker.label")} .disabled=${this.disabled} + horizontal-align="left" > - paper-item-body { - padding-right: 16px; - } - ` : html`${blueprint?.metadata.description - ? html`

${blueprint.metadata.description}

` + ? html`

+ ${blueprint.metadata.description} +

` : ""} ${blueprint?.metadata?.input && Object.keys(blueprint.metadata.input).length - ? html`

- ${this.hass.localize( - "ui.panel.config.automation.editor.blueprint.inputs" - )} -

- ${Object.entries(blueprint.metadata.input).map( - ([key, value]) => - html` - ${value?.name || key} - ${value?.description} - ${value?.selector - ? html`` - : html``} - ` - )}` + ? Object.entries(blueprint.metadata.input).map( + ([key, value]) => + html` + ${value?.name || key} + ${value?.description} + ${value?.selector + ? html`` + : html``} + ` + ) : html`

${this.hass.localize( "ui.panel.config.automation.editor.blueprint.no_inputs" diff --git a/src/panels/config/blueprint/ha-blueprint-overview.ts b/src/panels/config/blueprint/ha-blueprint-overview.ts index ce732ab17d..bfdd513c94 100644 --- a/src/panels/config/blueprint/ha-blueprint-overview.ts +++ b/src/panels/config/blueprint/ha-blueprint-overview.ts @@ -112,7 +112,6 @@ class HaBlueprintOverview extends LitElement { create: { title: "", type: narrow ? "icon-button" : undefined, - width: narrow ? undefined : "180px", template: (_, blueprint: any) => blueprint.error ? "" @@ -126,8 +125,9 @@ class HaBlueprintOverview extends LitElement { "ui.panel.config.blueprint.overview.use_blueprint" )} @click=${(ev) => this._createNew(ev)} - >` + > + + ` : html` this._createNew(ev)} diff --git a/src/translations/en.json b/src/translations/en.json index bc3a74b86a..4eb0e3b92a 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -1161,7 +1161,6 @@ "blueprint_to_use": "Blueprint to use", "no_blueprints": "You don't have any blueprints", "manage_blueprints": "Manage Blueprints", - "inputs": "Inputs", "no_inputs": "This blueprint doesn't have any inputs." }, "modes": {