Fix media browser panel title + selection header color (#6807)

This commit is contained in:
Philip Allgaier 2020-09-06 22:17:34 +02:00 committed by GitHub
parent 509481ef06
commit cfa0c45213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 27 deletions

View File

@ -13,6 +13,7 @@ import { fireEvent } from "../../common/dom/fire_event";
import { createCloseHeading } from "../../components/ha-dialog"; import { createCloseHeading } from "../../components/ha-dialog";
import { BROWSER_SOURCE } from "../../data/media-player"; import { BROWSER_SOURCE } from "../../data/media-player";
import type { HomeAssistant } from "../../types"; import type { HomeAssistant } from "../../types";
import { haStyleDialog } from "../../resources/styles";
import type { SelectMediaPlayerDialogParams } from "./show-select-media-source-dialog"; import type { SelectMediaPlayerDialogParams } from "./show-select-media-source-dialog";
@customElement("hui-dialog-select-media-player") @customElement("hui-dialog-select-media-player")
@ -74,15 +75,18 @@ export class HuiDialogSelectMediaPlayer extends LitElement {
this.closeDialog(); this.closeDialog();
} }
static get styles(): CSSResult { static get styles(): CSSResult[] {
return css` return [
ha-dialog { haStyleDialog,
--dialog-content-padding: 0 24px 20px; css`
} ha-dialog {
paper-item { --dialog-content-padding: 0 24px 20px;
cursor: pointer; }
} paper-item {
`; cursor: pointer;
}
`,
];
} }
} }

View File

@ -11,6 +11,7 @@ import { fireEvent } from "../../common/dom/fire_event";
import { createCloseHeading } from "../../components/ha-dialog"; import { createCloseHeading } from "../../components/ha-dialog";
import "../../components/ha-hls-player"; import "../../components/ha-hls-player";
import type { HomeAssistant } from "../../types"; import type { HomeAssistant } from "../../types";
import { haStyleDialog } from "../../resources/styles";
import { WebBrowserPlayMediaDialogParams } from "./show-media-player-dialog"; import { WebBrowserPlayMediaDialogParams } from "./show-media-player-dialog";
@customElement("hui-dialog-web-browser-play-media") @customElement("hui-dialog-web-browser-play-media")
@ -92,26 +93,25 @@ export class HuiDialogWebBrowserPlayMedia extends LitElement {
`; `;
} }
static get styles(): CSSResult { static get styles(): CSSResult[] {
return css` return [
ha-dialog { haStyleDialog,
--mdc-dialog-heading-ink-color: var(--primary-text-color); css`
} @media (min-width: 800px) {
ha-dialog {
@media (min-width: 800px) { --mdc-dialog-max-width: 800px;
ha-dialog { --mdc-dialog-min-width: 400px;
--mdc-dialog-max-width: 800px; }
--mdc-dialog-min-width: 400px;
} }
}
video, video,
audio, audio,
img { img {
outline: none; outline: none;
width: 100%; width: 100%;
} }
`; `,
];
} }
} }

View File

@ -9,6 +9,7 @@
"mailbox": "Mailbox", "mailbox": "Mailbox",
"shopping_list": "Shopping list", "shopping_list": "Shopping list",
"developer_tools": "Developer Tools", "developer_tools": "Developer Tools",
"media_browser": "Media Browser",
"profile": "Profile" "profile": "Profile"
}, },
"state": { "state": {