diff --git a/mobile/app/pods/components/bridge-finder/component.js b/mobile/app/pods/components/bridge-finder/component.js index 551f846..04aba6c 100644 --- a/mobile/app/pods/components/bridge-finder/component.js +++ b/mobile/app/pods/components/bridge-finder/component.js @@ -46,6 +46,12 @@ export default Component.extend({ this.send('findBridgeByIp'); } }); + + document.addEventListener('resume', () => { + if(this.get('error') || this.get('trial') || this.get('bridgeFindFail')) { + this.send('tryAgain'); + } + }, false); }, // find the bridge ip here @@ -120,6 +126,10 @@ export default Component.extend({ }, actions: { + tryAgain() { + this.get('storage').clear(); + location.reload(); + }, retry(){ this.onBridgeIpChange(); }, diff --git a/mobile/app/pods/components/bridge-finder/template.hbs b/mobile/app/pods/components/bridge-finder/template.hbs index 998a31c..af20754 100644 --- a/mobile/app/pods/components/bridge-finder/template.hbs +++ b/mobile/app/pods/components/bridge-finder/template.hbs @@ -2,9 +2,9 @@ {{#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.

+

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

+ TRY AGAIN +

{{else}} {{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}} diff --git a/mobile/app/pods/components/hue-controls/component.js b/mobile/app/pods/components/hue-controls/component.js index 87bec2d..d4c6dce 100644 --- a/mobile/app/pods/components/hue-controls/component.js +++ b/mobile/app/pods/components/hue-controls/component.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ENV from 'huegasm_mobile/config/environment'; const { A, @@ -7,6 +6,7 @@ const { computed, isNone, run, + inject, $ } = Ember; @@ -22,6 +22,11 @@ export default Component.extend({ lightsTabSelected: computed.equal('selectedTab', 0), musicTabSelected: computed.equal('selectedTab', 1), dimmerOn: false, + playing: false, + + displayFailure: true, + + notify: inject.service(), dimmerOnClass: computed('dimmerOn', function(){ let dimmerOn = this.get('dimmerOn'), @@ -83,13 +88,29 @@ export default Component.extend({ if (!isNone(this.get('storage').get('huegasm.selectedTab'))) { this.set('selectedTab', this.get('storage').get('huegasm.selectedTab')); } + + document.addEventListener('backbutton', () => { + let index = (this.get('selectedTab') + 1) % this.tabList.length; + this.set('selectedTab', index); + this.get('storage').set('huegasm.selectedTab', index); + }, false); + + document.addEventListener('pause', () => { + this.set('pauseLightUpdates', true); + }, false); + + document.addEventListener('resume', () => { + this.set('pauseLightUpdates', false); + }, false); }, updateLightData(){ let fail = ()=>{ - if(!ENV.ignoreFailures) { - clearInterval(this.get('lightsDataIntervalHandle')); - this.send('clearBridge'); + if(this.get('displayFailure')){ + this.get('notify').warning({html: ''}); + this.set('displayFailure', false); + + setTimeout(()=>{ this.set('displayFailure', true); }, 30000); } }; diff --git a/mobile/app/pods/components/hue-controls/template.hbs b/mobile/app/pods/components/hue-controls/template.hbs index 2f6e3bf..e301a39 100644 --- a/mobile/app/pods/components/hue-controls/template.hbs +++ b/mobile/app/pods/components/hue-controls/template.hbs @@ -32,7 +32,9 @@ {{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn storage=storage}} - {{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn strobeOn=pauseLightUpdates}} + {{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn playing=playing pauseLightUpdates=pauseLightUpdates}} - {{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn storage=storage colorLoopOn=colorLoopOn action="startIntro"}} -{{/if}} \ No newline at end of file + {{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn playing=playing storage=storage colorLoopOn=colorLoopOn action="startIntro"}} +{{/if}} + +{{ember-notify messageStyle='bootstrap' closeAfter=5000}} \ No newline at end of file diff --git a/mobile/app/pods/components/lights-tab/component.js b/mobile/app/pods/components/lights-tab/component.js index 56086fd..093283a 100644 --- a/mobile/app/pods/components/lights-tab/component.js +++ b/mobile/app/pods/components/lights-tab/component.js @@ -171,9 +171,10 @@ export default Component.extend({ lastStrobeLight: 0, onStrobeOnChange: observer('strobeOn', function () { - let lightsData = this.get('lightsData'); + let lightsData = this.get('lightsData'), + strobeOn = this.get('strobeOn'); - if (this.get('strobeOn')) { + if (strobeOn) { this.set('preStrobeOnLightsDataCache', lightsData); let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0}; @@ -213,6 +214,8 @@ export default Component.extend({ setTimeout(()=>{this.onColorLoopOnChange();}, 2000); clearInterval(this.get('strobeOnInervalHandle')); } + + this.set('pauseLightUpdates', strobeOn); }), strobeStep() { diff --git a/mobile/app/pods/components/lights-tab/template.hbs b/mobile/app/pods/components/lights-tab/template.hbs index d070c9e..b239d16 100644 --- a/mobile/app/pods/components/lights-tab/template.hbs +++ b/mobile/app/pods/components/lights-tab/template.hbs @@ -2,7 +2,7 @@ {{#paper-item}} {{paper-icon "power-settings-new" class=dimmerOnClass}}

Power

- {{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=trial skipProxy=trial label=lightsOnTxt}} + {{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=(or trial playing) skipProxy=trial label=lightsOnTxt}} {{/paper-item}} {{#paper-item}} @@ -17,7 +17,7 @@ {{#paper-menu offset="0 -100" as |menu|}} {{#menu.trigger}} {{#paper-button iconButton=false}} - {{paper-button raised=true class="color" disabled=trial}} + {{paper-button raised=true class="color" disabled=(or trial playing)}} {{/paper-button}} {{/menu.trigger}} {{#menu.content class="color-content" width=8 as |content|}} @@ -31,12 +31,12 @@ {{#paper-item}} {{paper-icon "flare" class=dimmerOnClass}}

Strobe

- {{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=trial skipProxy=trial label=strobeOnTxt}} + {{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=(or trial playing) skipProxy=trial label=strobeOnTxt}} {{/paper-item}} {{#paper-item}} {{paper-icon "color-lens" class=dimmerOnClass}} {{paper-icon "loop" id="loop-addition" class=dimmerOnClass}}

Colorloop

- {{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=trial skipProxy=trial label=colorloopOnTxt}} + {{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=(or trial playing) skipProxy=trial label=colorloopOnTxt}} {{/paper-item}} {{/paper-list}} \ No newline at end of file diff --git a/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/template.hbs b/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/template.hbs index 2d64f8b..f07e88e 100644 --- a/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/template.hbs +++ b/mobile/app/pods/components/music-tab/add-soundcloud-sound-modal/template.hbs @@ -1,7 +1,7 @@ {{#if isShowingModal}} {{#modal-dialog close="close" alignment="center" translucentOverlay=true attachment="center" targetAttachment="center"}} -

Enter a SoundCloud track or playlist/set URL

+

Enter a SoundCloud track or playlist/set URL

( ex. https://soundcloud.com/mrsuicidesheep/tracks )

{{paper-input label="SoundCloud URL" icon="search" value=url onChange=(action (mut url))}} diff --git a/mobile/app/pods/components/music-tab/component.js b/mobile/app/pods/components/music-tab/component.js index 6e7dfe5..a9ce776 100644 --- a/mobile/app/pods/components/music-tab/component.js +++ b/mobile/app/pods/components/music-tab/component.js @@ -168,46 +168,6 @@ export default Component.extend(helperMixin, visualizerMixin, { }); }, - startUsingMic() { - navigator.getUserMedia( - {audio: true}, - (stream) => { - this.changePlayerControl('audioMode', 1); - let dancer = this.get('dancer'); - - if(dancer.audio && dancer.audio.pause) { - dancer.pause(); - } - - this.setProperties({ - volumeCache: this.get('volume'), - playing: true, - audioStream: stream - }); - - document.title = 'Listening to Mic - Huegasm'; - - dancer.load(stream, this.get('micBoost'), true); - this.set('usingBeatPreferences', false); - - // much more sensitive beat preference settings are needed for mic mode - this.setProperties({ - oldThreshold: this.get('threshold'), - threshold: 0.1 - }); - - dancer.setVolume(0); - }, - (err) => { - if(err.name === 'DevicesNotFoundError'){ - this.get('notify').alert({html: this.get('notFoundHtml')}); - } - - console.log('Error during navigator.getUserMedia: ' + err.name + ', ' + err.message + ', ' + err.constraintName); - } - ); - }, - clearCurrentAudio(resetPointer) { let dancer = this.get('dancer'); @@ -327,11 +287,8 @@ export default Component.extend(helperMixin, visualizerMixin, { kick: kick }); - if(navigator.getUserMedia === undefined){ - this.set('usingMicSupported', false); - } - ['volume', 'shuffle', 'repeat', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'flashingTransitions', 'colorloopMode', 'ambienceMode', 'hueRange'].forEach((item)=>{ + ['shuffle', 'repeat', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'flashingTransitions', 'colorloopMode', 'ambienceMode', 'hueRange'].forEach((item)=>{ if (!isNone(storage.get('huegasm.' + item))) { let itemVal = storage.get('huegasm.' + item); @@ -346,6 +303,26 @@ export default Component.extend(helperMixin, visualizerMixin, { SC.initialize({ client_id: this.get('SC_CLIENT_ID') }); + + document.addEventListener('volumedownbutton', () => { + let volume = this.get('volume') - 5; + volume = volume < 0 ? 0 : volume; + this.set('volume', volume); + + window.system.setSystemVolume(volume/100); + }, false); + + document.addEventListener('volumeupbutton', () => { + let volume = this.get('volume') + 5; + volume = volume > 100 ? 100 : volume; + this.set('volume', volume); + + window.system.setSystemVolume(volume/100); + }, false); + + document.addEventListener('pause', () => { + this.get('dancer').pause(); + }, false); }, didInsertElement() { @@ -498,7 +475,6 @@ export default Component.extend(helperMixin, visualizerMixin, { if(this.get('playQueuePointer') !== -1) { this.send('goToSong', this.get('playQueuePointer')); - this.send('volumeChanged', this.get('volume')); } // restore the old beat preferences ( before the user went into mic mode ) @@ -508,13 +484,6 @@ export default Component.extend(helperMixin, visualizerMixin, { document.title = 'Huegasm'; }, - useMicAudio() { - if(this.get('usingMicAudio')) { - this.send('useLocalAudio'); - } else { - this.startUsingMic(); - } - }, slideTogglePlayerBottom(){ let elem = this.$('#player-bottom'); @@ -603,10 +572,11 @@ export default Component.extend(helperMixin, visualizerMixin, { }, play(replayPause) { let dancer = this.get('dancer'), - playQueuePointer = this.get('playQueuePointer'); + playQueuePointer = this.get('playQueuePointer'), + playing = this.get('playing'); if(playQueuePointer !== -1 ) { - if (this.get('playing')) { + if (playing) { dancer.pause(); if(!replayPause){ @@ -626,16 +596,11 @@ export default Component.extend(helperMixin, visualizerMixin, { dancer.play(); } + this.set('pauseLightUpdates', !playing); this.onColorloopModeChange(); this.toggleProperty('playing'); } }, - volumeChanged(value) { - this.changePlayerControl('volume', value); - if(this.get('playing')) { - this.get('dancer').setVolume(value/100); - } - }, next(repeatAll) { let playQueuePointer = this.get('playQueuePointer'), playQueue = this.get('playQueue'), @@ -744,15 +709,9 @@ export default Component.extend(helperMixin, visualizerMixin, { micBoostChanged(value) { this.set('micBoost', value); this.get('storage').set('huegasm.micBoost', value); - - if(this.get('usingMicAudio')) { - this.get('dancer').setBoost(value); - } }, audioModeChanged(value){ - if(value === 1) { - this.startUsingMic(); - } else if(value === 0) { + if(value === 0) { this.send('useLocalAudio'); } else { this.set('audioMode', value); diff --git a/mobile/app/pods/components/music-tab/mixins/helpers.js b/mobile/app/pods/components/music-tab/mixins/helpers.js index 8061117..2d6e69b 100644 --- a/mobile/app/pods/components/music-tab/mixins/helpers.js +++ b/mobile/app/pods/components/music-tab/mixins/helpers.js @@ -93,7 +93,6 @@ export default Mixin.create({ timeElapsed: 0, timeTotal: 0, lastLightBopIndex: 0, - usingMicSupported: false, // 0 - local, 1 - mic, possibly more to come audioMode: 0, @@ -197,18 +196,12 @@ export default Mixin.create({ let song = playQueue[playQueuePointer]; if(song.scUrl && !isNone(song.picture)){ pic = song.picture.replace('67x67', '500x500'); - } else { - pic = song.picture; } } return pic; }), - pauseLightUpdates: computed('playing', function(){ - return this.get('playing'); - }), - micIcon: computed('usingMicAudio', function(){ if(this.get('usingMicAudio')) { return 'mic'; diff --git a/mobile/app/pods/components/music-tab/template.hbs b/mobile/app/pods/components/music-tab/template.hbs index bbf4d4c..9c7c8b3 100644 --- a/mobile/app/pods/components/music-tab/template.hbs +++ b/mobile/app/pods/components/music-tab/template.hbs @@ -73,10 +73,6 @@ {{/paper-menu}} {{/if}} - {{#if usingMicSupported}} - {{paper-icon icon=micIcon class=usingMicAudioClass}} - {{/if}} - {{#if usingLocalAudio}} {{paper-icon "shuffle" class=shuffleClass}} {{paper-icon repeatIcon class=repeatClass}} @@ -198,6 +194,4 @@ -{{ember-notify messageStyle='bootstrap' closeAfter=5000}} - {{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}} \ No newline at end of file diff --git a/mobile/app/styles/music-tab.scss b/mobile/app/styles/music-tab.scss index e573417..2e9eb22 100644 --- a/mobile/app/styles/music-tab.scss +++ b/mobile/app/styles/music-tab.scss @@ -146,7 +146,7 @@ background-color: white; width: 100%; height: 350px; - margin: 5px auto; + margin: 0 auto; border-radius: 5px; transition: 0.1s all ease-in-out; position: relative; @@ -255,7 +255,10 @@ background: white; padding-bottom: 20px; border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px + border-bottom-right-radius: 5px; + .md-label { + width: 100%; + } } #beat-container { diff --git a/mobile/config/environment.js b/mobile/config/environment.js index 22f5364..d613704 100644 --- a/mobile/config/environment.js +++ b/mobile/config/environment.js @@ -7,7 +7,6 @@ module.exports = function(environment) { environment: environment, rootURL: '/', locationType: 'hash', - ignoreFailures: false, EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build @@ -22,7 +21,6 @@ module.exports = function(environment) { }; if (environment === 'development') { - // ENV.ignoreFailures = true; // ENV.APP.LOG_RESOLVER = true; // ENV.APP.LOG_ACTIVE_GENERATION = true; // ENV.APP.LOG_TRANSITIONS = true; diff --git a/mobile/ember-cordova/cordova/config.xml b/mobile/ember-cordova/cordova/config.xml index ea3bcf1..711c5c9 100644 --- a/mobile/ember-cordova/cordova/config.xml +++ b/mobile/ember-cordova/cordova/config.xml @@ -1,100 +1,93 @@ - + - Huegasm - + Huegasm + Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music. - + Egor Philippov - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/app/pods/application/controller.js b/web/app/pods/application/controller.js index b6ea587..c5a04df 100644 --- a/web/app/pods/application/controller.js +++ b/web/app/pods/application/controller.js @@ -2,7 +2,8 @@ import Ember from 'ember'; const { Controller, - isEmpty + isEmpty, + $ } = Ember; export default Controller.extend({ diff --git a/web/app/pods/components/hue-controls/component.js b/web/app/pods/components/hue-controls/component.js index d75d378..8aff3a5 100644 --- a/web/app/pods/components/hue-controls/component.js +++ b/web/app/pods/components/hue-controls/component.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ENV from 'huegasm/config/environment'; const { A, @@ -8,6 +7,7 @@ const { isEmpty, isNone, run, + inject, $ } = Ember; @@ -23,6 +23,10 @@ export default Component.extend({ lightsTabSelected: computed.equal('selectedTab', 0), musicTabSelected: computed.equal('selectedTab', 1), + displayFailure: true, + + notify: inject.service(), + dimmerOnClass: computed('dimmerOn', function(){ return this.get('dimmerOn') ? 'dimmerOn md-menu-origin' : 'md-menu-origin'; }), @@ -85,9 +89,11 @@ export default Component.extend({ updateLightData(){ let fail = ()=>{ - if(!ENV.ignoreFailures) { - clearInterval(this.get('lightsDataIntervalHandle')); - this.send('clearBridge'); + if(this.get('displayFailure')){ + this.get('notify').warning({html: ''}); + this.set('displayFailure', false); + + setTimeout(()=>{ this.set('displayFailure', true); }, 30000); } }; diff --git a/web/app/pods/components/hue-controls/template.hbs b/web/app/pods/components/hue-controls/template.hbs index b468924..52e8ae3 100644 --- a/web/app/pods/components/hue-controls/template.hbs +++ b/web/app/pods/components/hue-controls/template.hbs @@ -32,8 +32,10 @@ {{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn storage=storage}}
- {{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn strobeOn=pauseLightUpdates}} + {{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn playing=playing pauseLightUpdates=pauseLightUpdates}} - {{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn storage=storage colorLoopOn=colorLoopOn action="startIntro"}} + {{music-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights active=musicTabSelected pauseLightUpdates=pauseLightUpdates dimmerOn=dimmerOn storage=storage colorLoopOn=colorLoopOn playing=playing action="startIntro"}}
-{{/if}} \ No newline at end of file +{{/if}} + +{{ember-notify messageStyle='bootstrap' closeAfter=5000}} \ No newline at end of file diff --git a/web/app/pods/components/lights-tab/component.js b/web/app/pods/components/lights-tab/component.js index 8246803..0a8de4c 100644 --- a/web/app/pods/components/lights-tab/component.js +++ b/web/app/pods/components/lights-tab/component.js @@ -172,9 +172,10 @@ export default Component.extend({ lastStrobeLight: 0, onStrobeOnChange: observer('strobeOn', function () { - let lightsData = this.get('lightsData'); + let lightsData = this.get('lightsData'), + strobeOn = this.get('strobeOn'); - if (this.get('strobeOn')) { + if (strobeOn) { this.set('preStrobeOnLightsDataCache', lightsData); let stobeInitRequestData = {'sat': this.get('strobeSat'), 'transitiontime': 0}; @@ -214,6 +215,8 @@ export default Component.extend({ setTimeout(()=>{this.onColorLoopOnChange();}, 2000); clearInterval(this.get('strobeOnInervalHandle')); } + + this.set('pauseLightUpdates', strobeOn); }), strobeStep() { diff --git a/web/app/pods/components/lights-tab/template.hbs b/web/app/pods/components/lights-tab/template.hbs index 2d13238..acd9e25 100644 --- a/web/app/pods/components/lights-tab/template.hbs +++ b/web/app/pods/components/lights-tab/template.hbs @@ -2,7 +2,7 @@ {{#paper-item}} {{paper-icon "power-settings-new" class=dimmerOnClass}}

Power

- {{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=trial skipProxy=trial label=lightsOnTxt}} + {{paper-switch value=lightsOn onChange=(action (mut lightsOn)) disabled=(or trial playing) skipProxy=trial label=lightsOnTxt}} {{/paper-item}} {{#paper-item}} @@ -18,7 +18,7 @@ {{#paper-menu offset="0 -50" as |menu|}} {{#menu.trigger}} {{#paper-button iconButton=false}} - {{paper-button raised=true class="color" disabled=trial}} + {{paper-button raised=true class="color" disabled=(or trial playing)}} {{/paper-button}} {{/menu.trigger}} {{#menu.content class="color-content" width=0 as |content|}} @@ -32,12 +32,12 @@ {{#paper-item}} {{paper-icon "flare" class=dimmerOnClass}}

Strobe

- {{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=trial skipProxy=trial label=strobeOnTxt}} + {{paper-switch value=strobeOn onChange=(action (mut strobeOn)) disabled=(or trial playing) skipProxy=trial label=strobeOnTxt}} {{/paper-item}} {{#paper-item}} {{paper-icon "color-lens" class=dimmerOnClass}} {{paper-icon "loop" id="loop-addition" class=dimmerOnClass}}

Colorloop

- {{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=trial skipProxy=trial label=colorloopOnTxt}} + {{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=(or trial playing) skipProxy=trial label=colorloopOnTxt}} {{/paper-item}} {{/paper-list}} \ No newline at end of file diff --git a/web/app/pods/components/music-tab/component.js b/web/app/pods/components/music-tab/component.js index 9cd19a4..43647b4 100644 --- a/web/app/pods/components/music-tab/component.js +++ b/web/app/pods/components/music-tab/component.js @@ -646,10 +646,11 @@ export default Component.extend(helperMixin, visualizerMixin, { }, play(replayPause) { let dancer = this.get('dancer'), - playQueuePointer = this.get('playQueuePointer'); + playQueuePointer = this.get('playQueuePointer'), + playing = this.get('playing'); if(playQueuePointer !== -1 ) { - if (this.get('playing')) { + if (playing) { dancer.pause(); if(!replayPause){ @@ -675,6 +676,7 @@ export default Component.extend(helperMixin, visualizerMixin, { dancer.play(); } + this.set('pauseLightUpdates', !playing); this.onColorloopModeChange(); this.toggleProperty('playing'); } diff --git a/web/app/pods/components/music-tab/mixins/helpers.js b/web/app/pods/components/music-tab/mixins/helpers.js index 5fda836..2a589e1 100644 --- a/web/app/pods/components/music-tab/mixins/helpers.js +++ b/web/app/pods/components/music-tab/mixins/helpers.js @@ -18,7 +18,7 @@ export default Mixin.create({ dancer: null, - notify: inject.service('notify'), + notify: inject.service(), beatOptions: { threshold: { @@ -200,18 +200,12 @@ export default Mixin.create({ let song = playQueue[playQueuePointer]; if(song.scUrl && !isNone(song.picture)){ pic = song.picture.replace('67x67', '500x500'); - } else { - pic = song.picture; } } return pic; }), - pauseLightUpdates: computed('playing', function(){ - return this.get('playing'); - }), - micIcon: computed('usingMicAudio', function(){ if(this.get('usingMicAudio')) { return 'mic'; diff --git a/web/app/pods/components/music-tab/template.hbs b/web/app/pods/components/music-tab/template.hbs index 4712f6a..9849dce 100644 --- a/web/app/pods/components/music-tab/template.hbs +++ b/web/app/pods/components/music-tab/template.hbs @@ -172,13 +172,13 @@ {{#if usingMicAudio}} -
- - Mic Boost - +
+ + Mic Boost + - {{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range on-slide="micBoostChanged" pips=beatOptions.micBoost.pips}} -
+ {{range-slider start=micBoost orientation="vertical" step=beatOptions.micBoost.step range=beatOptions.micBoost.range on-slide="micBoostChanged" pips=beatOptions.micBoost.pips}} +
{{/if}}
@@ -189,10 +189,6 @@ {{paper-checkbox value=colorloopMode onChange=(action (mut colorloopMode)) label="Colorloop"}} - - {{!-- - {{#paper-checkbox checked=ambienceMode}}Ambience{{/paper-checkbox}} - --}}
@@ -215,6 +211,4 @@ -{{ember-notify messageStyle='bootstrap' closeAfter=5000}} - {{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}} \ No newline at end of file diff --git a/web/app/styles/app.scss b/web/app/styles/app.scss index a1ec09b..b93f222 100644 --- a/web/app/styles/app.scss +++ b/web/app/styles/app.scss @@ -81,25 +81,28 @@ div.ember-modal-dialog { } } // fancy webkit scrollbars -::-webkit-scrollbar { - -webkit-appearance: none; +@media(min-width:767px) { + ::-webkit-scrollbar { + -webkit-appearance: none; + } + + ::-webkit-scrollbar:vertical { + width: 12px; + } + + ::-webkit-scrollbar:horizontal { + height: 12px; + } + + ::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, .5); + border-radius: 10px; + border: 2px solid #ffffff; + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); + } + + ::-webkit-scrollbar-track { + background-color: #ffffff; + } } -::-webkit-scrollbar:vertical { - width: 12px; -} - -::-webkit-scrollbar:horizontal { - height: 12px; -} - -::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, .5); - border-radius: 10px; - border: 2px solid #ffffff; - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); -} - -::-webkit-scrollbar-track { - background-color: #ffffff; -} diff --git a/web/app/styles/music-tab.scss b/web/app/styles/music-tab.scss index 73cdb30..dd6bf8c 100644 --- a/web/app/styles/music-tab.scss +++ b/web/app/styles/music-tab.scss @@ -171,7 +171,7 @@ background-color: white; width: 100%; height: 350px; - margin: 5px auto; + margin: 0 auto; border-radius: 5px; transition: 0.1s all ease-in-out; position: relative; @@ -279,6 +279,7 @@ #light-option { margin-top: 67px; + transform: translateY(25%); } .beat-option { @@ -445,6 +446,9 @@ @media(max-width:767px) { #light-option { margin-top: 0; + .md-label { + width: auto; + } } #beat-area { height: initial; diff --git a/web/config/environment.js b/web/config/environment.js index 32c435f..d1ba865 100644 --- a/web/config/environment.js +++ b/web/config/environment.js @@ -7,7 +7,6 @@ module.exports = function(environment) { environment: environment, rootURL: '/', locationType: 'auto', - ignoreFailures: false, EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build @@ -22,7 +21,6 @@ module.exports = function(environment) { }; if (environment === 'development') { - // ENV.ignoreFailures = true; // ENV.APP.LOG_RESOLVER = true; // ENV.APP.LOG_ACTIVE_GENERATION = true; // ENV.APP.LOG_TRANSITIONS = true;