mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Show browse media even if media player has no controls (#11843)
This commit is contained in:
parent
75e8e17073
commit
acfeea5c92
@ -50,42 +50,38 @@ class MoreInfoMediaPlayer extends LitElement {
|
|||||||
const controls = computeMediaControls(stateObj);
|
const controls = computeMediaControls(stateObj);
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
${!controls
|
<div class="controls">
|
||||||
? ""
|
<div class="basic-controls">
|
||||||
: html`
|
${controls!.map(
|
||||||
<div class="controls">
|
(control) => html`
|
||||||
<div class="basic-controls">
|
<ha-icon-button
|
||||||
${controls!.map(
|
action=${control.action}
|
||||||
(control) => html`
|
@click=${this._handleClick}
|
||||||
<ha-icon-button
|
.path=${control.icon}
|
||||||
action=${control.action}
|
.label=${this.hass.localize(
|
||||||
@click=${this._handleClick}
|
`ui.card.media_player.${control.action}`
|
||||||
.path=${control.icon}
|
|
||||||
.label=${this.hass.localize(
|
|
||||||
`ui.card.media_player.${control.action}`
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
</ha-icon-button>
|
|
||||||
`
|
|
||||||
)}
|
)}
|
||||||
</div>
|
>
|
||||||
${supportsFeature(stateObj, SUPPORT_BROWSE_MEDIA)
|
</ha-icon-button>
|
||||||
? html`
|
`
|
||||||
<mwc-button
|
)}
|
||||||
.label=${this.hass.localize(
|
</div>
|
||||||
"ui.card.media_player.browse_media"
|
${supportsFeature(stateObj, SUPPORT_BROWSE_MEDIA)
|
||||||
)}
|
? html`
|
||||||
@click=${this._showBrowseMedia}
|
<mwc-button
|
||||||
>
|
.label=${this.hass.localize(
|
||||||
<ha-svg-icon
|
"ui.card.media_player.browse_media"
|
||||||
.path=${mdiPlayBoxMultiple}
|
)}
|
||||||
slot="icon"
|
@click=${this._showBrowseMedia}
|
||||||
></ha-svg-icon>
|
>
|
||||||
</mwc-button>
|
<ha-svg-icon
|
||||||
`
|
.path=${mdiPlayBoxMultiple}
|
||||||
: ""}
|
slot="icon"
|
||||||
</div>
|
></ha-svg-icon>
|
||||||
`}
|
</mwc-button>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
</div>
|
||||||
${(supportsFeature(stateObj, SUPPORT_VOLUME_SET) ||
|
${(supportsFeature(stateObj, SUPPORT_VOLUME_SET) ||
|
||||||
supportsFeature(stateObj, SUPPORT_VOLUME_BUTTONS)) &&
|
supportsFeature(stateObj, SUPPORT_VOLUME_BUTTONS)) &&
|
||||||
![UNAVAILABLE, UNKNOWN, "off"].includes(stateObj.state)
|
![UNAVAILABLE, UNKNOWN, "off"].includes(stateObj.state)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user