added secret key bindings for admins to reload and restart their NodeBBs :shipit:
parent
063a4e5628
commit
1f06e4f5a2
@ -0,0 +1,19 @@
|
||||
define('admin', ['mousetrap'], function(Mousetrap) {
|
||||
var Admin= {};
|
||||
|
||||
Admin.init = function() {
|
||||
if (app.isAdmin) {
|
||||
Mousetrap.bind('ctrl+shift+a r', function() {
|
||||
console.log('[admin] Reloading NodeBB...');
|
||||
socket.emit('admin.reload');
|
||||
});
|
||||
|
||||
Mousetrap.bind('ctrl+shift+a R', function() {
|
||||
console.log('[admin] Restarting NodeBB...');
|
||||
socket.emit('admin.restart');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return Admin;
|
||||
});
|
Loading…
Reference in New Issue