Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/panels/lovelace/editor/view-editor/hui-dialog-edit-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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."
}
},
Expand Down