This repository has been archived on 2026-04-30. You can view files and clone it, but cannot push or open issues or pull requests.
huegasm/web/app/pods/components/bridge-finder/template.hbs
2017-12-09 19:32:12 -08:00

81 lines
No EOL
4.4 KiB
Handlebars

{{#unless bridgeUsername}}
{{#if bridgeIp}}
{{#unless bridgeConnectError}}
<svg version="1.2" baseProfile="tiny" id="press-bridge-button-img" x="0px" y="0px" viewBox="0 0 345.5 335.5" xml:space="preserve">
<path style=" fill: white; stroke: black;" d="M164.7,288.7c8.3-21.9,40.4-18.1,40.4-18.1l-56.2-88.5c-16.7-0.6-30-14.3-30-31.1c0-17.2,13.9-31.2,31.2-31.2
c17.2,0,31.2,13.9,31.2,31.2c0,5.2-1.3,10.1-3.5,14.4c3.6,5.8,10.6,17.1,18.1,29.3l6,9.8c-7.2-11.8-0.9-20.7,5.3-23.3
c14-9.1,21.4,5.1,21.4,5.1l5.3,8.7c-5.3-8.7-4.8-16.3,2.8-20.7c0,0,4.8-3.4,9.4-2.7c5.1,0.8,11.8,6.2,19.6,19.7
c0.3,0.6,0.6,1.1,0.9,1.6c-2.4-5.9-6-19.8,6.4-25.9c12.2-5.2,18.8,3.1,18.8,3.1s2.2,3.2,5.6,8.4c1.8-9.3,2.7-18.8,2.7-28.6
C300,67.1,232.8,0,150,0C67.1,0,0,67.1,0,150s67.1,150,150,150c4.6,0,9.1-0.2,13.6-0.6C162.2,295.5,163.5,290.9,164.7,288.7z
M150,66.6c6.5,0,11.8,5.3,11.8,11.8c0,6.5-5.3,11.8-11.8,11.8c-6.5,0-11.8-5.3-11.8-11.8C138.2,71.9,143.5,66.6,150,66.6z
M79.7,161.8c-6.5,0-11.8-5.3-11.8-11.8c0-6.5,5.3-11.8,11.8-11.8c6.5,0,11.8,5.3,11.8,11.8C91.5,156.5,86.2,161.8,79.7,161.8z
M98.3,110c-6.5,0-11.8-5.3-11.8-11.8c0-6.5,5.3-11.8,11.8-11.8c6.5,0,11.8,5.3,11.8,11.8C110.1,104.7,104.8,110,98.3,110z"
/>
<path style=" fill: white; stroke: #8089ff; stroke-width: 5px;" d="M150.8,154.6c10.6-6.4,16.8-2.8,20.4,1.2c0.3-1.5,0.5-3.1,0.5-4.7c0-12-9.7-21.8-21.8-21.8c-12,0-21.8,9.7-21.8,21.8
c0,9.7,6.4,17.9,15.1,20.7C141.8,166.6,142.2,159.8,150.8,154.6z" />
<path style=" fill: white; " stroke="#000000" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"
d="
M265.5,191.4c8.9,15.5-12.7-14.5,7.2-24.3c12.2-5.2,18.8,3.1,18.8,3.1s34.7,51.1,47.6,79.2c9.6,35.8-7,57.4-32.7,74
c-25.7,16.6-46,6.2-65.4-4.8c-19.4-11-47-13.6-64.2-12.8c-17.2,0.8-14.5-12.8-12.2-17.1c8.3-21.9,40.4-18.1,40.4-18.1L147.6,180
c0,0-12.9-15.6,3.2-25.4c16.1-9.7,22.2,3.7,24.3,6.6c0.9,1.3,10.2,16.4,20.6,33.3l6,9.8c-7.2-11.8-0.9-20.7,5.3-23.3
c14-9.1,21.4,5.1,21.4,5.1l5.3,8.7c-5.3-8.7-4.8-16.3,2.8-20.7c0,0,4.8-3.4,9.4-2.7C251,172.4,257.8,177.8,265.5,191.4z"
/>
<line fill="none" stroke="#000000" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"
x1="266.9" y1="194.1" x2="278.3" y2="213.9" />
<line fill="none" stroke="#000000" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"
x1="233.1" y1="194.1" x2="252.9" y2="227" />
<line fill="none" stroke="#000000" stroke-width="7" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10"
x1="200.6" y1="203" x2="226" y2="241.6" />
</svg>
{{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}}
{{/unless}}
{{#if isAuthenticating}}
<p>
Your bridge IP is <b>{{bridgeIp}}</b>
<br> Press the button on your bridge to authenticate Huegasm.
</p>
{{else}}
{{#if bridgeConnectError}}
{{bridgeConnectMessage}}
{{else}}
<p>You failed to press the button in time. <a class="no-text-decoration" href="#" {{action 'retry'}}>RETRY</a></p>
{{/if}}
{{/if}}
{{else}}
{{#unless bridgeFindStatus}}
{{paper-progress-circular diameter=100}}
<p>Trying to find your bridge's IP.</p>
{{/unless}}
{{#if bridgeFindMultiple}}
<p>Multiple Hue bridge were found on your network. <br> Please select the one you want to use for Huegasm.</p>
<div id="bridge-button-group">
{{#each multipleBridgeIps as |bridge|}}
{{paper-radio value=bridge label=bridge onChange=(action "chooseBridge")}}
{{/each}}
</div>
{{else}}
{{#if bridgeFindFail}}
<p>A hue bridge could not be automatically found on your network. <br> Enter one manually? <br>(or type <b>offline</b> to look around)
</p>
<span id="bridge-input">
{{paper-input label="Hue bridge IP address" value=manualBridgeIp onChange=(action (mut manualBridgeIp))}}
<div>
{{paper-button onClick=(action "findBridgeByIp") raised=true primary=true label="Find"}}
</div>
</span>
{{#if manualBridgeIpNotFound}}
<p class="bg-danger">
Could not find a bridge with that IP address.
</p>
{{/if}}
{{/if}}
{{/if}}
{{/if}}
{{/unless}}