mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Add edit button to areas in area dashboard + color add floor fab (#20339)
This commit is contained in:
parent
41fdf31e34
commit
5b86b1277f
@ -271,7 +271,14 @@ export class HaConfigAreasDashboard extends SubscribeMixin(LitElement) {
|
||||
? html`<ha-icon .icon=${area.icon}></ha-icon>`
|
||||
: ""}
|
||||
</div>
|
||||
<h1 class="card-header">${area.name}</h1>
|
||||
<div class="card-header">
|
||||
${area.name}
|
||||
<ha-icon-button
|
||||
.area=${area}
|
||||
.path=${mdiPencil}
|
||||
@click=${this._openAreaDetails}
|
||||
></ha-icon-button>
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div>
|
||||
${formatListWithAnds(
|
||||
@ -305,6 +312,16 @@ export class HaConfigAreasDashboard extends SubscribeMixin(LitElement) {
|
||||
loadAreaRegistryDetailDialog();
|
||||
}
|
||||
|
||||
private _openAreaDetails(ev) {
|
||||
ev.preventDefault();
|
||||
const area = ev.currentTarget.area;
|
||||
showAreaRegistryDetailDialog(this, {
|
||||
entry: area,
|
||||
updateEntry: async (values) =>
|
||||
updateAreaRegistryEntry(this.hass!, area.area_id, values),
|
||||
});
|
||||
}
|
||||
|
||||
private async _areaMoved(ev) {
|
||||
const areasAndFloors = this._processAreas(
|
||||
this.hass.areas,
|
||||
@ -469,8 +486,10 @@ export class HaConfigAreasDashboard extends SubscribeMixin(LitElement) {
|
||||
min-height: 16px;
|
||||
color: var(--secondary-text-color);
|
||||
}
|
||||
.floor {
|
||||
--primary-color: var(--secondary-text-color);
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.warning {
|
||||
color: var(--error-color);
|
||||
|
Loading…
x
Reference in New Issue
Block a user