mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Card picker improvements (#6361)
This commit is contained in:
parent
51be916f39
commit
833ccf3637
@ -116,16 +116,16 @@ export class HuiCardPicker extends LitElement {
|
|||||||
@click=${this._cardPicked}
|
@click=${this._cardPicked}
|
||||||
.config=${{ type: "" }}
|
.config=${{ type: "" }}
|
||||||
>
|
>
|
||||||
<div class="preview description">
|
|
||||||
${this.hass!.localize(
|
|
||||||
`ui.panel.lovelace.editor.card.generic.manual_description`
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
${this.hass!.localize(
|
${this.hass!.localize(
|
||||||
`ui.panel.lovelace.editor.card.generic.manual`
|
`ui.panel.lovelace.editor.card.generic.manual`
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="preview description">
|
||||||
|
${this.hass!.localize(
|
||||||
|
`ui.panel.lovelace.editor.card.generic.manual_description`
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -255,6 +255,7 @@ export class HuiCardPicker extends LitElement {
|
|||||||
color: var(--ha-card-header-color, --primary-text-color);
|
color: var(--ha-card-header-color, --primary-text-color);
|
||||||
font-family: var(--ha-card-header-font-family, inherit);
|
font-family: var(--ha-card-header-font-family, inherit);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
letter-spacing: -0.012em;
|
letter-spacing: -0.012em;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
@ -265,7 +266,7 @@ export class HuiCardPicker extends LitElement {
|
|||||||
var(--paper-card-background-color, white)
|
var(--paper-card-background-color, white)
|
||||||
);
|
);
|
||||||
border-radius: 0 0 4px 4px;
|
border-radius: 0 0 4px 4px;
|
||||||
border-top: 1px solid var(--divider-color);
|
border-bottom: 1px solid var(--divider-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview {
|
.preview {
|
||||||
@ -377,6 +378,13 @@ export class HuiCardPicker extends LitElement {
|
|||||||
@click=${this._cardPicked}
|
@click=${this._cardPicked}
|
||||||
.config=${cardConfig}
|
.config=${cardConfig}
|
||||||
></div>
|
></div>
|
||||||
|
<div class="card-header">
|
||||||
|
${customCard
|
||||||
|
? `${this.hass!.localize(
|
||||||
|
"ui.panel.lovelace.editor.cardpicker.custom_card"
|
||||||
|
)}: ${customCard.name || customCard.type}`
|
||||||
|
: name}
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="preview ${classMap({
|
class="preview ${classMap({
|
||||||
description: !element || element.tagName === "HUI-ERROR-CARD",
|
description: !element || element.tagName === "HUI-ERROR-CARD",
|
||||||
@ -391,13 +399,6 @@ export class HuiCardPicker extends LitElement {
|
|||||||
)
|
)
|
||||||
: description}
|
: description}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-header">
|
|
||||||
${customCard
|
|
||||||
? `${this.hass!.localize(
|
|
||||||
"ui.panel.lovelace.editor.cardpicker.custom_card"
|
|
||||||
)}: ${customCard.name || customCard.type}`
|
|
||||||
: name}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user