diff --git a/HELP.md b/HELP.md index 1438b027..486019f2 100644 --- a/HELP.md +++ b/HELP.md @@ -82,6 +82,7 @@ Cloud Commander supports command line parameters: | `--open` | open web browser when server started | `--name` | set tab name in web browser | `--one-panel-mode` | set one panel mode +| `--contact` | enable contact | `--config-dialog` | enable config dialog | `--console` | enable console | `--terminal` | enable terminal @@ -93,6 +94,7 @@ Cloud Commander supports command line parameters: | `--no-progress` | do not show progress of file operations | `--no-html-dialogs` | do not use html dialogs | `--no-one-panel-mode` | unset one panel mode +| `--no-contact` | disable contact | `--no-config-dialog` | disable config dialog | `--no-console` | disable console | `--no-terminal` | disable terminal @@ -322,6 +324,7 @@ Here is description of options: "progress" : true, /* show progress of file operations */ "htmlDialogs" : true, /* use html dialogs */ "onePanelMode" : false, /* set one panel mode */ + "contact" : true, /* enable contact */ "configDialog" : true, /* enable config dialog */ "console" : true, /* enable console */ "terminal" : false, /* disable terminal */ @@ -335,9 +338,10 @@ Some config options can be overridden with `environment variables` such: - `CLOUDCMD_NAME` - set tab name in web browser - `CLOUDCMD_EDITOR` - set editor +- `CLOUDCMD_CONTACT` - enable contact +- `CLOUDCMD_CONFIG_DIALOG` - enable config dialog - `CLOUDCMD_TERMINAL` - enable terminal - `CLOUDCMD_TERMINAL_PATH` - set terminal path -- `CLOUDCMD_CONFIG_DIALOG` - enable config dialog - `CLOUDCMD_AUTH` - enable authentication - `CLOUDCMD_USERNAME` - set username - `CLOUDCMD_PASSWORD` - set password diff --git a/app.json b/app.json index 4aa8aaa2..9ba8c501 100644 --- a/app.json +++ b/app.json @@ -22,6 +22,11 @@ "value": "edward", "required": false }, + "CLOUDCMD_CONTACT": { + "description": "enable contact", + "value": "true", + "required": false + }, "CLOUDCMD_TERMINAL": { "description": "enable terminal", "value": "true", diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index 4de2a48a..5c4d4e75 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -40,6 +40,7 @@ const args = require('minimist')(argv.slice(2), { 'progress', 'config-dialog', 'console', + 'contact', 'terminal', 'one-panel-mode', 'html-dialogs', @@ -60,6 +61,7 @@ const args = require('minimist')(argv.slice(2), { prefix : config('prefix'), progress : config('progress'), console : config('console'), + contact : choose(env.bool('contact'), config('contact')), terminal : choose(env.bool('terminal'), config('terminal')), 'terminal-path': env('terminal_path') || config('terminalPath'), @@ -104,6 +106,7 @@ function main() { config('username', args.username); config('progress', args.progress); config('console', args.console); + config('contact', args.contact); config('terminal', args.terminal); config('terminalPath', args['terminal-path']); config('editor', args.editor); diff --git a/json/config.json b/json/config.json index 0c5a6da0..ef533f22 100644 --- a/json/config.json +++ b/json/config.json @@ -21,9 +21,9 @@ "prefix": "", "progress": true, "htmlDialogs": true, + "contact": true, "configDialog": true, "onePanelMode": false, - "configDialog": true, "console": true, "terminal": false, "terminalPath": "", diff --git a/json/help.json b/json/help.json index 3d04cc5d..5b3eeb1e 100644 --- a/json/help.json +++ b/json/help.json @@ -18,6 +18,7 @@ "--one-panel-mode ": "set one panel mode", "--config-dialog ": "enable config dialog", "--console ": "enable console", + "--contact ": "enable contact", "--terminal ": "enable terminal", "--terminal-path ": "set terminal path", "--open ": "open web browser when server started", @@ -31,6 +32,7 @@ "--no-one-panel-mode ": "unset one panel mode", "--no-config-dialog ": "disable config dialog", "--no-console ": "disable console", + "--no-contact ": "disable contact", "--no-terminal ": "disable terminal", "--no-name ": "set default tab name in web browser" } diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index b8ed2afa..bab5a9d4 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -39,6 +39,7 @@ programs in browser from any computer, mobile or tablet device. --progress show progress of file operations --html-dialogs use html dialogs --one-panel-mode set one panel mode + --contact enable contact --config-dialog enable config dialog --console enable console --terminal enable terminal @@ -52,6 +53,7 @@ programs in browser from any computer, mobile or tablet device. --no-progress do not show progress of file operations --no-html-dialogs do not use html dialogs --no-one-panel-mode unset one panel mode + --no-contact disable contact --no-config-dialog disable config dialog --no-console disable console --no-terminal disable terminal diff --git a/server/route.js b/server/route.js index 6c3059e5..25d6c1c3 100644 --- a/server/route.js +++ b/server/route.js @@ -56,6 +56,7 @@ function indexProcessing(options) { const keysPanel = '