mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-22 01:02:23 -05:00
Experimental features
This commit is contained in:
parent
c456e5df01
commit
66047d9291
@ -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();
|
||||
|
@ -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 () {
|
||||
|
@ -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',
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user