mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
feature(cloudcmd) add ability to disable console with "--no-console" (#65)
This commit is contained in:
parent
6b26b26115
commit
c3c008ff72
12 changed files with 79 additions and 14 deletions
|
|
@ -333,13 +333,11 @@ var CloudCmd, Util, DOM;
|
|||
break;
|
||||
|
||||
case Key.TRA:
|
||||
DOM.Images.show.load('top');
|
||||
CloudCmd.Konsole.show();
|
||||
event.preventDefault();
|
||||
break;
|
||||
|
||||
case KEY.BRACKET_CLOSE:
|
||||
DOM.Images.show.load('top');
|
||||
CloudCmd.Konsole.show();
|
||||
event.preventDefault();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,15 @@
|
|||
Util.time(Name + ' load');
|
||||
}
|
||||
|
||||
init();
|
||||
DOM.Files.get('config', function(error, config) {
|
||||
if (error)
|
||||
return Dialog.alert(TITLE, error);
|
||||
|
||||
if (!config.console)
|
||||
return;
|
||||
|
||||
init();
|
||||
});
|
||||
}
|
||||
|
||||
})(CloudCmd, Util, DOM);
|
||||
|
|
|
|||
|
|
@ -108,12 +108,6 @@ function listen(prefix, socket) {
|
|||
|
||||
config.listen(socket, authCheck);
|
||||
|
||||
webconsole({
|
||||
prefix: prefix + '/console',
|
||||
socket: socket,
|
||||
authCheck: authCheck
|
||||
});
|
||||
|
||||
edward.listen(socket, {
|
||||
size: size,
|
||||
root: root,
|
||||
|
|
@ -152,6 +146,12 @@ function listen(prefix, socket) {
|
|||
prefix: prefix + '/ishtar',
|
||||
authCheck: authCheck
|
||||
});
|
||||
|
||||
config('console') && webconsole({
|
||||
prefix: prefix + '/console',
|
||||
socket: socket,
|
||||
authCheck: authCheck
|
||||
});
|
||||
}
|
||||
|
||||
function cloudcmd(prefix) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ function indexProcessing(options) {
|
|||
right = '',
|
||||
keysPanel = '<div id="js-keyspanel" class="{{ className }}',
|
||||
isOnePanel = config('onePanelMode'),
|
||||
isConfig = config('configDialog'),
|
||||
noConfig = !config('configDialog'),
|
||||
noConsole = !config('console'),
|
||||
data = options.data,
|
||||
panel = options.panel;
|
||||
|
||||
|
|
@ -85,10 +86,14 @@ function indexProcessing(options) {
|
|||
.replace('icon-move', 'icon-move none')
|
||||
.replace('icon-copy', 'icon-copy none');
|
||||
|
||||
if (!isConfig)
|
||||
if (noConfig)
|
||||
data = data
|
||||
.replace('icon-config', 'icon-config none');
|
||||
|
||||
if (noConsole)
|
||||
data = data
|
||||
.replace('icon-console', 'icon-console none');
|
||||
|
||||
left = rendy(Template.panel, {
|
||||
side : 'left',
|
||||
content : panel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue