diff --git a/assets/splashscreen.psd b/assets/splashscreen.psd new file mode 100644 index 0000000..ac92d53 Binary files /dev/null and b/assets/splashscreen.psd differ diff --git a/mobile/app/index.html b/mobile/app/index.html index 28fb643..b8b99df 100644 --- a/mobile/app/index.html +++ b/mobile/app/index.html @@ -13,10 +13,10 @@ {{content-for 'head'}} - + - - + + {{content-for 'head-footer'}} @@ -26,7 +26,7 @@ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-69470561-1', 'auto'); ga('send', 'pageview'); @@ -35,8 +35,8 @@ {{content-for 'body'}} - - + + {{content-for 'body-footer'}} diff --git a/mobile/app/pods/application/route.js b/mobile/app/pods/application/route.js new file mode 100644 index 0000000..b747b73 --- /dev/null +++ b/mobile/app/pods/application/route.js @@ -0,0 +1,5 @@ +import Ember from 'ember'; +import SplashscreenMixin from 'ember-cordova/mixins/device/splashscreen'; + +export default Ember.Route.extend(SplashscreenMixin, { +}); diff --git a/mobile/app/templates/application.hbs b/mobile/app/pods/application/template.hbs similarity index 100% rename from mobile/app/templates/application.hbs rename to mobile/app/pods/application/template.hbs diff --git a/mobile/app/pods/components/bridge-finder/template.hbs b/mobile/app/pods/components/bridge-finder/template.hbs index db671cd..998a31c 100644 --- a/mobile/app/pods/components/bridge-finder/template.hbs +++ b/mobile/app/pods/components/bridge-finder/template.hbs @@ -8,16 +8,15 @@ {{else}} {{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}} - - {{#if isAuthenticating}} -

+

