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

View File

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