@@ -29,31 +29,35 @@ class HassSubpage extends LitElement {
2929 protected render ( ) : TemplateResult {
3030 return html `
3131 <div class= "toolbar" >
32- ${ this . mainPage || history . state ?. root
33- ? html `
34- <ha- menu- butto n
35- .hassio = ${ this . supervisor }
36- .hass = ${ this . hass }
37- .narrow = ${ this . narrow }
38- > </ ha- menu- butto n>
39- `
40- : this . backPath
32+ <div class= "toolbar-content" >
33+ ${ this . mainPage || history . state ?. root
4134 ? html `
42- <a href= ${ this . backPath } >
35+ <ha- menu- butto n
36+ .hassio = ${ this . supervisor }
37+ .hass = ${ this . hass }
38+ .narrow = ${ this . narrow }
39+ > </ ha- menu- butto n>
40+ `
41+ : this . backPath
42+ ? html `
43+ <a href= ${ this . backPath } >
44+ <ha- icon- butto n- arrow- prev
45+ .hass = ${ this . hass }
46+ > </ ha- icon- butto n- arrow- prev>
47+ </ a>
48+ `
49+ : html `
4350 <ha- icon- butto n- arrow- prev
4451 .hass = ${ this . hass }
52+ @click = ${ this . _backTapped }
4553 > </ ha- icon- butto n- arrow- prev>
46- </ a>
47- `
48- : html `
49- <ha- icon- butto n- arrow- prev
50- .hass = ${ this . hass }
51- @click = ${ this . _backTapped }
52- > </ ha- icon- butto n- arrow- prev>
53- ` }
54+ ` }
5455
55- <div class= "main-title" > <slot name= "header" > ${ this . header } </ slot> </ div>
56- <slot name= "toolbar-icon" > </ slot>
56+ <div class= "main-title" >
57+ <slot name= "header" > ${ this . header } </ slot>
58+ </ div>
59+ <slot name= "toolbar-icon" > </ slot>
60+ </ div>
5761 </ div>
5862 <div class= "content ha-scrollbar" @scroll = ${ this . _saveScrollPos } >
5963 <slot> </ slot>
@@ -95,23 +99,28 @@ class HassSubpage extends LitElement {
9599 }
96100
97101 .toolbar {
102+ padding-top : var (--safe-area-inset-top );
103+ padding-right : var (--safe-area-inset-right );
104+ padding-left : var (--safe-area-inset-left );
105+ background-color : var (--app-header-background-color );
106+ border-bottom : var (--app-header-border-bottom , none);
107+ box-sizing : border-box;
108+ }
109+
110+ .toolbar-content {
98111 display : flex;
99112 align-items : center;
100113 font-size : var (--ha-font-size-xl );
101- height : var (--header-height );
102114 padding : 8px 12px ;
103- background-color : var (--app-header-background-color );
104115 font-weight : var (--ha-font-weight-normal );
105116 color : var (--app-header-text-color , white);
106- border-bottom : var (--app-header-border-bottom , none);
107- box-sizing : border-box;
108117 }
109118 @media (max-width : 599px ) {
110- .toolbar {
119+ .toolbar-content {
111120 padding : 4px ;
112121 }
113122 }
114- .toolbar a {
123+ .toolbar-content a {
115124 color : var (--sidebar-text-color );
116125 text-decoration : none;
117126 }
@@ -140,7 +149,9 @@ class HassSubpage extends LitElement {
140149 .content {
141150 position : relative;
142151 width : 100% ;
143- height : calc (100% - 1px - var (--header-height ));
152+ height : calc (
153+ 100% - 1px - var (--header-height ) - var (--safe-area-inset-top , 0px )
154+ );
144155 overflow-y : auto;
145156 overflow : auto;
146157 -webkit-overflow-scrolling : touch;
0 commit comments