Update dependencies; break everything
This commit is contained in:
Родитель
93e9f48b4a
Коммит
7cd7621535
|
@ -3,7 +3,8 @@
|
|||
"document",
|
||||
"window",
|
||||
"-Promise",
|
||||
"$"
|
||||
"$",
|
||||
"EmberHifi"
|
||||
],
|
||||
"browser": true,
|
||||
"boss": true,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
});
|
|
@ -5,6 +5,7 @@ export default Ember.ArrayController.extend({
|
|||
|
||||
sortAscending: false,
|
||||
sortProperties: ['datePublished'],
|
||||
selectedEpisode: null,
|
||||
|
||||
actions: {
|
||||
download: function(episode) {
|
||||
|
@ -12,8 +13,11 @@ export default Ember.ArrayController.extend({
|
|||
},
|
||||
|
||||
setEpisode: function(episode) {
|
||||
this.set('selectedEpisode', episode);
|
||||
console.log('This Get selectedEpisode: ', this.get('selectedEpisode'));
|
||||
if (!episode.get('isDownloaded')) {
|
||||
console.log('Not downloaded');
|
||||
console.log("CONTROLLERS PLAYER: ", this.get('controllers.player'));
|
||||
this.get('controllers.player').send('setEpisode', episode);
|
||||
} else {
|
||||
console.log('Start playing!');
|
||||
|
|
|
@ -2,10 +2,12 @@ import Ember from 'ember';
|
|||
import timeStamper from 'ember-hifi/lib/timestamp';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
init: function() {
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
_hasAudio: function() {
|
||||
this.set('isPopulated', !!this.get('model').get('id'));
|
||||
}.observes('model'),
|
||||
|
||||
isPopulated: false,
|
||||
progressBar: {
|
||||
max: 0,
|
||||
|
@ -49,12 +51,23 @@ export default Ember.Controller.extend({
|
|||
|
||||
this.set('model', episode);
|
||||
|
||||
|
||||
|
||||
console.log('This Get model: ', this.get('model'));
|
||||
|
||||
console.log("Episode: ", episode);
|
||||
|
||||
console.log('getmodel: ', episode.get('name'));
|
||||
|
||||
if (this.get('model').get('isDownloaded')) {
|
||||
console.log("Bloburl downloaded, setting audio");
|
||||
episode.blobURL().then(function(url) {
|
||||
_this.set('audio', url);
|
||||
_this.playAfterSet();
|
||||
});
|
||||
} else {
|
||||
console.log('Setting Audio...');
|
||||
console.log("Model: ", this.get("model"));
|
||||
this.set('audio', this.get('model').get('audioURL'));
|
||||
this.playAfterSet();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import DS from 'ember-data';
|
||||
import Ember from 'ember';
|
||||
import parseXML from 'npm:xml-parser';
|
||||
import timeStamper from 'ember-hifi/lib/timestamp';
|
||||
import getRSS from 'ember-hifi/lib/rss';
|
||||
|
||||
|
|
|
@ -8,12 +8,12 @@ var Router = Ember.Router.extend({
|
|||
Router.map(function() {
|
||||
this.route('search');
|
||||
|
||||
this.resource('podcasts', { path: '/podcasts' }, function() {
|
||||
this.route('podcasts', { path: '/podcasts' }, function() {
|
||||
this.route('new');
|
||||
});
|
||||
|
||||
this.resource('podcast', { path: '/podcast/:podcast_id'});
|
||||
this.resource('episode', { path: '/episode/:episode_id' });
|
||||
this.route('podcast', { path: '/podcast/:podcast_id'});
|
||||
// this.resource('episodes', { path: '/episode/:episode_id' });
|
||||
});
|
||||
|
||||
export default Router;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Route.extend({
|
||||
redirect: function() {
|
||||
this.transitionTo('podcasts');
|
||||
}
|
||||
// redirect: function() {
|
||||
// this.transitionTo('podcasts');
|
||||
// }
|
||||
});
|
||||
|
|
|
@ -5,3 +5,4 @@ export default Ember.Route.extend({
|
|||
return this.store.find('podcast', params.podcast_id);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
{{render "player"}}
|
||||
|
||||
{{#each episode in content}}
|
||||
{{#each episode in model}}
|
||||
<div {{action "setEpisode" episode}} {{bind-attr class=":episode isNew"}}>
|
||||
<div class="name">
|
||||
{{#if isNew}}
|
||||
<strong>{{episode.new}}</strong>
|
||||
{{/if}}
|
||||
{{episode.name}}
|
||||
{{model.name}}
|
||||
</div>
|
||||
|
||||
{{!-- Commented out while we are streaming-only. This code exposes
|
|
@ -13,20 +13,21 @@
|
|||
<div class="player-controls">
|
||||
<a {{action "rewind" model}} class="backward">
|
||||
<i class="fa fa-backward"></i>
|
||||
{{fa-icon "backward"}}
|
||||
</a>
|
||||
|
||||
{{#if model.isPlaying}}
|
||||
<a {{action "pause" model}} class="play-pause">
|
||||
<i class="fa fa-pause"></i>
|
||||
{{fa-icon "pause"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a {{action "play" model}} class="play-pause">
|
||||
<i class="fa fa-play"></i>
|
||||
{{fa-icon "play"}}
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
<a {{action "forward" model}} class="forward">
|
||||
<i class="fa fa-forward"></i>
|
||||
{{fa-icon "forward"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<p>{{model.description}} {{model.lastUpdated}}</p>
|
||||
|
||||
<button {{action delete}}>Unsubscribe</button>
|
||||
<button {{action "delete"}}>Unsubscribe</button>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
|
21
bower.json
21
bower.json
|
@ -1,25 +1,18 @@
|
|||
{
|
||||
"name": "ember-hifi",
|
||||
"dependencies": {
|
||||
"ember": "1.12.0",
|
||||
"ember": "1.13.3",
|
||||
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
|
||||
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
|
||||
"ember-data": "1.0.0-beta.18",
|
||||
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.4",
|
||||
"ember-qunit": "0.3.3",
|
||||
"ember-data": "1.13.5",
|
||||
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.5",
|
||||
"ember-qunit": "0.4.1",
|
||||
"ember-qunit-notifications": "0.0.7",
|
||||
"ember-resolver": "~0.1.15",
|
||||
"i18n-js": "git://github.com/fnando/i18n-js#v3.0.0.rc5",
|
||||
"ember-resolver": "~0.1.18",
|
||||
"jquery": "^1.11.1",
|
||||
"loader.js": "ember-cli/loader.js#3.2.0",
|
||||
"qunit": "~1.17.1",
|
||||
"ember-indexeddb-adapter": "https://github.com/kurko/ember-indexeddb-adapter.git#~0.6.0",
|
||||
"localforage": "~1.2.1",
|
||||
"font-awesome": "~4.3.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"ember": "1.12.0",
|
||||
"ember-data": "1.0.0-beta.18",
|
||||
"jquery": "^1.11.1"
|
||||
"font-awesome": "~4.3.0",
|
||||
"localforage": "~1.2.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* global require, module */
|
||||
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
|
||||
module.exports = function(defaults) {
|
||||
var app = new EmberApp(defaults, {
|
||||
// Add options here
|
||||
});
|
||||
|
||||
// Use `app.import` to add additional libraries to the generated
|
||||
// output files.
|
||||
//
|
||||
// If you need to use different assets in different
|
||||
// environments, specify an object as the first parameter. That
|
||||
// object's keys should be the environment name and the values
|
||||
// should be the asset to use in that environment.
|
||||
//
|
||||
// If the library that you are including contains AMD or ES6
|
||||
// modules that you would like to import into your application
|
||||
// please specify an object with the list of modules as keys
|
||||
// along with the exports of each module as its value.
|
||||
|
||||
return app.toTree();
|
||||
};
|
22
package.json
22
package.json
|
@ -21,24 +21,22 @@
|
|||
"devDependencies": {
|
||||
"broccoli-asset-rev": "^2.0.2",
|
||||
"ember-browserify": "^1.0.1",
|
||||
"ember-cli": "0.2.7",
|
||||
"ember-cli-app-version": "0.3.3",
|
||||
"ember-cli": "1.13.1",
|
||||
"ember-cli-app-version": "0.4.0",
|
||||
"ember-cli-babel": "^5.0.0",
|
||||
"ember-cli-content-security-policy": "0.4.0",
|
||||
"ember-cli-dependency-checker": "^1.0.0",
|
||||
"ember-cli-fxos": "0.1.1",
|
||||
"ember-cli-htmlbars": "0.7.6",
|
||||
"ember-cli-ic-ajax": "0.1.1",
|
||||
"ember-cli-font-awesome": "0.1.0",
|
||||
"ember-cli-htmlbars": "0.7.9",
|
||||
"ember-cli-htmlbars-inline-precompile": "^0.1.1",
|
||||
"ember-cli-ic-ajax": "0.2.1",
|
||||
"ember-cli-inject-live-reload": "^1.3.0",
|
||||
"ember-cli-qunit": "0.3.13",
|
||||
"ember-cli-qunit": "0.3.15",
|
||||
"ember-cli-release": "0.2.3",
|
||||
"ember-cli-uglify": "^1.0.1",
|
||||
"ember-data": "1.0.0-beta.18",
|
||||
"ember-data": "1.13.5",
|
||||
"ember-disable-proxy-controllers": "^1.0.0",
|
||||
"ember-export-application-global": "^1.0.2",
|
||||
"ember-localforage-adapter": "0.7.3",
|
||||
"xml-parser": "^1.2.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"es6-promise": "^2.3.0"
|
||||
"ember-localforage-adapter": "0.7.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"node": false,
|
||||
"browser": false,
|
||||
"boss": true,
|
||||
"curly": false,
|
||||
"curly": true,
|
||||
"debug": false,
|
||||
"devel": false,
|
||||
"eqeqeq": true,
|
||||
|
@ -47,5 +47,6 @@
|
|||
"strict": false,
|
||||
"white": false,
|
||||
"eqnull": true,
|
||||
"esnext": true
|
||||
"esnext": true,
|
||||
"unused": true
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Ember from 'ember';
|
||||
import Application from '../../app';
|
||||
import Router from '../../router';
|
||||
import config from '../../config/environment';
|
||||
|
||||
export default function startApp(attrs) {
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
|
||||
moduleForComponent('audio-player', 'Unit | Component | audio player', {
|
||||
// Specify the other units that are required for this test
|
||||
// needs: ['component:foo', 'helper:bar'],
|
||||
unit: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
assert.expect(2);
|
||||
|
||||
// Creates the component instance
|
||||
var component = this.subject();
|
||||
assert.equal(component._state, 'preRender');
|
||||
|
||||
// Renders the component to the page
|
||||
this.render();
|
||||
assert.equal(component._state, 'inDOM');
|
||||
});
|
Загрузка…
Ссылка в новой задаче