prettier light-group, text version of bulbs, tests? lol
This commit is contained in:
parent
0daa074f0a
commit
4b452de321
57 changed files with 193 additions and 13412 deletions
|
|
@ -13,13 +13,29 @@ const {
|
|||
export default Component.extend({
|
||||
classNames: ['container-fluid'],
|
||||
elementId: 'hue-controls',
|
||||
lightsData: null,
|
||||
lightsData: {
|
||||
1: {
|
||||
modelid: 'LCT001',
|
||||
name: 'light 1',
|
||||
state: {
|
||||
reachable: true
|
||||
}
|
||||
},
|
||||
2: {
|
||||
name: 'teeeeeeeeeest',
|
||||
modelid: 'LCT002',
|
||||
state: {
|
||||
reachable: true
|
||||
}
|
||||
}
|
||||
},
|
||||
activeLights: A(),
|
||||
tabList: ["Lights", "Music"],
|
||||
selectedTab: 1,
|
||||
pauseLightUpdates: false,
|
||||
|
||||
dimmerOn: false,
|
||||
lightsIconsOn: true,
|
||||
playing: false,
|
||||
|
||||
displayFailure: true,
|
||||
|
|
@ -84,18 +100,14 @@ export default Component.extend({
|
|||
this.get('dimmerOnClass');
|
||||
}
|
||||
|
||||
if (!isNone(storage.get('huegasm.lightsIconsOn'))) {
|
||||
this.set('lightsIconsOn', storage.get('huegasm.lightsIconsOn'));
|
||||
}
|
||||
|
||||
if (!isNone(this.get('storage').get('huegasm.selectedTab'))) {
|
||||
this.set('selectedTab', this.get('storage').get('huegasm.selectedTab'));
|
||||
}
|
||||
|
||||
// document.addEventListener('deviceready', () => {
|
||||
// cordova.plugins.backgroundMode.setDefaults({
|
||||
// silent: true
|
||||
// });
|
||||
//
|
||||
// cordova.plugins.backgroundMode.enable();
|
||||
// }, false);
|
||||
|
||||
document.addEventListener('backbutton', () => {
|
||||
if(this.get('isShowingAddSoundCloudModal')){
|
||||
this.set('isShowingAddSoundCloudModal', false);
|
||||
|
|
@ -260,6 +272,13 @@ export default Component.extend({
|
|||
},
|
||||
toggleDimmer(){
|
||||
this.toggleProperty('dimmerOn');
|
||||
},
|
||||
toggleLightsIcons() {
|
||||
this.toggleProperty('lightsIconsOn');
|
||||
|
||||
let lightsIconsOn = this.get('lightsIconsOn');
|
||||
|
||||
this.get('storage').set('huegasm.lightsIconsOn', lightsIconsOn);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,7 +12,11 @@
|
|||
{{/menu.trigger}}
|
||||
{{#menu.content width=3 as |content|}}
|
||||
{{#content.menu-item onClick="toggleDimmer"}}
|
||||
{{paper-icon "lightbulb outline" class=dimmerOnClass}} Dark Mode: {{if dimmerOn "On" "Off"}}
|
||||
{{paper-icon "highlight" class=dimmerOnClass}} Dark Mode: <strong>{{if dimmerOn "On" "Off"}}</strong>
|
||||
{{/content.menu-item}}
|
||||
|
||||
{{#content.menu-item onClick="toggleLightsIcons"}}
|
||||
{{paper-icon "lightbulb outline" class=dimmerOnClass}} Active Lights: <strong>{{if lightsIconsOn "Icons" "Text"}}</strong>
|
||||
{{/content.menu-item}}
|
||||
|
||||
{{#content.menu-item onClick="clearBridge"}}
|
||||
|
|
@ -31,7 +35,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
{{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn storage=storage}}
|
||||
{{light-group lightsData=lightsData activeLights=activeLights syncLight=syncLight apiURL=apiURL dimmerOn=dimmerOn lightsIconsOn=lightsIconsOn storage=storage}}
|
||||
|
||||
<div id="huegasm-content">
|
||||
{{lights-tab active=(eq selectedTab 0) apiURL=apiURL lightsData=lightsData activeLights=activeLights syncLight=syncLight trial=trial colorLoopOn=colorLoopOn dimmerOn=dimmerOn playing=playing pauseLightUpdates=pauseLightUpdates}}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const {
|
|||
|
||||
export default Component.extend({
|
||||
elementId: 'active-lights',
|
||||
classNames: ['light-group', 'horizontal-light-group'],
|
||||
classNames: ['light-group'],
|
||||
activeLights: A(),
|
||||
|
||||
// list of all the lights in the hue system
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
{{#each lightsList as |light|}}
|
||||
<div class="{{light.activeClass}} light{{light.id}}" data-toggle="tooltip" data-placement="top auto" {{action "clickLight" light.id}}>
|
||||
<img class="hueLight" width="40" src="assets/images/lights/{{light.type}}.svg">
|
||||
</div>
|
||||
{{#if lightsIconsOn}}
|
||||
<div class="{{light.activeClass}} bootstrap-tooltip toggleable-light" data-toggle="tooltip" data-placement="top auto" data-title={{light.name}} {{action "clickLight" light.id}}>
|
||||
<img class="hueLight" width="40" src="assets/images/lights/{{light.type}}.svg">
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="{{light.activeClass}} light-text toggleable-light" {{action "clickLight" light.id}}>
|
||||
<div class="light-text-content">{{light.name}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
2
mobile/app/styles/bootstrap.scss
vendored
2
mobile/app/styles/bootstrap.scss
vendored
|
|
@ -11,7 +11,7 @@
|
|||
// Reset and dependencies
|
||||
@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/normalize";
|
||||
//@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/print";
|
||||
//@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/glyphicons";
|
||||
@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/glyphicons";
|
||||
|
||||
// Core CSS
|
||||
@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/scaffolding";
|
||||
|
|
|
|||
|
|
@ -1,34 +1,38 @@
|
|||
.light-group {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
div {
|
||||
display: inline-block;
|
||||
}
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.toggleable-light {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
border-radius: 30%;
|
||||
border: 2px solid $whitish;
|
||||
margin: 0 2px;
|
||||
display: flex;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.light-inactive {
|
||||
position: relative;
|
||||
border-color: rgba($secondaryThemeColor, 0.4);
|
||||
}
|
||||
|
||||
.light-inactive::before {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
content: "X";
|
||||
top: -10px;
|
||||
left: 5px;
|
||||
top: -5px;
|
||||
content: "\e014";
|
||||
font-family: 'Glyphicons Halflings';
|
||||
font-size: 40px;
|
||||
color: rgba(255, 0, 0, 0.37);
|
||||
font-family: Tahoma, Geneva, sans-serif;
|
||||
}
|
||||
|
||||
.horizontal-light-group {
|
||||
.light-inactive::before {
|
||||
top: -9px;
|
||||
left: 6px;
|
||||
}
|
||||
color: rgba($secondaryThemeColor, 0.6);
|
||||
}
|
||||
|
||||
.light-active {
|
||||
border-color: rgba(green, 0.4);
|
||||
img {
|
||||
transition-duration: 0.3s;
|
||||
transition-property: transform;
|
||||
|
|
@ -43,3 +47,21 @@
|
|||
.remove-button {
|
||||
margin: 10px 0 10px 60px;
|
||||
}
|
||||
|
||||
.light-text {
|
||||
width: 60px;
|
||||
word-wrap: break-word;
|
||||
padding: 0 10px;
|
||||
&.light-inactive::before {
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.light-text-content {
|
||||
display: block;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
|
@ -269,15 +269,6 @@
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
#beat-area .light-group {
|
||||
margin: 10px 20px 0 40px;
|
||||
float: right;
|
||||
div {
|
||||
display: block;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
#add-music-choices {
|
||||
min-width: initial;
|
||||
right: 0;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
/* global require, module */
|
||||
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
var Funnel = require('broccoli-funnel');
|
||||
|
||||
module.exports = function(defaults) {
|
||||
var app = new EmberApp(defaults);
|
||||
var extraAssets = new Funnel('bower_components/bootstrap-sass/assets/fonts/bootstrap/', {
|
||||
srcDir: '/',
|
||||
include: ['**'],
|
||||
destDir: '/fonts/bootstrap'
|
||||
});
|
||||
|
||||
app.import('vendor/dancer.js');
|
||||
|
||||
|
|
@ -15,5 +21,5 @@ module.exports = function(defaults) {
|
|||
app.import('bower_components/perfect-scrollbar/js/perfect-scrollbar.js');
|
||||
app.import('bower_components/perfect-scrollbar/css/perfect-scrollbar.css');
|
||||
|
||||
return app.toTree();
|
||||
return app.toTree(extraAssets);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,14 +30,13 @@
|
|||
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
|
||||
"ember-cli-inject-live-reload": "^1.3.1",
|
||||
"ember-cli-nouislider": "^0.11.0",
|
||||
"ember-cli-qunit": "^1.2.1",
|
||||
"ember-cli-release": "^0.2.8",
|
||||
"ember-cli-shims": "^1.0.2",
|
||||
"ember-cli-sass": "^6.0.0",
|
||||
"ember-cli-sri": "^2.1.0",
|
||||
"ember-cli-test-loader": "^1.1.0",
|
||||
"ember-cli-uglify": "^1.2.0",
|
||||
"ember-cordova": "^0.3.13",
|
||||
"ember-cordova": "^0.4.0",
|
||||
"ember-export-application-global": "^1.0.4",
|
||||
"ember-load-initializers": "^0.6.3",
|
||||
"ember-modal-dialog": "^0.9.0",
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
/*jshint node:true*/
|
||||
module.exports = {
|
||||
"framework": "qunit",
|
||||
"test_page": "tests/index.html?hidepassed",
|
||||
"disable_watching": true,
|
||||
"launch_in_ci": [
|
||||
"PhantomJS"
|
||||
],
|
||||
"launch_in_dev": [
|
||||
"PhantomJS",
|
||||
"Chrome"
|
||||
]
|
||||
};
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
{
|
||||
"predef": [
|
||||
"document",
|
||||
"window",
|
||||
"location",
|
||||
"setTimeout",
|
||||
"$",
|
||||
"-Promise",
|
||||
"define",
|
||||
"console",
|
||||
"visit",
|
||||
"exists",
|
||||
"fillIn",
|
||||
"click",
|
||||
"keyEvent",
|
||||
"triggerEvent",
|
||||
"find",
|
||||
"findWithAssert",
|
||||
"wait",
|
||||
"DS",
|
||||
"andThen",
|
||||
"currentURL",
|
||||
"currentPath",
|
||||
"currentRouteName"
|
||||
],
|
||||
"node": false,
|
||||
"browser": false,
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"debug": false,
|
||||
"devel": false,
|
||||
"eqeqeq": true,
|
||||
"evil": true,
|
||||
"forin": false,
|
||||
"immed": false,
|
||||
"laxbreak": false,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": false,
|
||||
"nonew": false,
|
||||
"nomen": false,
|
||||
"onevar": false,
|
||||
"plusplus": false,
|
||||
"regexp": false,
|
||||
"undef": true,
|
||||
"sub": true,
|
||||
"strict": false,
|
||||
"white": false,
|
||||
"eqnull": true,
|
||||
"esversion": 6,
|
||||
"unused": true
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default function destroyApp(application) {
|
||||
Ember.run(application, 'destroy');
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
import { module } from 'qunit';
|
||||
import Ember from 'ember';
|
||||
import startApp from '../helpers/start-app';
|
||||
import destroyApp from '../helpers/destroy-app';
|
||||
|
||||
const { RSVP: { Promise } } = Ember;
|
||||
|
||||
export default function(name, options = {}) {
|
||||
module(name, {
|
||||
beforeEach() {
|
||||
this.application = startApp();
|
||||
|
||||
if (options.beforeEach) {
|
||||
return options.beforeEach.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
|
||||
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import Resolver from '../../resolver';
|
||||
import config from '../../config/environment';
|
||||
|
||||
const resolver = Resolver.create();
|
||||
|
||||
resolver.namespace = {
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix
|
||||
};
|
||||
|
||||
export default resolver;
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
import Application from '../../app';
|
||||
import config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
let application;
|
||||
|
||||
let attributes = Ember.merge({}, config.APP);
|
||||
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
||||
|
||||
Ember.run(() => {
|
||||
application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
});
|
||||
|
||||
return application;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Huegasm Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
{{content-for "test-head"}}
|
||||
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/huegasm.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
{{content-for "test-head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<script src="/testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/huegasm.js"></script>
|
||||
<script src="{{rootURL}}assets/tests.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
{{content-for "test-body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('add-soundcloud-sound-modal', 'Integration | Component | add soundcloud sound modal', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{add-soundcloud-sound-modal}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#add-soundcloud-sound-modal}}
|
||||
template block text
|
||||
{{/add-soundcloud-sound-modal}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('bridge-finder', 'Integration | Component | bridge finder', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{bridge-finder}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#bridge-finder}}
|
||||
template block text
|
||||
{{/bridge-finder}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('color-picker', 'Integration | Component | color picker', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{color-picker}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#color-picker}}
|
||||
template block text
|
||||
{{/color-picker}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('hue-controls', 'Integration | Component | hue controls', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{hue-controls}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#hue-controls}}
|
||||
template block text
|
||||
{{/hue-controls}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('huegasm-app', 'Integration | Component | huegasm app', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{huegasm-app}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#huegasm-app}}
|
||||
template block text
|
||||
{{/huegasm-app}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('light-group', 'Integration | Component | light group', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{light-group}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#light-group}}
|
||||
template block text
|
||||
{{/light-group}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('lights-tab', 'Integration | Component | lights tab', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{lights-tab}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#lights-tab}}
|
||||
template block text
|
||||
{{/lights-tab}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('music-tab', 'Integration | Component | music tab', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{music-tab}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#music-tab}}
|
||||
template block text
|
||||
{{/music-tab}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
import resolver from './helpers/resolver';
|
||||
import {
|
||||
setResolver
|
||||
} from 'ember-qunit';
|
||||
|
||||
setResolver(resolver);
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
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);
|
||||
});
|
||||
74
mobile/vendor/dancer.js
vendored
74
mobile/vendor/dancer.js
vendored
|
|
@ -22,7 +22,7 @@
|
|||
// Loading an Audio element
|
||||
if ( source instanceof HTMLElement ) {
|
||||
this.source = source;
|
||||
// Loading an object with src, [codecs]
|
||||
// Loading an object with src, [codecs]
|
||||
} else if(source instanceof EventTarget){
|
||||
this.source = source;
|
||||
} else {
|
||||
|
|
@ -201,12 +201,12 @@
|
|||
(function ( Dancer ) {
|
||||
|
||||
var CODECS = {
|
||||
'mp3' : 'audio/mpeg;',
|
||||
'ogg' : 'audio/ogg; codecs="vorbis"',
|
||||
'wav' : 'audio/wav; codecs="1"',
|
||||
'aac' : 'audio/mp4; codecs="mp4a.40.2"'
|
||||
},
|
||||
audioEl = document.createElement( 'audio' );
|
||||
'mp3' : 'audio/mpeg;',
|
||||
'ogg' : 'audio/ogg; codecs="vorbis"',
|
||||
'wav' : 'audio/wav; codecs="1"',
|
||||
'aac' : 'audio/mp4; codecs="mp4a.40.2"'
|
||||
},
|
||||
audioEl = document.createElement( 'audio' );
|
||||
|
||||
Dancer.options = {};
|
||||
|
||||
|
|
@ -231,9 +231,9 @@
|
|||
Dancer.canPlay = function ( type ) {
|
||||
var canPlay = audioEl.canPlayType;
|
||||
return !!(
|
||||
type.toLowerCase() === 'mp3' ||
|
||||
audioEl.canPlayType &&
|
||||
audioEl.canPlayType( CODECS[ type.toLowerCase() ] ).replace( /no/, ''));
|
||||
type.toLowerCase() === 'mp3' ||
|
||||
audioEl.canPlayType &&
|
||||
audioEl.canPlayType( CODECS[ type.toLowerCase() ] ).replace( /no/, ''));
|
||||
};
|
||||
|
||||
Dancer.addPlugin = function ( name, fn ) {
|
||||
|
|
@ -380,7 +380,13 @@
|
|||
SAMPLE_RATE = 44100;
|
||||
|
||||
var adapter = function ( dancer ) {
|
||||
var context = new AudioContext();
|
||||
var context;
|
||||
|
||||
if('webkitAudioContext' in window) {
|
||||
context = new webkitAudioContext();
|
||||
} else {
|
||||
context = new AudioContext();
|
||||
}
|
||||
|
||||
this.dancer = dancer;
|
||||
this.audio = new Audio();
|
||||
|
|
@ -565,14 +571,14 @@ function FourierTransform(bufferSize, sampleRate, boost) {
|
|||
|
||||
this.calculateSpectrum = function() {
|
||||
var spectrum = this.spectrum,
|
||||
real = this.real,
|
||||
imag = this.imag,
|
||||
boost = this.boost,
|
||||
bSi = 2 / this.bufferSize,
|
||||
sqrt = Math.sqrt,
|
||||
rval,
|
||||
ival,
|
||||
mag;
|
||||
real = this.real,
|
||||
imag = this.imag,
|
||||
boost = this.boost,
|
||||
bSi = 2 / this.bufferSize,
|
||||
sqrt = Math.sqrt,
|
||||
rval,
|
||||
ival,
|
||||
mag;
|
||||
|
||||
for (var i = 0, N = bufferSize/2; i < N; i++) {
|
||||
rval = real[i];
|
||||
|
|
@ -638,12 +644,12 @@ function FFT(bufferSize, sampleRate, boost) {
|
|||
FFT.prototype.forward = function(buffer) {
|
||||
// Locally scope variables for speed up
|
||||
var bufferSize = this.bufferSize,
|
||||
cosTable = this.cosTable,
|
||||
sinTable = this.sinTable,
|
||||
reverseTable = this.reverseTable,
|
||||
real = this.real,
|
||||
imag = this.imag,
|
||||
spectrum = this.spectrum;
|
||||
cosTable = this.cosTable,
|
||||
sinTable = this.sinTable,
|
||||
reverseTable = this.reverseTable,
|
||||
real = this.real,
|
||||
imag = this.imag,
|
||||
spectrum = this.spectrum;
|
||||
|
||||
var k = Math.floor(Math.log(bufferSize) / Math.LN2);
|
||||
|
||||
|
|
@ -651,15 +657,15 @@ FFT.prototype.forward = function(buffer) {
|
|||
if (bufferSize !== buffer.length) { throw "Supplied buffer is not the same size as defined FFT. FFT Size: " + bufferSize + " Buffer Size: " + buffer.length; }
|
||||
|
||||
var halfSize = 1,
|
||||
phaseShiftStepReal,
|
||||
phaseShiftStepImag,
|
||||
currentPhaseShiftReal,
|
||||
currentPhaseShiftImag,
|
||||
off,
|
||||
tr,
|
||||
ti,
|
||||
tmpReal,
|
||||
i;
|
||||
phaseShiftStepReal,
|
||||
phaseShiftStepImag,
|
||||
currentPhaseShiftReal,
|
||||
currentPhaseShiftImag,
|
||||
off,
|
||||
tr,
|
||||
ti,
|
||||
tmpReal,
|
||||
i;
|
||||
|
||||
for (i = 0; i < bufferSize; i++) {
|
||||
real[i] = buffer[reverseTable[i]];
|
||||
|
|
|
|||
7160
mobile/yarn.lock
7160
mobile/yarn.lock
File diff suppressed because it is too large
Load diff
|
|
@ -14,7 +14,22 @@ const {
|
|||
export default Component.extend({
|
||||
classNames: ['container-fluid'],
|
||||
elementId: 'hue-controls',
|
||||
lightsData: null,
|
||||
lightsData: {
|
||||
1: {
|
||||
modelid: 'LCT001',
|
||||
name: 'light 1',
|
||||
state: {
|
||||
reachable: true
|
||||
}
|
||||
},
|
||||
2: {
|
||||
name: 'teeeeeeeeeest',
|
||||
modelid: 'LCT002',
|
||||
state: {
|
||||
reachable: true
|
||||
}
|
||||
}
|
||||
},
|
||||
activeLights: A(),
|
||||
tabList: ["Lights", "Music"],
|
||||
selectedTab: 1,
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{{#each lightsList as |light|}}
|
||||
{{#if lightsIconsOn}}
|
||||
<div class="{{light.activeClass}} bootstrap-tooltip light{{light.id}}" data-toggle="tooltip" data-placement="top auto" data-title={{light.name}} {{action "clickLight" light.id}} {{action "lightStartHover" light.id on="mouseEnter"}} {{action "lightStopHover" light.id on="mouseLeave"}}>
|
||||
<div class="{{light.activeClass}} bootstrap-tooltip toggleable-light" data-toggle="tooltip" data-placement="top auto" data-title={{light.name}} {{action "clickLight" light.id}} {{action "lightStartHover" light.id on="mouseEnter"}} {{action "lightStopHover" light.id on="mouseLeave"}}>
|
||||
<img class="hueLight" width="40" src="assets/images/lights/{{light.type}}.svg">
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="{{light.activeClass}} light-text light{{light.id}}" {{action "clickLight" light.id}} {{action "lightStartHover" light.id on="mouseEnter"}} {{action "lightStopHover" light.id on="mouseLeave"}}>
|
||||
{{light.name}}
|
||||
<div class="{{light.activeClass}} light-text toggleable-light" {{action "clickLight" light.id}} {{action "lightStartHover" light.id on="mouseEnter"}} {{action "lightStopHover" light.id on="mouseLeave"}}>
|
||||
<div class="light-text-content">{{light.name}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
2
web/app/styles/bootstrap.scss
vendored
2
web/app/styles/bootstrap.scss
vendored
|
|
@ -11,7 +11,7 @@
|
|||
// Reset and dependencies
|
||||
@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/normalize";
|
||||
//@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/print";
|
||||
//@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/glyphicons";
|
||||
@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/glyphicons";
|
||||
|
||||
// Core CSS
|
||||
@import "bower_components/bootstrap-sass/assets/stylesheets/bootstrap/scaffolding";
|
||||
|
|
|
|||
|
|
@ -7,36 +7,42 @@
|
|||
margin-top: 1px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
div {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.toggleable-light {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
border-radius: 30%;
|
||||
border: 2px solid $whitish;
|
||||
margin: 0 2px;
|
||||
display: flex;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.light-inactive {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
border-color: rgba($secondaryThemeColor, 0.4);
|
||||
}
|
||||
|
||||
.light-inactive::before {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: -9px;
|
||||
left: 6px;
|
||||
content: "X";
|
||||
top: -5px;
|
||||
content: "\e014";
|
||||
font-family: 'Glyphicons Halflings';
|
||||
font-size: 40px;
|
||||
color: rgba(255, 0, 0, 0.37);
|
||||
font-family: cursive;
|
||||
color: rgba($secondaryThemeColor, 0.6);
|
||||
}
|
||||
|
||||
.light-active {
|
||||
cursor: pointer;
|
||||
border-color: rgba(green, 0.4);
|
||||
img {
|
||||
transition-duration: 0.3s;
|
||||
transition-property: transform;
|
||||
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
|
||||
}
|
||||
img:hover {
|
||||
-webkit-transform: scale(1.2);
|
||||
transform: scale(1.2);
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +59,13 @@
|
|||
width: 60px;
|
||||
word-wrap: break-word;
|
||||
padding: 0 10px;
|
||||
&.light-inactive::before {
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.light-text-content {
|
||||
display: block; /* Fallback for non-webkit */
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
|
@ -1,8 +1,14 @@
|
|||
/* global require, module */
|
||||
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
var Funnel = require('broccoli-funnel');
|
||||
|
||||
module.exports = function(defaults) {
|
||||
var app = new EmberApp(defaults);
|
||||
var extraAssets = new Funnel('bower_components/bootstrap-sass/assets/fonts/bootstrap/', {
|
||||
srcDir: '/',
|
||||
include: ['**'],
|
||||
destDir: '/fonts/bootstrap'
|
||||
});
|
||||
|
||||
app.import('vendor/dancer.js');
|
||||
|
||||
|
|
@ -15,5 +21,5 @@ module.exports = function(defaults) {
|
|||
app.import('bower_components/locallyjs/dist/locally.min.js');
|
||||
app.import('bower_components/velocity/velocity.js');
|
||||
|
||||
return app.toTree();
|
||||
return app.toTree(extraAssets);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
|
||||
"ember-cli-inject-live-reload": "^1.3.1",
|
||||
"ember-cli-nouislider": "^0.11.0",
|
||||
"ember-cli-qunit": "^1.2.1",
|
||||
"ember-cli-release": "0.2.8",
|
||||
"ember-cli-shims": "^1.0.2",
|
||||
"ember-cli-sass": "^6.0.0",
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
/*jshint node:true*/
|
||||
module.exports = {
|
||||
"framework": "qunit",
|
||||
"test_page": "tests/index.html?hidepassed",
|
||||
"disable_watching": true,
|
||||
"launch_in_ci": [
|
||||
"PhantomJS"
|
||||
],
|
||||
"launch_in_dev": [
|
||||
"PhantomJS",
|
||||
"Chrome"
|
||||
]
|
||||
};
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
{
|
||||
"predef": [
|
||||
"document",
|
||||
"window",
|
||||
"location",
|
||||
"setTimeout",
|
||||
"$",
|
||||
"-Promise",
|
||||
"define",
|
||||
"console",
|
||||
"visit",
|
||||
"exists",
|
||||
"fillIn",
|
||||
"click",
|
||||
"keyEvent",
|
||||
"triggerEvent",
|
||||
"find",
|
||||
"findWithAssert",
|
||||
"wait",
|
||||
"DS",
|
||||
"andThen",
|
||||
"currentURL",
|
||||
"currentPath",
|
||||
"currentRouteName"
|
||||
],
|
||||
"node": false,
|
||||
"browser": false,
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"debug": false,
|
||||
"devel": false,
|
||||
"eqeqeq": true,
|
||||
"evil": true,
|
||||
"forin": false,
|
||||
"immed": false,
|
||||
"laxbreak": false,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": false,
|
||||
"nonew": false,
|
||||
"nomen": false,
|
||||
"onevar": false,
|
||||
"plusplus": false,
|
||||
"regexp": false,
|
||||
"undef": true,
|
||||
"sub": true,
|
||||
"strict": false,
|
||||
"white": false,
|
||||
"eqnull": true,
|
||||
"esversion": 6,
|
||||
"unused": true
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default function destroyApp(application) {
|
||||
Ember.run(application, 'destroy');
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
import { module } from 'qunit';
|
||||
import Ember from 'ember';
|
||||
import startApp from '../helpers/start-app';
|
||||
import destroyApp from '../helpers/destroy-app';
|
||||
|
||||
const { RSVP: { Promise } } = Ember;
|
||||
|
||||
export default function(name, options = {}) {
|
||||
module(name, {
|
||||
beforeEach() {
|
||||
this.application = startApp();
|
||||
|
||||
if (options.beforeEach) {
|
||||
return options.beforeEach.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
afterEach() {
|
||||
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
|
||||
return Promise.resolve(afterEach).then(() => destroyApp(this.application));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
import Resolver from '../../resolver';
|
||||
import config from '../../config/environment';
|
||||
|
||||
const resolver = Resolver.create();
|
||||
|
||||
resolver.namespace = {
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix
|
||||
};
|
||||
|
||||
export default resolver;
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
import Ember from 'ember';
|
||||
import Application from '../../app';
|
||||
import config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
let application;
|
||||
|
||||
let attributes = Ember.merge({}, config.APP);
|
||||
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
||||
|
||||
Ember.run(() => {
|
||||
application = Application.create(attributes);
|
||||
application.setupForTesting();
|
||||
application.injectTestHelpers();
|
||||
});
|
||||
|
||||
return application;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Huegasm Tests</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{content-for "head"}}
|
||||
{{content-for "test-head"}}
|
||||
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/huegasm.css">
|
||||
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
|
||||
|
||||
{{content-for "head-footer"}}
|
||||
{{content-for "test-head-footer"}}
|
||||
</head>
|
||||
<body>
|
||||
{{content-for "body"}}
|
||||
{{content-for "test-body"}}
|
||||
|
||||
<script src="/testem.js" integrity=""></script>
|
||||
<script src="{{rootURL}}assets/vendor.js"></script>
|
||||
<script src="{{rootURL}}assets/test-support.js"></script>
|
||||
<script src="{{rootURL}}assets/huegasm.js"></script>
|
||||
<script src="{{rootURL}}assets/tests.js"></script>
|
||||
|
||||
{{content-for "body-footer"}}
|
||||
{{content-for "test-body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('add-soundcloud-sound-modal', 'Integration | Component | add soundcloud sound modal', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{add-soundcloud-sound-modal}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#add-soundcloud-sound-modal}}
|
||||
template block text
|
||||
{{/add-soundcloud-sound-modal}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('bridge-finder', 'Integration | Component | bridge finder', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{bridge-finder}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#bridge-finder}}
|
||||
template block text
|
||||
{{/bridge-finder}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('color-picker', 'Integration | Component | color picker', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{color-picker}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#color-picker}}
|
||||
template block text
|
||||
{{/color-picker}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('hue-controls', 'Integration | Component | hue controls', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{hue-controls}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#hue-controls}}
|
||||
template block text
|
||||
{{/hue-controls}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('huegasm-app', 'Integration | Component | huegasm app', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{huegasm-app}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#huegasm-app}}
|
||||
template block text
|
||||
{{/huegasm-app}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('light-group', 'Integration | Component | light group', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{light-group}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#light-group}}
|
||||
template block text
|
||||
{{/light-group}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('lights-tab', 'Integration | Component | lights tab', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{lights-tab}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#lights-tab}}
|
||||
template block text
|
||||
{{/lights-tab}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('music-tab', 'Integration | Component | music tab', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{music-tab}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
|
||||
// Template block usage:
|
||||
this.render(hbs`
|
||||
{{#music-tab}}
|
||||
template block text
|
||||
{{/music-tab}}
|
||||
`);
|
||||
|
||||
assert.equal(this.$().text().trim(), 'template block text');
|
||||
});
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
import resolver from './helpers/resolver';
|
||||
import {
|
||||
setResolver
|
||||
} from 'ember-qunit';
|
||||
|
||||
setResolver(resolver);
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
import { moduleFor, test } from 'ember-qunit';
|
||||
|
||||
moduleFor('controller:application', 'Unit | Controller | application', {
|
||||
// Specify the other units that are required for this test.
|
||||
// needs: ['controller:foo']
|
||||
});
|
||||
|
||||
// Replace this with your real tests.
|
||||
test('it exists', function(assert) {
|
||||
let controller = this.subject();
|
||||
assert.ok(controller);
|
||||
});
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
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);
|
||||
});
|
||||
8
web/vendor/dancer.js
vendored
8
web/vendor/dancer.js
vendored
|
|
@ -380,7 +380,13 @@
|
|||
SAMPLE_RATE = 44100;
|
||||
|
||||
var adapter = function ( dancer ) {
|
||||
var context = new AudioContext();
|
||||
var context;
|
||||
|
||||
if('webkitAudioContext' in window) {
|
||||
context = new webkitAudioContext();
|
||||
} else {
|
||||
context = new AudioContext();
|
||||
}
|
||||
|
||||
this.dancer = dancer;
|
||||
this.audio = new Audio();
|
||||
|
|
|
|||
5354
web/yarn.lock
5354
web/yarn.lock
File diff suppressed because it is too large
Load diff
Reference in a new issue