mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Media players can support turn off without turn on (#148)
This commit is contained in:
parent
d2ff6a18e1
commit
ab187a7a84
@ -151,7 +151,7 @@
|
||||
<paper-icon-button
|
||||
icon='mdi:power'
|
||||
on-tap='handleTogglePower'
|
||||
invisible$='[[!playerObj.supportsTurnOff]]'
|
||||
invisible$='[[computeHidePowerButton(playerObj)]]'
|
||||
class='self-center secondary'
|
||||
></paper-icon-button>
|
||||
|
||||
@ -246,8 +246,8 @@ Polymer({
|
||||
return cls;
|
||||
},
|
||||
|
||||
computeHidePowerOnButton: function (playerObj) {
|
||||
return !playerObj.isOff || !playerObj.supportsTurnOn;
|
||||
computeHidePowerButton: function (playerObj) {
|
||||
return playerObj.isOff ? !playerObj.supportsTurnOn : !playerObj.supportsTurnOff;
|
||||
},
|
||||
|
||||
computePlayerObj: function (stateObj) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user