diff --git a/src/panels/config/areas/dialog-areas-floors-order.ts b/src/panels/config/areas/dialog-areas-floors-order.ts index f96e8687c4..bde1ab6c22 100644 --- a/src/panels/config/areas/dialog-areas-floors-order.ts +++ b/src/panels/config/areas/dialog-areas-floors-order.ts @@ -81,8 +81,11 @@ class DialogAreasFloorsOrder extends LitElement { return nothing; } + const hasFloors = this._hierarchy.floors.length > 0; const dialogTitle = this.hass.localize( - "ui.panel.config.areas.dialog.reorder_title" + hasFloors + ? "ui.panel.config.areas.dialog.reorder_floors_areas_title" + : "ui.panel.config.areas.dialog.reorder_areas_title" ); return html` @@ -418,7 +421,6 @@ class DialogAreasFloorsOrder extends LitElement { } .floor.unassigned { - border-style: dashed; margin-top: 16px; } diff --git a/src/panels/config/areas/ha-config-areas-dashboard.ts b/src/panels/config/areas/ha-config-areas-dashboard.ts index ae1cd10a6a..8824412809 100644 --- a/src/panels/config/areas/ha-config-areas-dashboard.ts +++ b/src/panels/config/areas/ha-config-areas-dashboard.ts @@ -175,21 +175,12 @@ export class HaConfigAreasDashboard extends LitElement { .route=${this.route} has-fab > - - - - - ${this.hass.localize("ui.panel.config.areas.picker.reorder")} - - - - ${this.hass.localize("ui.common.help")} - - +
${this._hierarchy.floors.map(({ areas, id }) => { @@ -213,6 +204,16 @@ export class HaConfigAreasDashboard extends LitElement { slot="trigger" .path=${mdiDotsVertical} > + ${this.hass.localize( + "ui.panel.config.areas.picker.reorder" + )} +
  • ${this.hass.localize( - "ui.panel.config.areas.picker.other_areas" + this._hierarchy.floors.length + ? "ui.panel.config.areas.picker.other_areas" + : "ui.panel.config.areas.picker.header" )}

    +
    + + + ${this.hass.localize( + "ui.panel.config.areas.picker.reorder" + )} + +
    ) { + if (ev.detail.index === 0) { + this._showReorderDialog(); + } + } + private _createFloor() { this._openFloorDialog(); } diff --git a/src/translations/en.json b/src/translations/en.json index 6f7346652d..1c10ecca34 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -2475,10 +2475,11 @@ "area_reorder_failed": "Failed to reorder areas", "area_move_failed": "Failed to move area", "floor_reorder_failed": "Failed to reorder floors", - "reorder": "Reorder floors and areas" + "reorder": "Reorder" }, "dialog": { - "reorder_title": "Reorder floors and areas", + "reorder_areas_title": "Reorder areas", + "reorder_floors_areas_title": "Reorder floors and areas", "other_areas": "Other areas", "reorder_failed": "Failed to save order", "empty_floor": "No areas on this floor",