mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Add warning to badge preview in "Panel Mode" (#7331)
This commit is contained in:
parent
0df9080bbb
commit
0d741b6275
@ -117,6 +117,15 @@ export class HuiDialogEditView extends LitElement {
|
|||||||
content = html`
|
content = html`
|
||||||
${this._badges?.length
|
${this._badges?.length
|
||||||
? html`
|
? html`
|
||||||
|
${this._config?.panel
|
||||||
|
? html`
|
||||||
|
<p class="warning">
|
||||||
|
${this.hass!.localize(
|
||||||
|
"ui.panel.lovelace.editor.edit_badges.panel_mode"
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
<div class="preview-badges">
|
<div class="preview-badges">
|
||||||
${this._badges.map((badgeConfig) => {
|
${this._badges.map((badgeConfig) => {
|
||||||
return html`
|
return html`
|
||||||
@ -411,6 +420,10 @@ export class HuiDialogEditView extends LitElement {
|
|||||||
margin: 12px 16px;
|
margin: 12px 16px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
.warning {
|
||||||
|
color: var(--warning-color);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (min-width: 600px) {
|
@media all and (min-width: 600px) {
|
||||||
ha-dialog {
|
ha-dialog {
|
||||||
|
@ -2292,6 +2292,9 @@
|
|||||||
"select_users": "Select which users should see this view in the navigation"
|
"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": {
|
"edit_card": {
|
||||||
"header": "Card Configuration",
|
"header": "Card Configuration",
|
||||||
"typed_header": "{type} Card Configuration",
|
"typed_header": "{type} Card Configuration",
|
||||||
@ -2564,7 +2567,7 @@
|
|||||||
"view": {
|
"view": {
|
||||||
"panel_mode": {
|
"panel_mode": {
|
||||||
"title": "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."
|
"warning_multiple_cards": "This view contains more than one card, but a panel view can only show 1 card."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user