mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 19:56:42 +00:00
Show card positions in edit dashboard mode (#17055)
This commit is contained in:
parent
5ac9a6c9cc
commit
8945650b62
@ -81,6 +81,18 @@ export class HuiCardOptions extends LitElement {
|
|||||||
.length ===
|
.length ===
|
||||||
this.path![1] + 1}
|
this.path![1] + 1}
|
||||||
></ha-icon-button>
|
></ha-icon-button>
|
||||||
|
<div class="position-badge">
|
||||||
|
${this.path![1] + 1}
|
||||||
|
<simple-tooltip
|
||||||
|
>${this.hass!.localize(
|
||||||
|
"ui.panel.lovelace.editor.edit_card.position",
|
||||||
|
"position",
|
||||||
|
`${this.path![1] + 1}`,
|
||||||
|
"total",
|
||||||
|
`${this.lovelace!.config.views[this.path![0]].cards!.length}`
|
||||||
|
)}</simple-tooltip
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
.label=${this.hass!.localize(
|
.label=${this.hass!.localize(
|
||||||
"ui.panel.lovelace.editor.edit_card.move_up"
|
"ui.panel.lovelace.editor.edit_card.move_up"
|
||||||
@ -155,6 +167,20 @@ export class HuiCardOptions extends LitElement {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.position-badge {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: bottom;
|
||||||
|
width: 48px;
|
||||||
|
line-height: 48px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 50%;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1.25em;
|
||||||
|
background-color: var(--divider-color);
|
||||||
|
text-align: center;
|
||||||
|
color: var(--text-accent-color, var(--text-primary-color));
|
||||||
|
}
|
||||||
|
|
||||||
ha-icon-button {
|
ha-icon-button {
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
}
|
}
|
||||||
|
@ -4476,6 +4476,7 @@
|
|||||||
"move_down": "Move card down",
|
"move_down": "Move card down",
|
||||||
"move_before": "Move card before",
|
"move_before": "Move card before",
|
||||||
"move_after": "Move card after",
|
"move_after": "Move card after",
|
||||||
|
"position": "Card is in position {position} of {total}",
|
||||||
"options": "More options",
|
"options": "More options",
|
||||||
"search_cards": "Search cards"
|
"search_cards": "Search cards"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user