iantrich / roku-card

📺 Roku Remote Card
MIT License
118 stars 41 forks source link

Power button not aligning to center #71

Closed josrafafonlo closed 2 years ago

josrafafonlo commented 2 years ago

Checklist:

Release with the issue: 1.2.3 Last working release (if known):

Browser and Operating System: All/All

Description of problem: image

There's a bug wich causes power button to show to the right instead of centered Because on lines 194-197 of roku-card.js the power button is defined outside it's own <div class="row"> </div> I'm not sure if it was intended or not, but I like it more with the button centered, as shown in project's screenshots

The solution is to change:

${stateObj ? stateObj.attributes.app_name : ''}
${this._config.tv || (this._config.power && this._config.power.show) ? this._renderButton('power', 'mdi:power', 'Power') : ''}

For:

${t?t.attributes.app_name:""}
${this._config.tv||this._config.power&&this._config.power.show?this._renderButton("power","mdi:power","Power"):""}

Results (minus custom icons): 1636417138021

Hope this helps make this awesome integration better!