Skip to content

Commit 4477d2a

Browse files
committed
CSS fixes
1 parent aa2a267 commit 4477d2a

4 files changed

Lines changed: 47 additions & 6 deletions

File tree

src/panels/lovelace/editor/card-editor/hui-card-picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ export class HuiCardPicker extends LitElement {
519519
}
520520
521521
ha-input-search {
522-
padding: var(--ha-space-3) var(--ha-space-4) 0;
522+
padding: var(--ha-space-3) var(--ha-space-3) 0;
523523
position: sticky;
524524
top: 0;
525525
z-index: 10;

src/panels/lovelace/editor/card-editor/hui-dialog-create-card.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ export class HuiCreateDialogCard
178178
ha-dialog::part(body) {
179179
overflow: hidden;
180180
}
181+
ha-dialog-footer {
182+
border-top: 1px solid var(--divider-color);
183+
}
181184
182185
ha-tab-group-tab {
183186
flex: 1;

src/panels/lovelace/editor/card-editor/hui-suggestion-entity-tree.ts

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { mdiChevronDown, mdiChevronRight, mdiTextureBox } from "@mdi/js";
1+
import {
2+
mdiChevronDown,
3+
mdiChevronRight,
4+
mdiMagnify,
5+
mdiTextureBox,
6+
} from "@mdi/js";
27
import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
38
import { LitElement, css, html, nothing } from "lit";
49
import { customElement, property, state } from "lit/decorators";
@@ -199,7 +204,19 @@ export class HuiSuggestionEntityTree extends LitElement {
199204
);
200205
if (!results.length) {
201206
return html`
202-
<div class="empty">${this.hass.localize("ui.common.no_results")}</div>
207+
<div class="empty">
208+
<ha-svg-icon .path=${mdiMagnify}></ha-svg-icon>
209+
<h2>
210+
${this.hass.localize(
211+
"ui.panel.lovelace.editor.cardpicker.no_search_results_title"
212+
)}
213+
</h2>
214+
<p>
215+
${this.hass.localize(
216+
"ui.panel.lovelace.editor.cardpicker.no_search_results_description"
217+
)}
218+
</p>
219+
</div>
203220
`;
204221
}
205222
const rtl = computeRTL(
@@ -524,7 +541,8 @@ export class HuiSuggestionEntityTree extends LitElement {
524541
min-height: 0;
525542
}
526543
ha-input-search {
527-
padding: var(--ha-space-3) var(--ha-space-3) var(--ha-space-2);
544+
padding: var(--ha-space-3);
545+
border-bottom: 1px solid var(--divider-color);
528546
}
529547
.tree {
530548
flex: 1;
@@ -591,9 +609,27 @@ export class HuiSuggestionEntityTree extends LitElement {
591609
--state-icon-color: var(--primary-color);
592610
}
593611
.empty {
594-
padding: var(--ha-space-4);
595-
color: var(--ha-color-text-secondary);
612+
display: flex;
613+
flex-direction: column;
614+
align-items: center;
615+
justify-content: center;
616+
gap: var(--ha-space-2);
617+
padding: var(--ha-space-8) var(--ha-space-4);
596618
text-align: center;
619+
}
620+
.empty ha-svg-icon {
621+
--mdc-icon-size: 32px;
622+
color: var(--ha-color-text-secondary);
623+
}
624+
.empty h2 {
625+
margin: 0;
626+
font-size: var(--ha-font-size-l);
627+
font-weight: var(--ha-font-weight-medium);
628+
color: var(--primary-text-color);
629+
}
630+
.empty p {
631+
margin: 0;
632+
color: var(--ha-color-text-secondary);
597633
font-size: var(--ha-font-size-s);
598634
}
599635
`,

src/translations/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10282,6 +10282,8 @@
1028210282
"more_cards": "+{count} more",
1028310283
"content_empty_title": "Pick an entity to see suggestions",
1028410284
"content_empty_description": "Or browse all card types.",
10285+
"no_search_results_title": "No entity matches your search",
10286+
"no_search_results_description": "Try a different keyword.",
1028510287
"selected_entity": "Selected entity",
1028610288
"suggestions_title": "Suggestions",
1028710289
"not_found": "Can't find the card you want?",

0 commit comments

Comments
 (0)