This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| import User from 'online-mobile/models/user'; | |
| export default Ember.Service.extend({ | |
| store: Ember.inject.service('store'), | |
| // websocket status. | |
| isConnected: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _startHeartBeats() { | |
| var _this = this; | |
| var interval = setInterval(function() { | |
| Ember.run.schedule('backgroundSocket', _this, function() { | |
| _this._send(heartBeatMessage); | |
| }); | |
| }, 5000); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| tagName: 'div', | |
| classNames: ['image-wrap'], | |
| classNameBindings: ['isPortrait:portrait:landscape', 'isLoaded:loaded'], | |
| attributeBindings: ['width', 'height'], | |
| isLoaded: false, | |
| isPortrait: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| scrollToBottom: function() { | |
| console.log('DID INSERT ELEMENT NOW'); | |
| }.on('didInsertElement'), | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default Ember.Route.extend({ | |
| model: function() { | |
| return Ember.RSVP.hash({ | |
| messages: this.store.findAll('chat-message'), | |
| }); | |
| }, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default Ember.Component.extend({ | |
| tagName: 'li', | |
| classNameBindings: ['isMine:self'], | |
| isMine: Ember.computed.alias('message.isMine'), | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| tagName: 'li', | |
| classNameBindings: ['isMine:self'], | |
| isMineBinding: 'message.isMine', | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| import Resolver from 'ember/resolver'; | |
| import loadInitializers from 'ember/load-initializers'; | |
| import config from './config/environment'; | |
| import DS from 'ember-data'; | |
| var App; | |
| Ember.MODEL_FACTORY_INJECTIONS = true; |