mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 01:36:49 +00:00
Fix panel view and backgrounds (#7181)
This commit is contained in:
parent
4289ff6652
commit
ec920093d4
@ -45,6 +45,8 @@ const showMediaPlayer = () => {
|
||||
style.innerHTML = `
|
||||
body {
|
||||
--logo-image: url('https://www.home-assistant.io/images/home-assistant-logo.svg');
|
||||
--logo-repeat: no-repeat;
|
||||
--playback-logo-image: url('https://www.home-assistant.io/images/home-assistant-logo.svg');
|
||||
--theme-hue: 200;
|
||||
--progress-color: #03a9f4;
|
||||
--splash-image: url('https://home-assistant.io/images/cast/splash.png');
|
||||
|
@ -137,9 +137,9 @@ export class MasonryView extends LitElement implements LovelaceViewElement {
|
||||
| undefined;
|
||||
|
||||
if (
|
||||
(changedProperties.has("lovelace") && (
|
||||
oldLovelace?.config !== this.lovelace?.config ||
|
||||
oldLovelace?.editMode !== this.lovelace?.editMode)) ||
|
||||
(changedProperties.has("lovelace") &&
|
||||
(oldLovelace?.config !== this.lovelace?.config ||
|
||||
oldLovelace?.editMode !== this.lovelace?.editMode)) ||
|
||||
changedProperties.has("_columns")
|
||||
) {
|
||||
this._createColumns();
|
||||
@ -258,6 +258,12 @@ export class MasonryView extends LitElement implements LovelaceViewElement {
|
||||
|
||||
static get styles(): CSSResult {
|
||||
return css`
|
||||
:host {
|
||||
display: block;
|
||||
background: var(--lovelace-background);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#badges {
|
||||
margin: 8px 16px;
|
||||
font-size: 85%;
|
||||
|
@ -40,11 +40,6 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
||||
| HuiWarning
|
||||
| HuiCardOptions;
|
||||
|
||||
public constructor() {
|
||||
super();
|
||||
this.style.setProperty("background", "var(--lovelace-background)");
|
||||
}
|
||||
|
||||
public setConfig(_config: LovelaceViewConfig): void {}
|
||||
|
||||
protected updated(changedProperties: PropertyValues): void {
|
||||
@ -108,6 +103,7 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
||||
|
||||
if (!this.lovelace?.editMode) {
|
||||
this._card = card;
|
||||
return;
|
||||
}
|
||||
|
||||
const wrapper = document.createElement("hui-card-options");
|
||||
@ -133,6 +129,12 @@ export class PanelView extends LitElement implements LovelaceViewElement {
|
||||
|
||||
static get styles(): CSSResult {
|
||||
return css`
|
||||
:host {
|
||||
display: block;
|
||||
background: var(--lovelace-background);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
mwc-fab {
|
||||
position: sticky;
|
||||
float: right;
|
||||
|
Loading…
x
Reference in New Issue
Block a user