mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 20:26:39 +00:00
Fix config dashboard scroll on desktop (#6242)
This commit is contained in:
parent
d55cb95479
commit
7395d19489
@ -26,7 +26,8 @@ import { mdiCloudLock } from "@mdi/js";
|
|||||||
class HaConfigDashboard extends LitElement {
|
class HaConfigDashboard extends LitElement {
|
||||||
@property() public hass!: HomeAssistant;
|
@property() public hass!: HomeAssistant;
|
||||||
|
|
||||||
@property() public narrow!: boolean;
|
@property({ type: Boolean, reflect: true })
|
||||||
|
public narrow!: boolean;
|
||||||
|
|
||||||
@property() public isWide!: boolean;
|
@property() public isWide!: boolean;
|
||||||
|
|
||||||
@ -35,18 +36,10 @@ class HaConfigDashboard extends LitElement {
|
|||||||
@property() public showAdvanced!: boolean;
|
@property() public showAdvanced!: boolean;
|
||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
const content = html` <ha-config-section
|
||||||
<app-header-layout has-scrolling-region>
|
|
||||||
<app-header fixed slot="header">
|
|
||||||
<app-toolbar>
|
|
||||||
<ha-menu-button
|
|
||||||
.hass=${this.hass}
|
|
||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
></ha-menu-button>
|
.isWide=${this.isWide}
|
||||||
</app-toolbar>
|
>
|
||||||
</app-header>
|
|
||||||
|
|
||||||
<ha-config-section .narrow=${this.narrow} .isWide=${this.isWide}>
|
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
${this.hass.localize("ui.panel.config.header")}
|
${this.hass.localize("ui.panel.config.header")}
|
||||||
</div>
|
</div>
|
||||||
@ -118,9 +111,7 @@ class HaConfigDashboard extends LitElement {
|
|||||||
${!this.showAdvanced
|
${!this.showAdvanced
|
||||||
? html`
|
? html`
|
||||||
<div class="promo-advanced">
|
<div class="promo-advanced">
|
||||||
${this.hass.localize(
|
${this.hass.localize("ui.panel.config.advanced_mode.hint_enable")}
|
||||||
"ui.panel.config.advanced_mode.hint_enable"
|
|
||||||
)}
|
|
||||||
<a href="/profile"
|
<a href="/profile"
|
||||||
>${this.hass.localize(
|
>${this.hass.localize(
|
||||||
"ui.panel.config.advanced_mode.link_profile_page"
|
"ui.panel.config.advanced_mode.link_profile_page"
|
||||||
@ -129,7 +120,24 @@ class HaConfigDashboard extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
</ha-config-section>
|
</ha-config-section>`;
|
||||||
|
|
||||||
|
if (!this.narrow) {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
return html`
|
||||||
|
<app-header-layout has-scrolling-region>
|
||||||
|
<app-header fixed slot="header">
|
||||||
|
<app-toolbar>
|
||||||
|
<ha-menu-button
|
||||||
|
.hass=${this.hass}
|
||||||
|
.narrow=${this.narrow}
|
||||||
|
></ha-menu-button>
|
||||||
|
</app-toolbar>
|
||||||
|
</app-header>
|
||||||
|
|
||||||
|
${content}
|
||||||
</app-header-layout>
|
</app-header-layout>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -145,6 +153,9 @@ class HaConfigDashboard extends LitElement {
|
|||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
ha-config-section {
|
ha-config-section {
|
||||||
|
margin-top: -12px;
|
||||||
|
}
|
||||||
|
:host([narrow]) ha-config-section {
|
||||||
margin-top: -20px;
|
margin-top: -20px;
|
||||||
}
|
}
|
||||||
ha-card {
|
ha-card {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user