error message for internet edge and other browsers that block CORS POSTs
This commit is contained in:
parent
bcb5c0ad8f
commit
3abc5990f5
2 changed files with 17 additions and 6 deletions
|
|
@ -23,6 +23,7 @@ export default Em.Component.extend({
|
|||
manualBridgeIp: null,
|
||||
manualBridgeIpNotFound: false,
|
||||
multipleBridgeIps: [],
|
||||
error: false,
|
||||
|
||||
actions: {
|
||||
retry(){
|
||||
|
|
@ -126,6 +127,9 @@ export default Em.Component.extend({
|
|||
}
|
||||
|
||||
this.set('bridgeAuthenticateReachedStatus', status);
|
||||
}).fail(()=>{
|
||||
this.clearBridgePingIntervalHandle();
|
||||
this.set('error', true);
|
||||
});
|
||||
|
||||
this.incrementProperty('bridgeUserNamePingIntervalProgress', this.get('bridgeUsernamePingIntervalTime')/bridgeUsernamePingMaxTime*100);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,20 @@
|
|||
<div class="title">Huegasm</div>
|
||||
{{#unless bridgeUsername}}
|
||||
{{#if bridgeIp}}
|
||||
<img src="assets/images/pressButtonBridge.png" id="pressButtonBridgeImg">
|
||||
{{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}}
|
||||
{{#if isAuthenticating}}
|
||||
<p>Your bridge IP is <b>{{bridgeIp}}</b> <br>
|
||||
Press the button on your bridge to authenticate this application.</p>
|
||||
{{#if error}}
|
||||
<p>Huegasm encountered a critical error while trying to connect to your bridge.<br><br>
|
||||
This likely happened because you're using an outdated browser and/or because your browser does not support <a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing">CORS</a>. Feel free to contact me through the link at the bottom of the page if you feel like this is not the case.<br>
|
||||
For the best browsing experience on this site ( and every other one known to man ) please switch to <a href="https://www.google.com/chrome/">Google Chrome</a> or <a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a></p>.
|
||||
{{else}}
|
||||
<p>You failed to press the button. <a class="noTextDecoration" href="#" {{action 'retry'}}>RETRY</a></p>
|
||||
<img src="assets/images/pressButtonBridge.png" id="pressButtonBridgeImg">
|
||||
{{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}}
|
||||
|
||||
{{#if isAuthenticating}}
|
||||
<p>Your bridge IP is <b>{{bridgeIp}}</b> <br>
|
||||
Press the button on your bridge to authenticate this application.</p>
|
||||
{{else}}
|
||||
<p>You failed to press the button. <a class="noTextDecoration" href="#" {{action 'retry'}}>RETRY</a></p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{#unless bridgeFindStatus}}
|
||||
|
|
|
|||
Reference in a new issue