From 7db49d310c320d97a6fcccb0a07a8adeab29676b Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 12 Feb 2017 11:48:58 -0800 Subject: [PATCH] removing error handling on bridge finding ( TODO ), minor styling improvements --- .../components/bridge-finder/component.js | 4 --- .../components/bridge-finder/template.hbs | 26 +++++++------------ web/app/styles/music-tab.scss | 26 ++++++++++++------- 3 files changed, 26 insertions(+), 30 deletions(-) diff --git a/web/app/pods/components/bridge-finder/component.js b/web/app/pods/components/bridge-finder/component.js index b6979b3..b3f8e5b 100644 --- a/web/app/pods/components/bridge-finder/component.js +++ b/web/app/pods/components/bridge-finder/component.js @@ -28,7 +28,6 @@ export default Component.extend({ manualBridgeIp: null, manualBridgeIpNotFound: false, multipleBridgeIps: [], - error: false, isAuthenticating: computed.notEmpty('bridgePingIntervalHandle'), // try to authenticate against the bridge here @@ -104,9 +103,6 @@ export default Component.extend({ this.set('bridgeUsername', result[0].success.username); } } - }).fail(()=>{ - this.clearBridgePingIntervalHandle(); - this.set('error', true); }); this.incrementProperty('bridgeUserNamePingIntervalProgress', this.get('bridgeUsernamePingIntervalTime')/bridgeUsernamePingMaxTime*100); diff --git a/web/app/pods/components/bridge-finder/template.hbs b/web/app/pods/components/bridge-finder/template.hbs index db671cd..8a44e3b 100644 --- a/web/app/pods/components/bridge-finder/template.hbs +++ b/web/app/pods/components/bridge-finder/template.hbs @@ -1,23 +1,17 @@
Huegasm
{{#unless bridgeUsername}} {{#if bridgeIp}} - {{#if error}} -

Huegasm encountered a critical error while trying to connect to your bridge.

- This likely happened because you're using an outdated browser and/or because your browser does not support CORS. Feel free to contact me through the link at the bottom of the page if you feel like this is not the case.
- For the best browsing experience on this site ( and every other one known to man ) please switch to Google Chrome or Firefox.

- {{else}} - - {{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}} + + {{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}} - {{#if isAuthenticating}} -

- Your bridge IP is {{bridgeIp}} -
- Press the button on your bridge to authenticate this application. -

- {{else}} -

You failed to press the button in time. RETRY

- {{/if}} + {{#if isAuthenticating}} +

+ Your bridge IP is {{bridgeIp}} +
+ Press the button on your bridge to authenticate this application. +

+ {{else}} +

You failed to press the button in time. RETRY

{{/if}} {{else}} {{#unless bridgeFindStatus}} diff --git a/web/app/styles/music-tab.scss b/web/app/styles/music-tab.scss index 0812aa1..21b9fc4 100644 --- a/web/app/styles/music-tab.scss +++ b/web/app/styles/music-tab.scss @@ -19,8 +19,8 @@ } } -#slide-toggle:hover{ - color: lighten($playerDefaultIconColor, 30%) !important;; +#slide-toggle:hover { + color: lighten($playerDefaultIconColor, 30%) !important; } #player-controls { @@ -45,10 +45,12 @@ .tooltip-arrow { display: none; } - md-menu-item > .md-button md-icon { + md-menu-item>.md-button md-icon { margin: auto 0 5px 10px; } - .play-arrow, .pause, .replay { + .play-arrow, + .pause, + .replay { font-size: 30px; } } @@ -116,7 +118,8 @@ display: inline-block; } -#player-area * .noUi-handle::after, #player-area * .noUi-handle::before { +#player-area * .noUi-handle::after, +#player-area * .noUi-handle::before { content: none; } @@ -217,7 +220,7 @@ .playlist-item { border-bottom: 1px solid rgba(128, 128, 128, 0.3); - border-top: 1px solid rgba(128,128,128,0.3); + border-top: 1px solid rgba(128, 128, 128, 0.3); height: 62px; font-family: 'Open Sans', sans-serif; padding: 0 20px 0 5px; @@ -296,10 +299,10 @@ margin: 0; } .option-description { + display: inline-flex; font-size: 20px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + justify-content: center; + flex-direction: column; } button { margin-top: 0; @@ -323,7 +326,7 @@ #beat-container { display: flex; margin-bottom: 10px; -} +} #beat-area .light-group { margin: 10px 20px 0 40px; @@ -458,6 +461,9 @@ #sensitivity-settings .noUi-value-vertical { display: none; } + .option-description { + height: 55px; + } } // mobile overrides