Bumped version to 20220902.0

This commit is contained in:
Paulus Schoutsen 2022-09-02 16:14:53 -04:00
parent 031ecf5be8
commit 72aea57105
3 changed files with 36 additions and 4 deletions

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "home-assistant-frontend" name = "home-assistant-frontend"
version = "20220901.0" version = "20220902.0"
license = {text = "Apache-2.0"} license = {text = "Apache-2.0"}
description = "The Home Assistant frontend" description = "The Home Assistant frontend"
readme = "README.md" readme = "README.md"

View File

@ -15,6 +15,8 @@ class HassSubpage extends LitElement {
@property({ type: String, attribute: "back-path" }) public backPath?: string; @property({ type: String, attribute: "back-path" }) public backPath?: string;
@property() public backCallback?: () => void;
@property({ type: Boolean, reflect: true }) public narrow = false; @property({ type: Boolean, reflect: true }) public narrow = false;
@property({ type: Boolean }) public supervisor = false; @property({ type: Boolean }) public supervisor = false;
@ -52,6 +54,9 @@ class HassSubpage extends LitElement {
<slot name="toolbar-icon"></slot> <slot name="toolbar-icon"></slot>
</div> </div>
<div class="content" @scroll=${this._saveScrollPos}><slot></slot></div> <div class="content" @scroll=${this._saveScrollPos}><slot></slot></div>
<div id="fab">
<slot name="fab"></slot>
</div>
`; `;
} }
@ -61,6 +66,10 @@ class HassSubpage extends LitElement {
} }
private _backTapped(): void { private _backTapped(): void {
if (this.backCallback) {
this.backCallback();
return;
}
history.back(); history.back();
} }
@ -116,6 +125,29 @@ class HassSubpage extends LitElement {
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
#fab {
position: fixed;
right: calc(16px + env(safe-area-inset-right));
bottom: calc(16px + env(safe-area-inset-bottom));
z-index: 1;
}
:host([narrow]) #fab.tabs {
bottom: calc(84px + env(safe-area-inset-bottom));
}
#fab[is-wide] {
bottom: 24px;
right: 24px;
}
:host([rtl]) #fab {
right: auto;
left: calc(16px + env(safe-area-inset-left));
}
:host([rtl][is-wide]) #fab {
bottom: 24px;
left: 24px;
right: auto;
}
`; `;
} }
} }

View File

@ -51,7 +51,7 @@ import {
showPromptDialog, showPromptDialog,
} from "../../../dialogs/generic/show-dialog-box"; } from "../../../dialogs/generic/show-dialog-box";
import "../../../layouts/ha-app-layout"; import "../../../layouts/ha-app-layout";
import "../../../layouts/hass-tabs-subpage"; import "../../../layouts/hass-subpage";
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin"; import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
import { haStyle } from "../../../resources/styles"; import { haStyle } from "../../../resources/styles";
import { HomeAssistant, Route } from "../../../types"; import { HomeAssistant, Route } from "../../../types";
@ -113,7 +113,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
? this.hass.states[this._entityId] ? this.hass.states[this._entityId]
: undefined; : undefined;
return html` return html`
<hass-tabs-subpage <hass-subpage
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow} .narrow=${this.narrow}
.route=${this.route} .route=${this.route}
@ -336,7 +336,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
> >
<ha-svg-icon slot="icon" .path=${mdiContentSave}></ha-svg-icon> <ha-svg-icon slot="icon" .path=${mdiContentSave}></ha-svg-icon>
</ha-fab> </ha-fab>
</hass-tabs-subpage> </hass-subpage>
`; `;
} }