larger album art, bug fixes

This commit is contained in:
lone-cloud 2015-11-06 23:44:00 -08:00
parent 33fb0af7d4
commit 493a89ad7f
6 changed files with 44 additions and 8 deletions

View file

@ -23,18 +23,22 @@ export default Em.Component.extend({
dimmerOnClass: function(){
var dimmerOn = this.get('dimmerOn'),
storage = this.get('storage');
storage = this.get('storage'),
dimmerOnClass = null;
if(dimmerOn){
Em.$('body').addClass('dimmerOn');
Em.$('html').addClass('dimmerOn');
dimmerOnClass = 'active';
} else {
Em.$('body').removeClass('dimmerOn');
Em.$('html').removeClass('dimmerOn');
}
storage.set('huegasm.dimmerOn', dimmerOn);
}.observes('dimmerOn'),
return dimmerOnClass;
}.property('dimmerOn'),
init(){
this._super();

View file

@ -18,6 +18,6 @@
{{/if}}
<footer id="footer">
<p><span class="relative"><span id="dimmerWrapper" {{action "toggleDimmer"}}>
<p><span class="relative"><span id="dimmerWrapper" {{action "toggleDimmer"}} class={{dimmerOnClass}}>
</span>Made by <a href="//egorphilippov.me">egorphilippov.me</a> © 2015 Huegasm</span></p>
</footer>

View file

@ -44,7 +44,7 @@ export default Em.Component.extend(helperMixin, visualizerMixin, {
var picture = null;
if(result.artwork_url){
picture = result.artwork_url;
picture = result.artwork_url.replace('large', 't67x67');
} else if(result.user.avatar_url){
picture = result.user.avatar_url;
}

View file

@ -138,6 +138,25 @@ export default Em.Mixin.create({
storage: null,
firstVisit: true,
largeArtworkPic: function(){
var pic = null,
currentVisName = this.get('currentVisName'),
usingMicAudio = this.get('usingMicAudio'),
playQueuePointer = this.get('playQueuePointer'),
playQueue = this.get('playQueue');
if(playQueuePointer !== -1 && !usingMicAudio && currentVisName === 'None'){
var song = playQueue[playQueuePointer];
if(song.scUrl){
pic = song.picture.replace('67x67', '500x500');
} else {
pic = song.picture;
}
}
return pic;
}.property('playQueuePointer', 'usingMicAudio', 'currentVisName'),
// used to insure that we don't replay the same thing multiple times in shuffle mode
shufflePlayed: [],
pauseLightUpdates: function(){

View file

@ -1,7 +1,8 @@
<div class="row" id="step1">
<div id="playerArea" class="col-sm-8 col-xs-12 {{if (eq "None" currentVisName) "displayIcon"}}" {{action "playerAreaPlay"}}>
<canvas id="visualization"></canvas>
<div id="playNotification" class="material-icons {{if fadeOutNotification "fadeOut"}} {{if playing "play-arrow" "pause"}}"></div>
<canvas id="visualization"></canvas>
<div id="artwork"><img src={{largeArtworkPic}}></div>
<div id="playNotification" class="material-icons {{if fadeOutNotification "fadeOut"}} {{if playing "play-arrow" "pause"}}"></div>
<div id="playerControls">
{{#if usingLocalAudio}}
@ -160,7 +161,7 @@
</div>
{{/if}}
<div id="lightOption" class="beatOption {{if usingMicAudio "col-xs-4" "col-xs-8"}}">
<div id="lightOption" class="beatOption {{if usingMicAudio "col-xs-4" "col-sm-4 col-xs-8"}}">
<span data-toggle="tooltip" data-placement="bottom auto" data-title="Quickly flash the lights on beat" class="bootstrapTooltip" {{action "hideTooltip" on="mouseLeave"}}>
{{#paper-checkbox checked=flashingTransitions}}Flashing Transitions{{/paper-checkbox}}
</span>

View file

@ -1071,7 +1071,19 @@ div.ember-modal-dialog {
}
.displayIcon {
background:url(/favicon-96x96.png) center center no-repeat;
background: url(/favicon-96x96.png) center center no-repeat;
background-size: 80px 80px;
}
#artwork {
position: absolute;
width: 100%;
overflow: hidden;
img {
display: block;
margin: 0 auto;
max-height: 400px;
}
}
.keyboard-arrow-down {