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