Add warning to badge preview in "Panel Mode" (#7331)

This commit is contained in:
Philip Allgaier 2020-10-13 13:49:02 +02:00 committed by GitHub
parent 0df9080bbb
commit 0d741b6275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -117,6 +117,15 @@ export class HuiDialogEditView extends LitElement {
content = html`
${this._badges?.length
? html`
${this._config?.panel
? html`
<p class="warning">
${this.hass!.localize(
"ui.panel.lovelace.editor.edit_badges.panel_mode"
)}
</p>
`
: ""}
<div class="preview-badges">
${this._badges.map((badgeConfig) => {
return html`
@ -411,6 +420,10 @@ export class HuiDialogEditView extends LitElement {
margin: 12px 16px;
flex-wrap: wrap;
}
.warning {
color: var(--warning-color);
text-align: center;
}
@media all and (min-width: 600px) {
ha-dialog {

View File

@ -2292,6 +2292,9 @@
"select_users": "Select which users should see this view in the navigation"
}
},
"edit_badges": {
"panel_mode": "These badges will not be displayed because this view is in \"Panel Mode\"."
},
"edit_card": {
"header": "Card Configuration",
"typed_header": "{type} Card Configuration",
@ -2564,7 +2567,7 @@
"view": {
"panel_mode": {
"title": "Panel Mode?",
"description": "This renders the first card at full width; other cards in this view will not be rendered.",
"description": "This renders the first card at full width. Other cards in this view as well as badges will not be rendered.",
"warning_multiple_cards": "This view contains more than one card, but a panel view can only show 1 card."
}
},