Improve messaging of empty device info cards (#6628)

This commit is contained in:
Aidan Timson 2020-08-24 13:20:32 +01:00 committed by GitHub
parent 1439afcd9c
commit c3ef79caa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 13 deletions

View File

@ -308,11 +308,15 @@ export class HaConfigDevicePage extends LitElement {
: ""; : "";
}) })
: html` : html`
<paper-item class="no-link" <paper-item class="no-link">
>${this.hass.localize( ${this.hass.localize(
"ui.panel.config.devices.automation.no_automations" "ui.panel.config.devices.add_prompt",
)}</paper-item "name",
> this.hass.localize(
"ui.panel.config.devices.automation.automations"
)
)}
</paper-item>
`} `}
</ha-card> </ha-card>
` `
@ -376,11 +380,15 @@ export class HaConfigDevicePage extends LitElement {
: ""; : "";
}) })
: html` : html`
<paper-item class="no-link" <paper-item class="no-link">
>${this.hass.localize( ${this.hass.localize(
"ui.panel.config.devices.scene.no_scenes" "ui.panel.config.devices.add_prompt",
)}</paper-item "name",
> this.hass.localize(
"ui.panel.config.devices.scene.scenes"
)
)}
</paper-item>
` `
} }
</ha-card> </ha-card>
@ -429,9 +437,13 @@ export class HaConfigDevicePage extends LitElement {
: html` : html`
<paper-item class="no-link"> <paper-item class="no-link">
${this.hass.localize( ${this.hass.localize(
"ui.panel.config.devices.script.no_scripts" "ui.panel.config.devices.add_prompt",
)}</paper-item "name",
> this.hass.localize(
"ui.panel.config.devices.script.scripts"
)
)}
</paper-item>
`} `}
</ha-card> </ha-card>
` `
@ -706,6 +718,10 @@ export class HaConfigDevicePage extends LitElement {
color: var(--primary-color); color: var(--primary-color);
} }
ha-card {
padding-bottom: 8px;
}
ha-card a { ha-card a {
color: var(--primary-text-color); color: var(--primary-text-color);
} }

View File

@ -1376,6 +1376,7 @@
} }
}, },
"devices": { "devices": {
"add_prompt": "No {name} have been added using this device yet. You can add one by clicking the + button above.",
"caption": "Devices", "caption": "Devices",
"description": "Manage connected devices", "description": "Manage connected devices",
"device_info": "Device info", "device_info": "Device info",