+ {{#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}} + You failed to press the button in time. RETRY + {{/if}} +

{{/if}} {{else}} {{#unless bridgeFindStatus}} diff --git a/mobile/app/pods/components/hue-controls/component.js b/mobile/app/pods/components/hue-controls/component.js index edfd701..87bec2d 100644 --- a/mobile/app/pods/components/hue-controls/component.js +++ b/mobile/app/pods/components/hue-controls/component.js @@ -16,7 +16,7 @@ export default Component.extend({ lightsData: null, activeLights: A(), tabList: ["Lights", "Music"], - selectedTab: 1, + selectedTab: 0, pauseLightUpdates: false, lightsTabSelected: computed.equal('selectedTab', 0), @@ -176,32 +176,24 @@ export default Component.extend({ 'You may toggle a light\'s state by clicking on it.' }, { - element: '#settings', + element: $('#navigation .ember-basic-dropdown-trigger')[0], intro: 'A few miscellaneous settings can be found here.

' + 'WARNING: clearing application settings will restore the application to its original state. This will even delete your playlist and any saved song beat preferences.', - position: 'bottom' + position: 'left' }, { - element: '#dimmer', intro: 'And that\'s it...Hope you enjoy the application. ;)

' + - 'TIP: click on the icon to switch to a darker theme.', - position: 'bottom' + 'TIP: click on the lightswitch to switch to a darker theme.', } ] }); // it's VERY ugly but it works... the jQuery massacre :'( intro.onchange((element) => { - if(element.id === 'music-tab' || element.id === 'playlist' || element.id === 'player-area' || element.id === 'beat-option-row' || element.id === 'beat-option-button-group' || element.id === 'beat-container'){ - $('#music-tab').removeClass('hidden'); - $('#lights-tab').addClass('hidden'); - $('.navigation-item').eq(0).removeClass('active'); - $('.navigation-item').eq(1).addClass('active'); + if(element.id === 'music-tab' || element.id === 'playlist' || element.id === 'player-area' || element.id === 'beat-option-row' || element.id === 'beat-option-button-group' || element.id === 'beat-container' || element.id === 'using-mic-audio-tooltip'){ + $('.navigation-item').eq(1).click(); } else { - $('#lights-tab').removeClass('hidden'); - $('#music-tab').addClass('hidden'); - $('.navigation-item').eq(1).removeClass('active'); - $('.navigation-item').eq(0).addClass('active'); + $('.navigation-item').eq(0).click(); } if(element.id === 'music-tab' || element.id === 'playlist' || element.id === 'player-area'){ @@ -221,27 +213,6 @@ export default Component.extend({ } }); - let onFinish = ()=>{ - this.set('activeTab', 1); - $('#music-tab').removeClass('hidden'); - $('#lights-tab').addClass('hidden'); - $('.navigation-item').eq(0).removeClass('active'); - $('.navigation-item').eq(1).addClass('active'); - }, onExit = ()=>{ - let dimmer = $('#dimmer'); - - onFinish(); - dimmer.popover({ - trigger: 'manual', - placement: 'right', - content: 'Click on this icon to toggle the dark theme.' - }).popover('show'); - - setTimeout(()=>{ - dimmer.popover('hide'); - }, 5000); - }; - // skip hidden/missing elements intro.onafterchange((element)=>{ let elem = $(element); @@ -252,7 +223,7 @@ export default Component.extend({ run.later(this, function() { $('.introjs-tooltip').velocity('scroll'); }, 500); - }).onexit(onExit).oncomplete(onFinish).start(); + }).start(); }, toggleDimmer(){ this.toggleProperty('dimmerOn'); diff --git a/mobile/app/pods/components/hue-controls/template.hbs b/mobile/app/pods/components/hue-controls/template.hbs index 279c271..2f6e3bf 100644 --- a/mobile/app/pods/components/hue-controls/template.hbs +++ b/mobile/app/pods/components/hue-controls/template.hbs @@ -1,6 +1,8 @@ {{#if ready}} + {{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}} + {{lights-tab apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial active=lightsTabSelected colorLoopOn=colorLoopOn dimmerOn=dimmerOn strobeOn=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 diff --git a/mobile/app/pods/components/lights-tab/component.js b/mobile/app/pods/components/lights-tab/component.js index 3ec703e..56086fd 100644 --- a/mobile/app/pods/components/lights-tab/component.js +++ b/mobile/app/pods/components/lights-tab/component.js @@ -17,7 +17,6 @@ export default Component.extend({ lightsOn: false, - // COLOR LOOP related stuff colorLoopOn: false, lightsOnTxt: computed('lightsOn', function(){ @@ -192,7 +191,7 @@ export default Component.extend({ } } - this.set('strobeOnInervalHandle', setInterval(this.strobeStep.bind(this), 200)); + this.set('strobeOnInervalHandle', setInterval(this.strobeStep.bind(this), 500)); } else { // revert the light system to pre-strobe let preStrobeOnLightsDataCache = this.get('preStrobeOnLightsDataCache'), updateLight = (lightIndex)=> { $.ajax(this.get('apiURL') + '/lights/' + lightIndex + '/state', { 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 aca8ba2..2d64f8b 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,15 +1,14 @@ {{#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))}}
- {{paper-button onClick=(action "close") label="Close"}} + {{paper-button onClick=(action "close") label="Close"}} {{paper-button class="pull-right" onClick=(action "add") disabled=saveDisabled primary=true label="Add Music"}}
- {{/modal-dialog}} {{/if}} \ No newline at end of file diff --git a/mobile/app/pods/components/music-tab/component.js b/mobile/app/pods/components/music-tab/component.js index 46671cc..6e7dfe5 100644 --- a/mobile/app/pods/components/music-tab/component.js +++ b/mobile/app/pods/components/music-tab/component.js @@ -331,7 +331,7 @@ export default Component.extend(helperMixin, visualizerMixin, { this.set('usingMicSupported', false); } - ['volume', 'shuffle', 'repeat', 'volumeMuted', 'threshold', 'playerBottomDisplayed', 'audioMode', 'songBeatPreferences', 'firstVisit', 'currentVisName', 'playQueue', 'playQueuePointer', 'micBoost', 'flashingTransitions', 'colorloopMode', 'ambienceMode', 'hueRange'].forEach((item)=>{ + ['volume', '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); @@ -399,9 +399,6 @@ export default Component.extend(helperMixin, visualizerMixin, { }, actions: { - clearPlaylist(){ - this.get('playQueue').clear(); - }, setVisName(name){ this.set('currentVisName', name); }, @@ -618,12 +615,6 @@ export default Component.extend(helperMixin, visualizerMixin, { } else { let timeTotal = this.get('timeTotal'); - if(this.get('volumeMuted')) { - dancer.setVolume(0); - } else { - dancer.setVolume(this.get('volume')/100); - } - // replay song if(this.get('timeElapsed') === timeTotal && timeTotal !== 0){ this.send('next', true); @@ -644,10 +635,6 @@ export default Component.extend(helperMixin, visualizerMixin, { if(this.get('playing')) { this.get('dancer').setVolume(value/100); } - - if(this.get('volume') > 0 && this.get('volumeMuted')){ - this.changePlayerControl('volumeMuted', false); - } }, next(repeatAll) { let playQueuePointer = this.get('playQueuePointer'), @@ -736,20 +723,6 @@ export default Component.extend(helperMixin, visualizerMixin, { dancer.audio.currentTime = Math.floor(this.get('timeTotal') * position / 100); } }, - volumeMutedChanged(value) { - let dancer = this.get('dancer'), - volumeMuted = isNone(value) ? !this.get('volumeMuted') : value; - - this.changePlayerControl('volumeMuted', volumeMuted); - - if(this.get('playing')){ - if(volumeMuted){ - dancer.setVolume(0); - } else { - dancer.setVolume(this.get('volume')/100); - } - } - }, addLocalAudio: function () { $('#file-input').click(); }, diff --git a/mobile/app/pods/components/music-tab/mixins/helpers.js b/mobile/app/pods/components/music-tab/mixins/helpers.js index 215d373..8061117 100644 --- a/mobile/app/pods/components/music-tab/mixins/helpers.js +++ b/mobile/app/pods/components/music-tab/mixins/helpers.js @@ -6,7 +6,6 @@ const { computed, isNone, inject, - on, A } = Ember; @@ -117,7 +116,6 @@ export default Mixin.create({ // 0 - no repeat, 1 - repeat all, 2 - repeat one repeat: 0, shuffle: false, - volumeMuted: false, volume: 100, // beat detection related pausing paused: false, @@ -267,16 +265,6 @@ export default Mixin.create({ return this.get('dimmerOn') ? 'dimmerOn' : null; }), - volumeMutedClass: computed('volumeMuted', function(){ - let classes = 'player-control-icon volumeButton'; - - if(this.get('volumeMuted')){ - classes += ' active'; - } - - return classes; - }), - usingLocalAudioClass: computed('usingLocalAudio', function(){ return this.get('usingLocalAudio') ? 'player-control-icon active' : 'player-control-icon'; }), @@ -293,20 +281,6 @@ export default Mixin.create({ return this.get('shuffle') ? 'player-control-icon active' : 'player-control-icon'; }), - volumeIcon: computed('volumeMuted', 'volume', function() { - let volume = this.get('volume'); - - if (this.get('volumeMuted')) { - return "volume-off"; - } else if (volume >= 70) { - return "volume-up"; - } else if (volume > 10) { - return "volume-down"; - } else { - return 'volume-mute'; - } - }), - beatDetectionAreaArrowIcon: computed('playerBottomDisplayed', function(){ if(!this.get('playerBottomDisplayed')){ return 'keyboard-arrow-down'; @@ -334,22 +308,6 @@ export default Mixin.create({ this.get('storage').set('huegasm.' + option, this.get(option)); }), - onVolumeMutedChange: on('init', observer('volumeMuted', function() { - let volumeMuted = this.get('volumeMuted'), - dancer = this.get('dancer'), - volume=0; - - if (volumeMuted) { - volume = 0; - } else { - volume = this.get('volume')/100; - } - - if(this.get('playing')){ - dancer.setVolume(volume); - } - })), - formatTime(time){ return this.pad(Math.floor(time/60), 2) + ':' + this.pad(time%60, 2); }, diff --git a/mobile/app/pods/components/music-tab/template.hbs b/mobile/app/pods/components/music-tab/template.hbs index 81cb998..bbf4d4c 100644 --- a/mobile/app/pods/components/music-tab/template.hbs +++ b/mobile/app/pods/components/music-tab/template.hbs @@ -18,9 +18,7 @@ -->{{paper-icon playingIcon class="player-control-icon"}}{{#if playQueueMultiple}}{{paper-icon "skip-next" action="" class="player-control-icon"}}{{/if}}{{paper-icon icon=volumeIcon class=volumeMutedClass}}{{range-slider start=volume min=0 max=100 connect=filledConnect on-slide="volumeChanged" id="volume-bar" class="hidden-xs"}} + -->{{/if}}
{{timeElapsedTxt}} / {{timeTotalTxt}}
{{/if}} @@ -82,7 +80,6 @@ {{#if usingLocalAudio}} {{paper-icon "shuffle" class=shuffleClass}} {{paper-icon repeatIcon class=repeatClass}} - {{paper-icon "clear-all" class="player-control-icon"}} {{/if}} @@ -147,14 +144,6 @@ {{/if}}
-
- - Sensitivity - - - {{range-slider start=threshold orientation="vertical" step=beatOptions.threshold.step range=beatOptions.threshold.range on-slide="thresholdChanged" pips=beatOptions.threshold.pips}} -
-
Hue Range @@ -163,6 +152,14 @@ {{range-slider start=hueRange orientation="vertical" step=beatOptions.hueRange.step range=beatOptions.hueRange.range connect=hueRangeConnect on-slide="hueRangeChanged" pips=beatOptions.hueRange.pips}}
+
+ + Sensitivity + + + {{range-slider start=threshold orientation="vertical" step=beatOptions.threshold.step range=beatOptions.threshold.range on-slide="thresholdChanged" pips=beatOptions.threshold.pips}} +
+ {{#if usingMicAudio}}
diff --git a/mobile/app/styles/app.scss b/mobile/app/styles/app.scss index 727f6ce..fd8f669 100644 --- a/mobile/app/styles/app.scss +++ b/mobile/app/styles/app.scss @@ -53,32 +53,8 @@ div.ember-modal-dialog { } .title { - margin-bottom: 30px; + margin-bottom: 50px; img { width: 200px; } } - -// fancy webkit scrollbars -::-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; -} diff --git a/mobile/app/styles/bridge-finder.scss b/mobile/app/styles/bridge-finder.scss index 1ef813c..b71547b 100644 --- a/mobile/app/styles/bridge-finder.scss +++ b/mobile/app/styles/bridge-finder.scss @@ -17,10 +17,16 @@ #bridge-finder { text-align: center; - padding: 10px 15px 0; + padding: 20px 15px 0; font-size: 16px; } #bridge-finder .md-bar { background-color: $secondaryThemeColor !important; } + +.bridge-finder-bottom { + margin-top: 30px; + width: 100%; + font-size: 18px; +} diff --git a/mobile/app/styles/dimmer.scss b/mobile/app/styles/dimmer.scss index 4ae1155..a24ede1 100644 --- a/mobile/app/styles/dimmer.scss +++ b/mobile/app/styles/dimmer.scss @@ -59,15 +59,26 @@ body.dimmerOn { } .paper-icon.dimmerOn { - color: inherit !important; text-shadow: $glowingText; opacity: 0.9 !important; } #dimmer { + background: url(images/lightswitch.png) !important; + width: 14px; + height: 34px; + display: inline-block; float: left; - width: 30px; - height: 30px; - background: url(images/huegasm.png) center center no-repeat !important; - background-size: 30px 30px !important; + margin-left: 15px; + &.dimmerOn #dimmer-switch { + opacity: 0; + } + #dimmer-switch { + background: url(images/lightswitch.png) -14px 0px; + width: 14px; + height: 34px; + transition: opacity 0.4s; + float: left; + opacity: 1; + } } diff --git a/mobile/app/styles/hue-controls.scss b/mobile/app/styles/hue-controls.scss index 09328c4..2406df9 100644 --- a/mobile/app/styles/hue-controls.scss +++ b/mobile/app/styles/hue-controls.scss @@ -1,4 +1,6 @@ #lights-tab { + margin-top: 4vh; + padding: 0; .paper-icon { line-height: 0.8 !important; } @@ -19,12 +21,12 @@ } #navigation { - padding: 15px 0; + padding: 15px 0 20px; text-align: center; } .navigation-item { - font-size: 18px; + font-size: 20px; padding: 0 10px 0 10px; &.active { font-weight: bold; @@ -64,7 +66,7 @@ position: absolute; left: 33px; top: 15px; - font-size: 16px; + font-size: 16px !important; } #navigation .ember-basic-dropdown-trigger { @@ -72,4 +74,6 @@ text-align: right; float: right; position: relative; + bottom: 10px; + transform: scale(1.1); } diff --git a/mobile/app/styles/light-group.scss b/mobile/app/styles/light-group.scss index 5019857..260985f 100644 --- a/mobile/app/styles/light-group.scss +++ b/mobile/app/styles/light-group.scss @@ -18,7 +18,7 @@ left: 5px; font-size: 40px; color: rgba(255, 0, 0, 0.37); - font-family: cursive; + font-family: Tahoma, Geneva, sans-serif; } .horizontal-light-group { diff --git a/mobile/app/styles/music-tab.scss b/mobile/app/styles/music-tab.scss index 5cdc20b..e573417 100644 --- a/mobile/app/styles/music-tab.scss +++ b/mobile/app/styles/music-tab.scss @@ -305,7 +305,7 @@ position: absolute; top: 3px; z-index: 1000; - right: 5px; + left: 5px; md-icon { color: $secondaryThemeColor !important; font-size: 25px; diff --git a/mobile/app/styles/paper.scss b/mobile/app/styles/paper.scss index f5cbeef..7e03213 100644 --- a/mobile/app/styles/paper.scss +++ b/mobile/app/styles/paper.scss @@ -10,6 +10,7 @@ md-checkbox.md-default-theme.md-checked .md-icon { md-checkbox .md-label { width: 125px; + text-align: left; } .md-button { diff --git a/mobile/config/environment.js b/mobile/config/environment.js index d96978c..22f5364 100644 --- a/mobile/config/environment.js +++ b/mobile/config/environment.js @@ -22,7 +22,7 @@ module.exports = function(environment) { }; if (environment === 'development') { - ENV.ignoreFailures = true; + // 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 0d2daf8..ea3bcf1 100644 --- a/mobile/ember-cordova/cordova/config.xml +++ b/mobile/ember-cordova/cordova/config.xml @@ -1,13 +1,14 @@ - huegasm_mobile + Huegasm - A sample Apache Cordova application that responds to the deviceready event. - - - Apache Cordova Team - + Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music. + + + Egor Philippov + + @@ -17,6 +18,7 @@ + @@ -24,36 +26,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -67,5 +39,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/ember-cordova/cordova/platforms/.gitkeep b/mobile/ember-cordova/cordova/platforms/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/mobile/ember-cordova/cordova/res/screen/android/land-hdpi.png b/mobile/ember-cordova/cordova/res/screen/android/land-hdpi.png new file mode 100644 index 0000000..b56e6d3 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/land-hdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/land-ldpi.png b/mobile/ember-cordova/cordova/res/screen/android/land-ldpi.png new file mode 100644 index 0000000..bb03611 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/land-ldpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/land-mdpi.png b/mobile/ember-cordova/cordova/res/screen/android/land-mdpi.png new file mode 100644 index 0000000..58bb386 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/land-mdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/land-xhdpi.png b/mobile/ember-cordova/cordova/res/screen/android/land-xhdpi.png new file mode 100644 index 0000000..58a1720 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/land-xhdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/land-xxhdpi.png b/mobile/ember-cordova/cordova/res/screen/android/land-xxhdpi.png new file mode 100644 index 0000000..cd8c961 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/land-xxhdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/land-xxxhdpi.png b/mobile/ember-cordova/cordova/res/screen/android/land-xxxhdpi.png new file mode 100644 index 0000000..222c301 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/land-xxxhdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/port-hdpi.png b/mobile/ember-cordova/cordova/res/screen/android/port-hdpi.png new file mode 100644 index 0000000..ea8de11 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/port-hdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/port-ldpi.png b/mobile/ember-cordova/cordova/res/screen/android/port-ldpi.png new file mode 100644 index 0000000..3bb8f22 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/port-ldpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/port-mdpi.png b/mobile/ember-cordova/cordova/res/screen/android/port-mdpi.png new file mode 100644 index 0000000..b6da1e4 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/port-mdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/port-xhdpi.png b/mobile/ember-cordova/cordova/res/screen/android/port-xhdpi.png new file mode 100644 index 0000000..2a97841 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/port-xhdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/port-xxhdpi.png b/mobile/ember-cordova/cordova/res/screen/android/port-xxhdpi.png new file mode 100644 index 0000000..e939934 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/port-xxhdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/android/port-xxxhdpi.png b/mobile/ember-cordova/cordova/res/screen/android/port-xxxhdpi.png new file mode 100644 index 0000000..3f3b0cf Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/android/port-xxxhdpi.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/1024-768.png b/mobile/ember-cordova/cordova/res/screen/ios/1024-768.png new file mode 100644 index 0000000..c6cd93b Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/1024-768.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/1136-640.png b/mobile/ember-cordova/cordova/res/screen/ios/1136-640.png new file mode 100644 index 0000000..087f3c0 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/1136-640.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/1242-2208.png b/mobile/ember-cordova/cordova/res/screen/ios/1242-2208.png new file mode 100644 index 0000000..5d399d9 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/1242-2208.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/1334-750.png b/mobile/ember-cordova/cordova/res/screen/ios/1334-750.png new file mode 100644 index 0000000..9a0dec2 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/1334-750.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/1536-2048.png b/mobile/ember-cordova/cordova/res/screen/ios/1536-2048.png new file mode 100644 index 0000000..23ab2b4 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/1536-2048.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/2048-1536.png b/mobile/ember-cordova/cordova/res/screen/ios/2048-1536.png new file mode 100644 index 0000000..3bbd242 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/2048-1536.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/2048-2732.png b/mobile/ember-cordova/cordova/res/screen/ios/2048-2732.png new file mode 100644 index 0000000..6d7a718 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/2048-2732.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/2208-1242.png b/mobile/ember-cordova/cordova/res/screen/ios/2208-1242.png new file mode 100644 index 0000000..60984b0 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/2208-1242.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/2732-2048.png b/mobile/ember-cordova/cordova/res/screen/ios/2732-2048.png new file mode 100644 index 0000000..1859d2d Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/2732-2048.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/640-1136.png b/mobile/ember-cordova/cordova/res/screen/ios/640-1136.png new file mode 100644 index 0000000..4a9886e Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/640-1136.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/640-960.png b/mobile/ember-cordova/cordova/res/screen/ios/640-960.png new file mode 100644 index 0000000..7dc43ea Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/640-960.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/750-1334.png b/mobile/ember-cordova/cordova/res/screen/ios/750-1334.png new file mode 100644 index 0000000..43c016f Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/750-1334.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/768-1024.png b/mobile/ember-cordova/cordova/res/screen/ios/768-1024.png new file mode 100644 index 0000000..a56ccf4 Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/768-1024.png differ diff --git a/mobile/ember-cordova/cordova/res/screen/ios/960-640.png b/mobile/ember-cordova/cordova/res/screen/ios/960-640.png new file mode 100644 index 0000000..92eb9ae Binary files /dev/null and b/mobile/ember-cordova/cordova/res/screen/ios/960-640.png differ diff --git a/mobile/ember-cordova/splash.svg b/mobile/ember-cordova/splash.svg new file mode 100644 index 0000000..2d5dc65 --- /dev/null +++ b/mobile/ember-cordova/splash.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + diff --git a/mobile/package.json b/mobile/package.json index 7c3d885..904136f 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -9,8 +9,9 @@ }, "scripts": { "start": "ember server", - "build": "ember build", + "build": "ember cordova:build --platform=android --environment=production --release", "test": "ember test", + "cordova": "ember cdv:serve --platform=android" }, "engines": { "node": ">= 0.10.0" @@ -35,6 +36,7 @@ "ember-cli-test-loader": "^1.1.0", "ember-cli-uglify": "^1.2.0", "ember-cordova": "^0.3.5", + "ember-cordova-keyboard": "0.0.1", "ember-export-application-global": "^1.0.4", "ember-load-initializers": "^0.5.0", "ember-modal-dialog": "^0.9.0", diff --git a/mobile/public/assets/images/lightswitch.png b/mobile/public/assets/images/lightswitch.png new file mode 100644 index 0000000..1be38d5 Binary files /dev/null and b/mobile/public/assets/images/lightswitch.png differ diff --git a/mobile/public/crossdomain.xml b/mobile/public/crossdomain.xml deleted file mode 100644 index 0c16a7a..0000000 --- a/mobile/public/crossdomain.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/mobile/public/humans.txt b/mobile/public/humans.txt deleted file mode 100644 index 2112c33..0000000 --- a/mobile/public/humans.txt +++ /dev/null @@ -1,14 +0,0 @@ -/* TEAM */ -Your title: Egor Philippov -Site: https://www.linkedin.com/pub/egor-philippov/7b/220/148 -Location: Vancouver, Canada. - -/* THANKS */ -Edmond Cheung - favicons + huegasm logo -Liviu Antonescu - filming + video editing of the intro -Olamide Omorodion - business consultation - -/* SITE */ -Last update: 2015 -Standards: HTML5, CSS3 -Components: ember, jQuery, bootstrap, font-awesome, intro.js, locallyjs, nouislider, dancer.js, ember paper, ember notify, JavaScript-ID3-Reader diff --git a/mobile/public/robots.txt b/mobile/public/robots.txt deleted file mode 100644 index f591645..0000000 --- a/mobile/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/mobile/tests/unit/pods/application/route-test.js b/mobile/tests/unit/pods/application/route-test.js new file mode 100644 index 0000000..9808c43 --- /dev/null +++ b/mobile/tests/unit/pods/application/route-test.js @@ -0,0 +1,11 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:application', 'Unit | Route | application', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + let route = this.subject(); + assert.ok(route); +}); diff --git a/web/app/templates/application.hbs b/web/app/pods/application/template.hbs similarity index 100% rename from web/app/templates/application.hbs rename to web/app/pods/application/template.hbs diff --git a/web/app/pods/components/hue-controls/component.js b/web/app/pods/components/hue-controls/component.js index b94879e..d0106ef 100644 --- a/web/app/pods/components/hue-controls/component.js +++ b/web/app/pods/components/hue-controls/component.js @@ -114,6 +114,9 @@ export default Component.extend({ storage.remove('huegasm.bridgeIp'); location.reload(); }, + toggleDimmer() { + this.sendAction("toggleDimmer"); + }, clearAllSettings() { this.get('storage').clear(); location.reload(); @@ -173,32 +176,23 @@ export default Component.extend({ 'You may toggle a light\'s state by clicking on it.' }, { - element: '#settings', + element: $('#navigation .ember-basic-dropdown-trigger')[0], intro: 'A few miscellaneous settings can be found here.

' + 'WARNING: clearing application settings will restore the application to its original state. This will even delete your playlist and any saved song beat preferences.', position: 'bottom' }, { - element: '#dimmer', intro: 'And that\'s it...Hope you enjoy the application. ;)

' + - 'TIP: click on the icon to switch to a darker theme.', - position: 'top' + 'TIP: click on the lightswitch to switch to a darker theme.' } ] }); - // it's VERY ugly but it works... the jQuery massacre :'( intro.onchange((element) => { if(element.id === 'music-tab' || element.id === 'playlist' || element.id === 'player-area' || element.id === 'beat-option-row' || element.id === 'beat-option-button-group' || element.id === 'beat-container' || element.id === 'using-mic-audio-tooltip'){ - $('#music-tab').removeClass('hidden'); - $('#lights-tab').addClass('hidden'); - $('.navigation-item').eq(0).removeClass('active'); - $('.navigation-item').eq(1).addClass('active'); + $('.navigation-item').eq(0).click(); } else { - $('#lights-tab').removeClass('hidden'); - $('#music-tab').addClass('hidden'); - $('.navigation-item').eq(1).removeClass('active'); - $('.navigation-item').eq(0).addClass('active'); + $('.navigation-item').eq(1).click(); } if(element.id === 'music-tab' || element.id === 'playlist' || element.id === 'player-area'){ @@ -210,27 +204,6 @@ export default Component.extend({ } }); - let onFinish = ()=>{ - this.set('activeTab', 1); - $('#music-tab').removeClass('hidden'); - $('#lights-tab').addClass('hidden'); - $('.navigation-item').eq(0).removeClass('active'); - $('.navigation-item').eq(1).addClass('active'); - }, onExit = ()=>{ - let dimmer = $('#dimmer'); - - onFinish(); - dimmer.popover({ - trigger: 'manual', - placement: 'top', - content: 'Click on this icon to toggle the dark theme.' - }).popover('show'); - - setTimeout(()=>{ - dimmer.popover('hide'); - }, 5000); - }; - // skip hidden/missing elements intro.onafterchange((element)=>{ let elem = $(element); @@ -241,7 +214,7 @@ export default Component.extend({ run.later(this, function() { $('.introjs-tooltip').velocity('scroll'); }, 500); - }).onexit(onExit).oncomplete(onFinish).start(); + }).start(); } } }); diff --git a/web/app/pods/components/hue-controls/template.hbs b/web/app/pods/components/hue-controls/template.hbs index fd415e5..fa2f318 100644 --- a/web/app/pods/components/hue-controls/template.hbs +++ b/web/app/pods/components/hue-controls/template.hbs @@ -1,5 +1,9 @@ {{#if ready}} {{/if}} -{{/if}} - - \ No newline at end of file +{{/if}} \ No newline at end of file diff --git a/web/app/pods/components/huegasm-footer/component.js b/web/app/pods/components/huegasm-footer/component.js new file mode 100644 index 0000000..79b8487 --- /dev/null +++ b/web/app/pods/components/huegasm-footer/component.js @@ -0,0 +1,21 @@ +import Ember from 'ember'; + +const { + Component, + computed +} = Ember; + +export default Component.extend({ + tagName: 'footer', + classNames: ['footer'], + + year: computed(function(){ + return new Date().getFullYear(); + }), + + actions: { + toggleDimmer(){ + this.sendAction('toggleDimmer'); + } + } +}); diff --git a/web/app/pods/components/huegasm-footer/template.hbs b/web/app/pods/components/huegasm-footer/template.hbs new file mode 100644 index 0000000..2b1ed38 --- /dev/null +++ b/web/app/pods/components/huegasm-footer/template.hbs @@ -0,0 +1,9 @@ + + + \ 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 6b75cb1..8246803 100644 --- a/web/app/pods/components/lights-tab/component.js +++ b/web/app/pods/components/lights-tab/component.js @@ -192,7 +192,7 @@ export default Component.extend({ } } - this.set('strobeOnInervalHandle', setInterval(this.strobeStep.bind(this), 200)); + this.set('strobeOnInervalHandle', setInterval(this.strobeStep.bind(this), 500)); } else { // revert the light system to pre-strobe let preStrobeOnLightsDataCache = this.get('preStrobeOnLightsDataCache'), updateLight = (lightIndex)=> { $.ajax(this.get('apiURL') + '/lights/' + lightIndex + '/state', { @@ -247,6 +247,12 @@ export default Component.extend({ return this.get('dimmerOn') ? 'dimmerOn' : null; }), + actions: { + toggleDimmer(){ + this.sendAction('toggleDimmer'); + } + }, + // **************** STROBE LIGHT FINISH **************** // http://www.developers.meethue.com/documentation/color-conversions-rgb-xy rgbToXy(red, green, blue){ diff --git a/web/app/pods/components/lights-tab/template.hbs b/web/app/pods/components/lights-tab/template.hbs index 2d13238..7a9b47f 100644 --- a/web/app/pods/components/lights-tab/template.hbs +++ b/web/app/pods/components/lights-tab/template.hbs @@ -40,4 +40,6 @@

Colorloop

{{paper-switch value=colorLoopOn onChange=(action (mut colorLoopOn)) disabled=trial skipProxy=trial label=colorloopOnTxt}} {{/paper-item}} -{{/paper-list}} \ No newline at end of file +{{/paper-list}} + +{{huegasm-footer toggleDimmer="toggleDimmer"}} \ 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 50fbef8..9cd19a4 100644 --- a/web/app/pods/components/music-tab/component.js +++ b/web/app/pods/components/music-tab/component.js @@ -888,6 +888,9 @@ export default Component.extend(helperMixin, visualizerMixin, { } } } + }, + toggleDimmer(){ + this.sendAction('toggleDimmer'); } } }); diff --git a/web/app/pods/components/music-tab/template.hbs b/web/app/pods/components/music-tab/template.hbs index c8ae8ae..50d84b9 100644 --- a/web/app/pods/components/music-tab/template.hbs +++ b/web/app/pods/components/music-tab/template.hbs @@ -86,7 +86,7 @@ {{#if usingLocalAudio}} {{paper-icon "shuffle" class=shuffleClass}} {{paper-icon repeatIcon class=repeatClass}} - {{paper-icon "clear-all" class="player-control-icon"}} + {{/if}}
@@ -155,14 +155,6 @@ {{/if}}
-
- - Sensitivity - - - {{range-slider start=threshold orientation="vertical" step=beatOptions.threshold.step range=beatOptions.threshold.range on-slide="thresholdChanged" pips=beatOptions.threshold.pips}} -
-
Hue Range @@ -171,6 +163,14 @@ {{range-slider start=hueRange orientation="vertical" step=beatOptions.hueRange.step range=beatOptions.hueRange.range connect=hueRangeConnect on-slide="hueRangeChanged" pips=beatOptions.hueRange.pips}}
+
+ + Sensitivity + + + {{range-slider start=threshold orientation="vertical" step=beatOptions.threshold.step range=beatOptions.threshold.range on-slide="thresholdChanged" pips=beatOptions.threshold.pips}} +
+ {{#if usingMicAudio}}
@@ -217,4 +217,6 @@ {{ember-notify messageStyle='bootstrap' closeAfter=5000}} -{{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}} \ No newline at end of file +{{music-tab/add-soundcloud-sound-modal action="handleNewSoundCloudURL" isShowingModal=isShowingAddSoundCloudModal}} + +{{huegasm-footer toggleDimmer="toggleDimmer"}} \ No newline at end of file diff --git a/web/app/styles/app.scss b/web/app/styles/app.scss index 22b4437..585040c 100644 --- a/web/app/styles/app.scss +++ b/web/app/styles/app.scss @@ -24,13 +24,13 @@ body, button { padding-bottom: 50px; } -#footer { +.footer { width: 100%; text-align: center; margin-top: 20px; } -#footer-text { +.footer-text { display: inline-block; position: relative; bottom: 10px; diff --git a/web/app/styles/dimmer.scss b/web/app/styles/dimmer.scss index e006697..71356d6 100644 --- a/web/app/styles/dimmer.scss +++ b/web/app/styles/dimmer.scss @@ -65,12 +65,11 @@ body.dimmerOn { } .paper-icon.dimmerOn { - color: inherit !important; text-shadow: $glowingText; opacity: 0.9 !important; } -#dimmer { +.logo { display: inline-block; cursor: pointer; width: 40px; @@ -78,3 +77,24 @@ body.dimmerOn { background: url(images/huegasm.png) center center no-repeat; background-size: 40px 40px; } + +#dimmer { + background: url(images/lightswitch.png) !important; + width: 14px; + height: 34px; + display: inline-block; + float: left; + margin-left: 15px; + cursor: pointer; + &.dimmerOn #dimmer-switch { + opacity: 0; + } + #dimmer-switch { + background: url(images/lightswitch.png) -14px 0px; + width: 14px; + height: 34px; + transition: opacity 0.4s; + float: left; + opacity: 1; + } +} diff --git a/web/app/styles/hue-controls.scss b/web/app/styles/hue-controls.scss index 2d8d788..85dce05 100644 --- a/web/app/styles/hue-controls.scss +++ b/web/app/styles/hue-controls.scss @@ -1,4 +1,5 @@ #lights-tab { + padding: 0; min-height: 350px; .paper-icon { line-height: 0.8 !important; @@ -84,7 +85,7 @@ position: absolute; left: 33px; top: 15px; - font-size: 16px; + font-size: 16px !important; } #navigation .ember-basic-dropdown-trigger { @@ -92,6 +93,8 @@ text-align: right; float: right; position: relative; + bottom: 10px; + transform: scale(1.1); } @media(min-width:767px) { diff --git a/web/config/environment.js b/web/config/environment.js index 7785544..32c435f 100644 --- a/web/config/environment.js +++ b/web/config/environment.js @@ -22,7 +22,7 @@ module.exports = function(environment) { }; if (environment === 'development') { - ENV.ignoreFailures = true; + // ENV.ignoreFailures = true; // ENV.APP.LOG_RESOLVER = true; // ENV.APP.LOG_ACTIVE_GENERATION = true; // ENV.APP.LOG_TRANSITIONS = true; diff --git a/web/public/assets/images/lightswitch.png b/web/public/assets/images/lightswitch.png new file mode 100644 index 0000000..1be38d5 Binary files /dev/null and b/web/public/assets/images/lightswitch.png differ diff --git a/web/tests/integration/pods/components/huegasm-footer/component-test.js b/web/tests/integration/pods/components/huegasm-footer/component-test.js new file mode 100644 index 0000000..7204231 --- /dev/null +++ b/web/tests/integration/pods/components/huegasm-footer/component-test.js @@ -0,0 +1,24 @@ +import { moduleForComponent, test } from 'ember-qunit'; +import hbs from 'htmlbars-inline-precompile'; + +moduleForComponent('huegasm-footer', 'Integration | Component | huegasm footer', { + integration: true +}); + +test('it renders', function(assert) { + // Set any properties with this.set('myProperty', 'value'); + // Handle any actions with this.on('myAction', function(val) { ... }); + + this.render(hbs`{{huegasm-footer}}`); + + assert.equal(this.$().text().trim(), ''); + + // Template block usage: + this.render(hbs` + {{#huegasm-footer}} + template block text + {{/huegasm-footer}} + `); + + assert.equal(this.$().text().trim(), 'template block text'); +}); diff --git a/web/tests/unit/pods/application/route-test.js b/web/tests/unit/pods/application/route-test.js new file mode 100644 index 0000000..9808c43 --- /dev/null +++ b/web/tests/unit/pods/application/route-test.js @@ -0,0 +1,11 @@ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:application', 'Unit | Route | application', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + let route = this.subject(); + assert.ok(route); +});