diff --git a/README.md b/README.md
index 8fd1213..f90fc18 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
# Huegasm
+
Music awesomeness for hue lights.
It lives at http://www.huegasm.com
-
+# Current priorities
+- modernize the app
+- create a hybrid app with Cardova
## POSSIBLE FUTURE FEATURES
- better visualizations
diff --git a/web/README.md b/web/README.md
index 6be258e..c8af9d5 100644
--- a/web/README.md
+++ b/web/README.md
@@ -1,7 +1,7 @@
# Huegasm
This README outlines the details of collaborating on this Ember application.
-A short introduction of this app could easily go here.
+Music awesomeness for hue lights.
## Prerequisites
@@ -29,20 +29,11 @@ You will need the following things properly installed on your computer.
Make use of the many generators for code, try `ember help generate` for more details
-### Running Tests
-
-* `ember test`
-* `ember test --server`
-
### Building
* `ember build` (development)
* `ember build --environment production` (production)
-### Deploying
-
-Specify what it takes to deploy your app.
-
## Further Reading / Useful Links
* [ember.js](http://emberjs.com/)
diff --git a/web/app/pods/components/bridge-finder/template.hbs b/web/app/pods/components/bridge-finder/template.hbs
index 1b8cb08..088f0a7 100644
--- a/web/app/pods/components/bridge-finder/template.hbs
+++ b/web/app/pods/components/bridge-finder/template.hbs
@@ -6,14 +6,14 @@
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
+
{{paper-progress-linear warn=true value=bridgeUserNamePingIntervalProgress}}
{{#if isAuthenticating}}
Your bridge IP is {{bridgeIp}}
Press the button on your bridge to authenticate this application.
You failed to press the button. RETRY
+You failed to press the button. RETRY
{{/if}} {{/if}} {{else}} @@ -26,7 +26,7 @@Found multiple hue bridges.
Please select the one you want to use for this application.
Your lights, meet your music. Huegasm.
-+
Huegasm is a free web application for managing and synchronizing your Philips Hue lights with the beat of your music.
-Power
+Power
{{#paper-switch checked=lightsOn disabled=trial skipProxy=trial}} {{lightsOnTxt}} {{/paper-switch}} {{/paper-item}} {{#paper-item}} {{paper-icon icon="brightness-4" class=dimmerOnClass}} -Brightness
+Brightness
{{paper-slider flex=true min='1' max='254' value=lightsBrightness disabled=brightnessControlDisabled}} {{/paper-item}} - {{#paper-item elementId="colorRow"}} + {{#paper-item elementId="color-row"}} {{paper-icon icon="color-lens" class=dimmerOnClass}} -Color
+Color
{{/paper-item}}Strobe
+Strobe
{{#paper-switch checked=strobeOn disabled=trial skipProxy=trial}} {{strobeOnTxt}} {{/paper-switch}} {{/paper-item}} {{#paper-item}} - {{paper-icon icon="color-lens" class=dimmerOnClass}} {{paper-icon icon="loop" id="loopAddition" class=dimmerOnClass}} -Colorloop
+ {{paper-icon icon="color-lens" class=dimmerOnClass}} {{paper-icon icon="loop" id="loop-addition" class=dimmerOnClass}} +Colorloop
{{#paper-switch checked=colorLoopOn disabled=trial skipProxy=trial}} {{colorloopOnTxt}} {{/paper-switch}} {{/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 5d8eedf..e72c996 100644 --- a/web/app/pods/components/music-tab/component.js +++ b/web/app/pods/components/music-tab/component.js @@ -12,14 +12,6 @@ const { } = Ember; export default Component.extend(helperMixin, visualizerMixin, { - onActiveChange: observer('active', function(){ - if(this.get('active')){ - $('#playNotification').removeClass('fadeOut'); - $('#beatSpeakerCenterOuter').removeClass('vibrateOuter'); - $('#beatSpeakerCenterInner').removeClass('vibrateInner'); - } - }), - onAmbienceModeChange: observer('ambienceMode', 'playing', function(){ if(this.get('ambienceMode') && this.get('playing')) { this.set('ambienceModeHandle', setInterval(()=> {this.doAmbienceLightChange();}, 5000)); @@ -318,8 +310,8 @@ export default Component.extend(helperMixin, visualizerMixin, { } //work the music beat area - simulate the speaker vibration by running a CSS animation on it - $('#beatSpeakerCenterOuter').removeClass('vibrateOuter').prop('offsetWidth', $('#beatSpeakerCenterOuter').prop('offsetWidth')).addClass('vibrateOuter'); - $('#beatSpeakerCenterInner').removeClass('vibrateInner').prop('offsetWidth', $('#beatSpeakerCenterInner').prop('offsetWidth')).addClass('vibrateInner'); + $('#beat-speaker-center-outer').velocity({blur: 3}, 100).velocity({blur: 0}, 100); + $('#beat-speaker-center-inner').velocity({scale: 1.05}, 100).velocity({scale: 1}, 100); }, init() { @@ -374,7 +366,7 @@ export default Component.extend(helperMixin, visualizerMixin, { let self = this; // file input code - $('#fileInput').on('change', function () { + $('#file-input').on('change', function() { let files = this.files; self.send('handleNewFiles', files); this.value = null; // reset in case upload the second file again @@ -385,7 +377,7 @@ export default Component.extend(helperMixin, visualizerMixin, { }); // prevent space/text selection when the user repeatedly clicks on the center - $('#beatContainer').on('mousedown', '#beatSpeakerCenterInner', function(event) { + $('#beat-container').on('mousedown', '#beat-speaker-center-inner', function(event) { event.preventDefault(); }); @@ -395,12 +387,12 @@ export default Component.extend(helperMixin, visualizerMixin, { } }); - this.$().on('drop', '#playListArea', (event)=>{ + this.$().on('drop', '#play-list-area', (event)=>{ this.send('dropFiles', event.dataTransfer.files); }); // control the volume by scrolling up/down - $('#playerArea').on('mousewheel', (event)=>{ + $('#player-area').on('mousewheel', (event)=>{ if(this.get('playQueueNotEmpty') && !this.get('usingMicAudio')) { let scrollSize = 5; @@ -432,7 +424,7 @@ export default Component.extend(helperMixin, visualizerMixin, { } if(!this.get('playerBottomDisplayed')) { - $('#playerBottom').hide(); + $('#player-bottom').hide(); } }, @@ -444,7 +436,7 @@ export default Component.extend(helperMixin, visualizerMixin, { this.set('currentVisName', name); }, hideTooltip(){ - $('.bootstrapTooltip').tooltip('hide'); + $('.bootstrap-tooltip').tooltip('hide'); }, gotoSCURL(URL){ // need to pause the music since soundcloud is going to start playing this song anyways @@ -556,7 +548,9 @@ export default Component.extend(helperMixin, visualizerMixin, { } }, slideTogglePlayerBottom(){ - this.$('#playerBottom').slideToggle(); + let elem = this.$('#player-bottom'); + + elem.velocity(elem.is(':visible') ? 'slideUp' : 'slideDown', { duration: 500 }); this.changePlayerControl('playerBottomDisplayed', !this.get('playerBottomDisplayed')); }, goToSong(index, playSong, scrollToSong){ @@ -620,12 +614,10 @@ export default Component.extend(helperMixin, visualizerMixin, { if(scrollToSong){ // this is just a bad workaround to make sure that the track has been rendered to the playlist run.later(()=>{ - let track = $('.track'+index), playListArea = $('#playListArea'); + let track = $('.track'+index); if(!isNone(track) && !isNone(track.offset())) { - playListArea.animate({ - scrollTop: track.offset().top - playListArea.offset().top + playListArea.scrollTop() - }); + track.velocity('scroll'); } }, 1000); } @@ -642,10 +634,10 @@ export default Component.extend(helperMixin, visualizerMixin, { } }, playerAreaPlay(){ - if(isEmpty($('#playerControls:hover')) && this.get('playQueuePointer') !== -1 ){ + if(isEmpty($('#player-controls:hover')) && this.get('playQueuePointer') !== -1 ){ this.send('play'); - this.set('fadeOutNotification', true); - $('#playNotification').removeClass('fadeOut').prop('offsetWidth', $('#playNotification').prop('offsetWidth')).addClass('fadeOut'); + + $('#play-notification').velocity({opacity: 0.8, scale: 1}, 0).velocity({opacity: 0, scale: 3}, 500); } }, play(replayPause) { @@ -795,7 +787,7 @@ export default Component.extend(helperMixin, visualizerMixin, { } }, addLocalAudio: function () { - $('#fileInput').click(); + $('#file-input').click(); }, shuffleChanged(value) { this.changePlayerControl('shuffle', isNone(value) ? !this.get('shuffle') : value); @@ -842,16 +834,16 @@ export default Component.extend(helperMixin, visualizerMixin, { }); this.send('handleNewFiles', files); }, - playListAreaDragOver(){ + playerListAreaDragOver(){ this.set('draggingOverPlayListArea', true); }, - playListAreaDragLeave(){ + playerListAreaDragLeave(){ this.set('draggingOverPlayListArea', false); }, handleNewFiles(files){ let self = this, playQueue = this.get('playQueue'), - updatePlayQueue = ()=>{ + updatePlayQueue = function(){ let tags = ID3.getAllTags("local"), picture = null; @@ -864,7 +856,14 @@ export default Component.extend(helperMixin, visualizerMixin, { picture = "data:" + tags.picture.format + ";base64," + window.btoa(base64String); } - playQueue.pushObject({fileName: this.name.replace(/\.[^/.]+$/, ""), url: URL.createObjectURL(this), artist: tags.artist, title: tags.title, picture: picture, local: true }); + playQueue.pushObject({ + fileName: this.name.replace(/\.[^/.]+$/, ""), + url: URL.createObjectURL(this), + artist: tags.artist, + title: tags.title, + picture: picture, + local: true + }); ID3.clearAll(); diff --git a/web/app/pods/components/music-tab/mixins/helpers.js b/web/app/pods/components/music-tab/mixins/helpers.js index 771211a..6915607 100644 --- a/web/app/pods/components/music-tab/mixins/helpers.js +++ b/web/app/pods/components/music-tab/mixins/helpers.js @@ -14,7 +14,7 @@ const { export default Mixin.create({ classNames: ['col-sm-10', 'col-sm-offset-1', 'col-xs-12'], classNameBindings: ['active::hidden'], - elementId: 'musicTab', + elementId: 'music-tab', dancer: null, @@ -124,7 +124,6 @@ export default Mixin.create({ paused: false, // audio: playing or paused playing: false, - fadeOutNotification: false, songBeatPreferences: {}, usingBeatPreferences: false, oldBeatPrefCache: null, @@ -236,14 +235,14 @@ export default Mixin.create({ }), playListAreaClass: computed('dragging', 'draggingOverPlayListArea', 'dimmerOn', function(){ - let classes = 'cursorPointer'; + let classes = 'pointer'; if(this.get('dragging')){ - classes += ' dragHereHighlight'; + classes += ' drag-here-highlight'; } if(this.get('draggingOverPlayListArea')){ - classes += ' draggingOver'; + classes += ' dragging-over'; } if(this.get('dimmerOn')){ @@ -258,7 +257,7 @@ export default Mixin.create({ }), volumeMutedClass: computed('volumeMuted', function(){ - let classes = 'playerControllIcon volumeButton'; + let classes = 'player-control-icon volumeButton'; if(this.get('volumeMuted')){ classes += ' active'; @@ -268,19 +267,19 @@ export default Mixin.create({ }), usingLocalAudioClass: computed('usingLocalAudio', function(){ - return this.get('usingLocalAudio') ? 'playerControllIcon active' : 'playerControllIcon'; + return this.get('usingLocalAudio') ? 'player-control-icon active' : 'player-control-icon'; }), usingMicAudioClass: computed('usingMicAudio', function(){ - return this.get('usingMicAudio') ? 'playerControllIcon active' : 'playerControllIcon'; + return this.get('usingMicAudio') ? 'player-control-icon active' : 'player-control-icon'; }), repeatClass: computed('repeat', function(){ - return this.get('repeat') !== 0 ? 'playerControllIcon active' : 'playerControllIcon'; + return this.get('repeat') !== 0 ? 'player-control-icon active' : 'player-control-icon'; }), shuffleClass: computed('shuffle', function(){ - return this.get('shuffle') ? 'playerControllIcon active' : 'playerControllIcon'; + return this.get('shuffle') ? 'player-control-icon active' : 'player-control-icon'; }), volumeIcon: computed('volumeMuted', 'volume', function() { diff --git a/web/app/pods/components/music-tab/mixins/visualizer.js b/web/app/pods/components/music-tab/mixins/visualizer.js index f6c5fa4..17dcfe2 100644 --- a/web/app/pods/components/music-tab/mixins/visualizer.js +++ b/web/app/pods/components/music-tab/mixins/visualizer.js @@ -27,7 +27,7 @@ export default Mixin.create({ didInsertElement(){ let dancer = this.get('dancer'), canvas = $('#visualization')[0], - playerArea = $('#playerArea'), + playerArea = $('#player-area'), ctx = canvas.getContext('2d'), spacing = 2, h = playerArea.height(), w; diff --git a/web/app/pods/components/music-tab/template.hbs b/web/app/pods/components/music-tab/template.hbs index 5781331..c0d6308 100644 --- a/web/app/pods/components/music-tab/template.hbs +++ b/web/app/pods/components/music-tab/template.hbs @@ -1,45 +1,45 @@
{{/if}}
-
- {{paper-icon icon="remove-red-eye" class="playerControllIcon"}}
+
+ {{paper-icon icon="remove-red-eye" class="player-control-icon"}}
-