1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-12-25 17:08:54 -05:00

Add logout button to settings page

This commit is contained in:
Lance Stout 2013-12-31 17:20:32 -08:00
parent 963f677053
commit 8994efb96b
4 changed files with 9 additions and 2 deletions

View File

@ -221,7 +221,7 @@ exports.pages.groupchat = function anonymous(locals) {
exports.pages.main = function anonymous(locals) {
var buf = [];
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></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>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("");
};

View File

@ -22,3 +22,6 @@ section.page.main
h4 Desktop Integration
button.enableAlerts Enable alerts
button.primary.installFirefox Install app
div
button.logout Logout

View File

@ -17,6 +17,7 @@ module.exports = HumanView.extend({
events: {
'click a[href]': 'handleLinkClick',
'click .reconnect': 'handleReconnect',
'click .logout': 'handleLogout',
'blur #me .status': 'handleStatusChange'
},
classBindings: {
@ -67,5 +68,8 @@ module.exports = HumanView.extend({
status: text,
caps: client.disco.caps
});
},
handleLogout: function (e) {
app.navigate('/logout');
}
});

View File

@ -1,5 +1,5 @@
CACHE MANIFEST
# 0.0.1 1388535003037
# 0.0.1 1388539211085
CACHE:
/app.js