I hate footers
This commit is contained in:
parent
e525a9bad6
commit
ab3be00fc0
5 changed files with 46 additions and 18 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
import Em from 'ember';
|
import Em from 'ember';
|
||||||
|
|
||||||
export default Em.Component.extend({
|
export default Em.Component.extend({
|
||||||
|
classNames: ['bridgeControls', 'maxHeight'],
|
||||||
|
|
||||||
bridgeIp: null,
|
bridgeIp: null,
|
||||||
manualBridgeIp: null,
|
manualBridgeIp: null,
|
||||||
bridgeUsername: null,
|
bridgeUsername: null,
|
||||||
|
|
@ -22,6 +24,10 @@ export default Em.Component.extend({
|
||||||
this.doUpdateGroupsData();
|
this.doUpdateGroupsData();
|
||||||
this.set('lightsDataIntervalHandle', setInterval(this.updateLightData.bind(this), 1000));
|
this.set('lightsDataIntervalHandle', setInterval(this.updateLightData.bind(this), 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (localStorage.getItem('huegasm.selectedTab')) {
|
||||||
|
this.set('selectedTab', Number(localStorage.getItem('huegasm.selectedTab')));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onUpdateGroupsDataChange: function(){
|
onUpdateGroupsDataChange: function(){
|
||||||
|
|
@ -43,7 +49,7 @@ export default Em.Component.extend({
|
||||||
this.toggleProperty('updateGroupsData');
|
this.toggleProperty('updateGroupsData');
|
||||||
},
|
},
|
||||||
|
|
||||||
tabList: ["Music", "Lights"],
|
tabList: ["Lights", "Music"],
|
||||||
selectedTab: 0,
|
selectedTab: 0,
|
||||||
tabData: function(){
|
tabData: function(){
|
||||||
var tabData = [], selectedTab = this.get('selectedTab');
|
var tabData = [], selectedTab = this.get('selectedTab');
|
||||||
|
|
@ -61,12 +67,14 @@ export default Em.Component.extend({
|
||||||
return tabData;
|
return tabData;
|
||||||
}.property('tabList', 'selectedTab'),
|
}.property('tabList', 'selectedTab'),
|
||||||
|
|
||||||
lightsTabSelected: Em.computed.equal('selectedTab', 1),
|
lightsTabSelected: Em.computed.equal('selectedTab', 0),
|
||||||
musicTabSelected: Em.computed.equal('selectedTab', 0),
|
musicTabSelected: Em.computed.equal('selectedTab', 1),
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
changeTab: function(tabName){
|
changeTab: function(tabName){
|
||||||
this.set('selectedTab', this.get('tabList').indexOf(tabName));
|
var index = this.get('tabList').indexOf(tabName)
|
||||||
|
this.set('selectedTab', index);
|
||||||
|
localStorage.setItem('huegasm.selectedTab', index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import Em from 'ember';
|
import Em from 'ember';
|
||||||
|
|
||||||
export default Em.Component.extend({
|
export default Em.Component.extend({
|
||||||
|
classNames: ['maxHeight'],
|
||||||
bridgeIp: null,
|
bridgeIp: null,
|
||||||
|
|
||||||
bridgeUsername: null,
|
bridgeUsername: null,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
|
// TODO: more elegant way to disable the automatic colapsing?
|
||||||
|
$locked-breakpoint: 800px !important;
|
||||||
|
|
||||||
@import 'ember-paper';
|
@import 'ember-paper';
|
||||||
@import 'bower_components/bootstrap-sass/assets/stylesheets/_bootstrap';
|
@import 'bower_components/bootstrap-sass/assets/stylesheets/_bootstrap';
|
||||||
@import 'ember-modal-dialog/ember-modal-structure';
|
@import 'ember-modal-dialog/ember-modal-structure';
|
||||||
@import 'ember-modal-dialog/ember-modal-appearance';
|
@import 'ember-modal-dialog/ember-modal-appearance';
|
||||||
|
|
||||||
|
|
||||||
$playerBackColor: #F12B24;
|
$playerBackColor: #F12B24;
|
||||||
$playerHeight: 400px;
|
$playerHeight: 400px;
|
||||||
$playerBeatAreaHeight: 320px;
|
$playerBeatAreaHeight: 320px;
|
||||||
|
|
@ -10,8 +14,18 @@ $playListBackgroundColor: #1E1E1E;
|
||||||
$playerDefaultIconColor: #BBBBBB;
|
$playerDefaultIconColor: #BBBBBB;
|
||||||
|
|
||||||
// BRIDGE FINDER
|
// BRIDGE FINDER
|
||||||
.footerFixed {
|
html, body {
|
||||||
position: static !important;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.maxHeight {
|
||||||
|
height: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
.ember-app {
|
||||||
|
padding-bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
|
@ -22,7 +36,7 @@ $playerDefaultIconColor: #BBBBBB;
|
||||||
|
|
||||||
.footer .text-muted {
|
.footer .text-muted {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin-top: 30px;
|
margin-top: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,10 +76,15 @@ md-progress-circular {
|
||||||
}
|
}
|
||||||
|
|
||||||
md-content {
|
md-content {
|
||||||
max-width: 800px;
|
margin: 0 auto 0 auto;
|
||||||
|
max-width: 1000px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// BRIDGE CONTROLS
|
// BRIDGE CONTROLS
|
||||||
|
.bridgeControls {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
.navigation {
|
.navigation {
|
||||||
margin: 0 auto 0 auto;
|
margin: 0 auto 0 auto;
|
||||||
padding: 30px 0 30px 0;
|
padding: 30px 0 30px 0;
|
||||||
|
|
@ -174,9 +193,9 @@ md-toolbar {
|
||||||
background-color: inherit !important;
|
background-color: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.innerControlFrame {
|
//.innerControlFrame {
|
||||||
height: 80vh;
|
// height: 100vh;
|
||||||
}
|
//}
|
||||||
|
|
||||||
// GROUP CONTROL
|
// GROUP CONTROL
|
||||||
.groupRow.selectedRow {
|
.groupRow.selectedRow {
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#liquid-if lightsTabSelected class="tabSwitch"}}
|
{{#if lightsTabSelected class="tabSwitch"}}
|
||||||
{{controls/light-control apiURL=apiURL lightsData=lightsData activeLights=activeLights trial=trial}}
|
{{controls/light-control apiURL=apiURL lightsData=lightsData activeLights=activeLights trial=trial}}
|
||||||
{{/liquid-if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#liquid-if musicTabSelected class="tabSwitch"}}
|
{{#if musicTabSelected class="tabSwitch"}}
|
||||||
{{controls/music-control apiURL=apiURL lightsData=lightsData activeLights=activeLights}}
|
{{controls/music-control apiURL=apiURL lightsData=lightsData activeLights=activeLights}}
|
||||||
{{/liquid-if}}
|
{{/if}}
|
||||||
{{huegasm-footer classNames="footerFixed"}}
|
|
||||||
{{/paper-content}}
|
{{/paper-content}}
|
||||||
{{/paper-nav-container}}
|
{{/paper-nav-container}}
|
||||||
|
{{huegasm-footer}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{{#liquid-if bridgeUsername}}
|
{{#if bridgeUsername}}
|
||||||
{{bridge-controls bridgeIp=bridgeIp bridgeUsername=bridgeUsername trial=trial}}
|
{{bridge-controls bridgeIp=bridgeIp bridgeUsername=bridgeUsername trial=trial}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{bridge-finder bridgeIp=bridgeIp bridgeUsername=bridgeUsername trial=trial}}
|
{{bridge-finder bridgeIp=bridgeIp bridgeUsername=bridgeUsername trial=trial}}
|
||||||
{{/liquid-if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#unless bridgeUsername}}
|
{{#unless bridgeUsername}}
|
||||||
{{huegasm-footer}}
|
{{huegasm-footer}}
|
||||||
|
|
|
||||||
Reference in a new issue