mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-19 18:28:42 +00:00
Media players can support turn off without turn on (#148)
This commit is contained in:
committed by
Paulus Schoutsen
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) {
|
||||
|
||||
Reference in New Issue
Block a user