Skip to content

Commit

Permalink
Tweak browser-player card icons
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Nov 2, 2021
1 parent 604a345 commit a0a50d7
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions js/browser-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ Promise.race(bases).then(() => {
return {};
}

setConfig(config) {
async setConfig(config) {
this._config = config;
while (!window.browser_mod) {
await new Promise((resolve) => setTimeout(resolve, 1000));
}
for (const event of [
"play",
"pause",
Expand Down Expand Up @@ -72,11 +75,10 @@ Promise.race(bases).then(() => {
return html`
<ha-card>
<div class="card-content">
<ha-icon-button
.icon=${player.muted ? "mdi:volume-off" : "mdi:volume-high"}
@click=${this.handleMute}
>
<ha-icon .icon=${player.muted ? "mdi:volume-off" : "mdi:volume-high"}></ha-icon>
<ha-icon-button @click=${this.handleMute}>
<ha-icon
.icon=${player.muted ? "mdi:volume-off" : "mdi:volume-high"}
></ha-icon>
</ha-icon-button>
<ha-slider
min="0"
Expand All @@ -90,18 +92,13 @@ Promise.race(bases).then(() => {
${window.browser_mod.player_state === "stopped"
? html`<div class="placeholder"></div>`
: html`
<ha-icon-button
.icon=${player.paused ? "mdi:play" : "mdi:pause"}
@click=${this.handlePlayPause}
highlight
>
<ha-icon .icon=${player.paused ? "mdi:play" : "mdi:pause"}></ha-icon>
<ha-icon-button @click=${this.handlePlayPause} highlight>
<ha-icon
.icon=${player.paused ? "mdi:play" : "mdi:pause"}
></ha-icon>
</ha-icon-button>
`}
<ha-icon-button
.icon=${"mdi:cog"}
@click=${this.handleMoreInfo}
>
<ha-icon-button @click=${this.handleMoreInfo}>
<ha-icon .icon=${"mdi:cog"}></ha-icon>
</ha-icon-button>
</div>
Expand Down Expand Up @@ -133,6 +130,9 @@ Promise.race(bases).then(() => {
-moz-user-select: all;
-ms-user-select: all;
}
ha-icon-button ha-icon {
display: flex;
}
`;
}
}
Expand Down

0 comments on commit a0a50d7

Please sign in to comment.