mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 22:07:20 +00:00
Improve logo rendering for playing media in browser (#11741)
This commit is contained in:
parent
cf8e2a6d02
commit
dc2038916b
@ -15,7 +15,7 @@ export class BrowserMediaPlayer {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public hass: HomeAssistant,
|
public hass: HomeAssistant,
|
||||||
private item: MediaPlayerItem,
|
public item: MediaPlayerItem,
|
||||||
private onChange: () => void
|
private onChange: () => void
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import {
|
|||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit";
|
} from "lit";
|
||||||
import { customElement, property, query, state } from "lit/decorators";
|
import { customElement, property, query, state } from "lit/decorators";
|
||||||
|
import { classMap } from "lit/directives/class-map";
|
||||||
import { fireEvent } from "../../common/dom/fire_event";
|
import { fireEvent } from "../../common/dom/fire_event";
|
||||||
import { computeDomain } from "../../common/entity/compute_domain";
|
import { computeDomain } from "../../common/entity/compute_domain";
|
||||||
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
import { computeStateDomain } from "../../common/entity/compute_state_domain";
|
||||||
@ -164,7 +165,11 @@ class BarMediaPlayer extends LitElement {
|
|||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div
|
<div
|
||||||
class="info ${!isBrowser ? "pointer" : ""}"
|
class=${classMap({
|
||||||
|
info: true,
|
||||||
|
pointer: !isBrowser,
|
||||||
|
app: this._browserPlayer?.item.media_class === "app",
|
||||||
|
})}
|
||||||
@click=${this._openMoreInfo}
|
@click=${this._openMoreInfo}
|
||||||
>
|
>
|
||||||
${mediaArt ? html`<img src=${this.hass.hassUrl(mediaArt)} />` : ""}
|
${mediaArt ? html`<img src=${this.hass.hassUrl(mediaArt)} />` : ""}
|
||||||
@ -498,6 +503,11 @@ class BarMediaPlayer extends LitElement {
|
|||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app img {
|
||||||
|
max-height: 68px;
|
||||||
|
margin: 16px 0 16px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
ha-button-menu mwc-button {
|
ha-button-menu mwc-button {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user