fix: retain Symcon webhook registration and show configured view title
This commit is contained in:
1 parent
8845efdc23
commit
510aece983
14 files changed
+145
-44
No files matched your search
@@ -372,13 +372,14 @@ export class NextFloorPanel extends LitElement {
|
||||
}
|
||||
|
||||
private renderHeader(building: Building | null) {
|
||||
const title = this.hass?.symconTitle?.trim() || "NextFloor";
|
||||
const saveState = this.data.saveState;
|
||||
const tab = (mode: Mode, label: string, extra = "") =>
|
||||
html`<button role="tab" class=${extra} aria-pressed=${this._mode === mode} @click=${() => this.setMode(mode)}>${label}</button>`;
|
||||
const saveLabel: Key = saveState === "saving" ? "saving" : saveState === "saved" ? "saved" : "save_error";
|
||||
return html`<header class="nf-header">
|
||||
<ha-menu-button .hass=${this.hass} .narrow=${this.narrow}></ha-menu-button>
|
||||
<h1>${NEXTFLOOR_MARK}NextFloor</h1>
|
||||
<h1 title=${title}>${NEXTFLOOR_MARK}<span class="nf-view-title">${title}</span></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}
|
||||
|
||||
Reference in new issue
Block a user