feat: add room name switches to 3D view and editor toolbars
This commit is contained in:
1 parent
7a9b2c0a38
commit
3f6cca056c
13 files changed
+695
-585
No files matched your search
@@ -381,6 +381,7 @@ export class NextFloorPanel extends LitElement {
|
||||
<h1>${NEXTFLOOR_MARK}NextFloor</h1>
|
||||
${this.isAdmin ? html`<div class="nf-seg" role="tablist">${tab("view", this.t("view"))}${tab("editor", this.t("editor"))}${tab("extensions", `✦ ${this.t("ext_tab")}`, "nf-tab-ext")}</div>` : nothing}
|
||||
<span class="nf-grow"></span>
|
||||
${this._mode === "view" && building?.floors.some((f) => f.rooms.length) ? html`<button class="nf-chip nf-room-names-toggle" aria-pressed=${this._prefs.roomNames} title=${this.t("room_names_toggle_hint")} @click=${() => this.setPref("roomNames", !this._prefs.roomNames)}>${this.t("room_names_short")}</button>` : nothing}
|
||||
${this.isAdmin && this.hass.symconRefresh ? html`<button class="nf-btn nf-reload-variables" ?disabled=${this._variablesLoading} aria-busy=${this._variablesLoading} @click=${() => void this.reloadVariables()}>↻ ${this.t(this._variablesLoading ? "symcon_variables_loading" : "symcon_variables_reload")}</button>` : nothing}
|
||||
${this._mode === "view" && building?.floors.some((f) => f.rooms.length) ? this.renderViewOptions() : nothing}
|
||||
${this._mode === "editor" && saveState !== "idle" ? html`<span class="nf-save nf-save-${saveState}">${this.t(saveLabel)}</span>` : nothing}
|
||||
@@ -439,6 +440,8 @@ export class NextFloorPanel extends LitElement {
|
||||
.hass=${this.hass}
|
||||
.building=${building}
|
||||
.narrow=${this.narrow}
|
||||
.roomLabels=${this._prefs.roomNames}
|
||||
@room-names-change=${(e: CustomEvent<{ value: boolean }>) => this.setPref("roomNames", e.detail.value)}
|
||||
.packs=${this.data.packs}
|
||||
.loadCardEditor=${loadCardEditor}
|
||||
@packs-changed=${() => void this.data.reloadPacks()}
|
||||
|
||||
Reference in new issue
Block a user