mirror of
https://github.com/moparisthebest/kaiwa
synced 2025-01-11 21:58:35 -05:00
Add basic UI for joining a new MUC
This commit is contained in:
parent
1e60367438
commit
7b174c77c9
@ -23,6 +23,7 @@ module.exports = BasePage.extend({
|
|||||||
'click .enableAlerts': 'enableAlerts',
|
'click .enableAlerts': 'enableAlerts',
|
||||||
'click .installFirefox': 'installFirefox',
|
'click .installFirefox': 'installFirefox',
|
||||||
'click .addContact': 'handleAddContact',
|
'click .addContact': 'handleAddContact',
|
||||||
|
'click .joinMUC': 'handleJoinMUC',
|
||||||
'dragover': 'handleAvatarChangeDragOver',
|
'dragover': 'handleAvatarChangeDragOver',
|
||||||
'drop': 'handleAvatarChange',
|
'drop': 'handleAvatarChange',
|
||||||
'change #uploader': 'handleAvatarChange',
|
'change #uploader': 'handleAvatarChange',
|
||||||
@ -111,5 +112,18 @@ module.exports = BasePage.extend({
|
|||||||
this.$('#addcontact').val('');
|
this.$('#addcontact').val('');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
handleJoinMUC: function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var mucjid = this.$('#joinmuc').val();
|
||||||
|
me.mucs.add({
|
||||||
|
id: mucjid,
|
||||||
|
name: mucjid,
|
||||||
|
jid: new client.JID(mucjid),
|
||||||
|
nick: me.nick,
|
||||||
|
autoJoin: false
|
||||||
|
});
|
||||||
|
me.mucs.get(mucjid).join();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -488,7 +488,7 @@ exports.pages.groupchat = function anonymous(locals) {
|
|||||||
exports.pages.main = function anonymous(locals) {
|
exports.pages.main = function anonymous(locals) {
|
||||||
var buf = [];
|
var buf = [];
|
||||||
with (locals || {}) {
|
with (locals || {}) {
|
||||||
buf.push('<section class="page main"><div><h4>Current status</h4><div contenteditable="true" class="status"></div></div><div id="avatarChanger"><h4>Change Avatar</h4><div class="uploadRegion"><p>Drag and drop a new avatar here</p><img/><form><input id="uploader" type="file"/></form></div></div><div><h4>Add / Approve Contacts</h4><input type="text" id="addcontact" class="inline"/><button class="addContact">Add</button><ul id="contactrequests"></ul></div><div><h4>Desktop Integration</h4><button class="enableAlerts">Enable alerts</button><button class="primary installFirefox">Install app</button></div><div><button class="logout">Logout</button></div></section>');
|
buf.push('<section class="page main"><div><h4>Current status</h4><div contenteditable="true" class="status"></div></div><div id="avatarChanger"><h4>Change Avatar</h4><div class="uploadRegion"><p>Drag and drop a new avatar here</p><img/><form><input id="uploader" type="file"/></form></div></div><div><h4>Add / Approve Contacts</h4><input type="text" id="addcontact" class="inline"/><button class="addContact">Add</button><ul id="contactrequests"></ul></div><div><h4>Join MUC</h4><input type="text" id="joinmuc" class="inline"/><button class="joinMUC">Join</button></div><div><h4>Desktop Integration</h4><button class="enableAlerts">Enable alerts</button><button class="primary installFirefox">Install app</button></div><div><button class="logout">Logout</button></div></section>');
|
||||||
}
|
}
|
||||||
return buf.join("");
|
return buf.join("");
|
||||||
};
|
};
|
||||||
|
@ -18,6 +18,11 @@ section.page.main
|
|||||||
button.addContact Add
|
button.addContact Add
|
||||||
ul#contactrequests
|
ul#contactrequests
|
||||||
|
|
||||||
|
div
|
||||||
|
h4 Join MUC
|
||||||
|
input(type="text", class="inline")#joinmuc
|
||||||
|
button.joinMUC Join
|
||||||
|
|
||||||
div
|
div
|
||||||
h4 Desktop Integration
|
h4 Desktop Integration
|
||||||
button.enableAlerts Enable alerts
|
button.enableAlerts Enable alerts
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "otalk.im",
|
"name": "otalk.im",
|
||||||
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
|
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
|
||||||
"version": "0.0.34",
|
"version": "0.0.38",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"andlog": "0.0.4",
|
"andlog": "0.0.4",
|
||||||
"async": "0.2.9",
|
"async": "0.2.9",
|
||||||
|
Loading…
Reference in New Issue
Block a user