1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-05 17:15:04 -05:00

Experimental features

This commit is contained in:
Lance Stout 2014-01-23 11:11:56 -08:00
parent c456e5df01
commit 66047d9291
4 changed files with 18 additions and 3 deletions

View File

@ -109,6 +109,7 @@ module.exports = function (client, app) {
me.jid = jid;
app.state.connected = true;
window.readyForDeviceID = true;
client.getRoster(function (err, resp) {
resp = resp.toJSON();

View File

@ -28,6 +28,10 @@ module.exports = HumanModel.define({
self.cacheStatus = state;
});
document.addEventListener('deviceid', function (event) {
self.deviceID = event.deviceid;
});
this.markActive();
},
session: {
@ -41,7 +45,8 @@ module.exports = HumanModel.define({
badge: 'string',
pageTitle: 'string',
hasActiveCall: ['boolean', false, false],
cacheStatus: 'string'
cacheStatus: 'string',
deviceID: 'string'
},
derived: {
title: {
@ -53,6 +58,12 @@ module.exports = HumanModel.define({
}
return base;
}
},
deviceIDReady: {
deps: ['connected', 'deviceID'],
fn: function () {
return (this.connected && this.deviceID);
}
}
},
markActive: function () {

View File

@ -13,6 +13,9 @@ module.exports = HumanView.extend({
initialize: function () {
this.listenTo(app.state, 'change:title', this.handleTitle);
app.desktop.updateBadge('');
app.state.on('change:deviceID', function () {
console.log('DEVICE ID>>>', app.state.deviceID);
});
},
events: {
'click a[href]': 'handleLinkClick',

View File

@ -1,6 +1,6 @@
{
"name": "otalk.im",
"version": "0.0.14",
"version": "0.0.15",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"repository": {
"type": "git",
@ -27,7 +27,7 @@
"oembed": "0.1.0",
"semi-static": "0.0.4",
"sound-effect-manager": "0.0.5",
"stanza.io": "3.0.4",
"stanza.io": "3.0.5",
"staydown": "1.0.3",
"templatizer": "0.1.2",
"underscore": "1.5.1",