mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 10:48:44 +00:00
Add hint to reorder areas and floors (#28189)
This commit is contained in:
@@ -84,6 +84,8 @@ export class HaConfigAreasDashboard extends LitElement {
|
|||||||
|
|
||||||
@property({ attribute: false }) public route!: Route;
|
@property({ attribute: false }) public route!: Route;
|
||||||
|
|
||||||
|
private _searchParms = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
@state() private _hierarchy?: AreasFloorHierarchy;
|
@state() private _hierarchy?: AreasFloorHierarchy;
|
||||||
|
|
||||||
private _blockHierarchyUpdate = false;
|
private _blockHierarchyUpdate = false;
|
||||||
@@ -167,7 +169,9 @@ export class HaConfigAreasDashboard extends LitElement {
|
|||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
.isWide=${this.isWide}
|
.isWide=${this.isWide}
|
||||||
back-path="/config"
|
.backPath=${this._searchParms.has("historyBack")
|
||||||
|
? undefined
|
||||||
|
: "/config"}
|
||||||
.tabs=${configSections.areas}
|
.tabs=${configSections.areas}
|
||||||
.route=${this.route}
|
.route=${this.route}
|
||||||
has-fab
|
has-fab
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { css, html, LitElement, nothing } from "lit";
|
|||||||
import { customElement, property, state } from "lit/decorators";
|
import { customElement, property, state } from "lit/decorators";
|
||||||
import { fireEvent } from "../../../common/dom/fire_event";
|
import { fireEvent } from "../../../common/dom/fire_event";
|
||||||
import "../../../components/entity/ha-entities-picker";
|
import "../../../components/entity/ha-entities-picker";
|
||||||
|
import "../../../components/ha-alert";
|
||||||
import "../../../components/ha-button";
|
import "../../../components/ha-button";
|
||||||
import "../../../components/ha-dialog-footer";
|
import "../../../components/ha-dialog-footer";
|
||||||
import "../../../components/ha-wa-dialog";
|
import "../../../components/ha-wa-dialog";
|
||||||
@@ -78,6 +79,16 @@ export class DialogEditHome
|
|||||||
@value-changed=${this._favoriteEntitiesChanged}
|
@value-changed=${this._favoriteEntitiesChanged}
|
||||||
></ha-entities-picker>
|
></ha-entities-picker>
|
||||||
|
|
||||||
|
<ha-alert alert-type="info">
|
||||||
|
${this.hass.localize("ui.panel.home.editor.areas_hint", {
|
||||||
|
areas_page: html`<a
|
||||||
|
href="/config/areas?historyBack=1"
|
||||||
|
@click=${this.closeDialog}
|
||||||
|
>${this.hass.localize("ui.panel.home.editor.areas_page")}</a
|
||||||
|
>`,
|
||||||
|
})}
|
||||||
|
</ha-alert>
|
||||||
|
|
||||||
<ha-dialog-footer slot="footer">
|
<ha-dialog-footer slot="footer">
|
||||||
<ha-button
|
<ha-button
|
||||||
appearance="plain"
|
appearance="plain"
|
||||||
@@ -140,6 +151,11 @@ export class DialogEditHome
|
|||||||
ha-entities-picker {
|
ha-entities-picker {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ha-alert {
|
||||||
|
display: block;
|
||||||
|
margin-top: var(--ha-space-4);
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2227,7 +2227,9 @@
|
|||||||
"title": "Edit home page",
|
"title": "Edit home page",
|
||||||
"description": "Configure your home page display preferences.",
|
"description": "Configure your home page display preferences.",
|
||||||
"favorite_entities_helper": "Display your favorite entities. Home Assistant will still suggest based on commonly used up to 8 slots.",
|
"favorite_entities_helper": "Display your favorite entities. Home Assistant will still suggest based on commonly used up to 8 slots.",
|
||||||
"save_failed": "Failed to save home page configuration"
|
"save_failed": "Failed to save home page configuration",
|
||||||
|
"areas_hint": "You can rearrange your floors and areas in the order that best represents your house on the {areas_page}.",
|
||||||
|
"areas_page": "areas page"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"my": {
|
"my": {
|
||||||
|
|||||||
Reference in New Issue
Block a user