diff --git a/HELP.md b/HELP.md index 2c6234cf..35306f7a 100644 --- a/HELP.md +++ b/HELP.md @@ -88,6 +88,7 @@ Cloud Commander supports the following command-line parameters: | `--contact` | enable contact | `--config-dialog` | enable config dialog | `--config-auth` | enable auth change in config dialog +| `--config-port` | enable port change in config dialog | `--console` | enable console | `--sync-console-path` | sync console path | `--terminal` | enable terminal @@ -118,6 +119,7 @@ Cloud Commander supports the following command-line parameters: | `--no-confirm-move` | do not confirm move | `--no-config-dialog` | disable config dialog | `--no-config-auth` | disable auth change in config dialog +| `--no-config-port` | disable port change in config dialog | `--no-console` | disable console | `--no-sync-console-path` | do not sync console path | `--no-contact` | disable contact @@ -440,6 +442,7 @@ Some config options can be overridden with environment variables, such as: - `CLOUDCMD_CONTACT` - enable contact - `CLOUDCMD_CONFIG_DIALOG` - enable config dialog - `CLOUDCMD_CONFIG_AUTH` - enable auth change in config dialog +- `CLOUDCMD_CONFIG_PORT` - enable port change in config dialog - `CLOUDCMD_CONSOLE` - enable console - `CLOUDCMD_SYNC_CONSOLE_PATH` - sync console path - `CLOUDCMD_TERMINAL` - enable terminal diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index abb54430..d67b5de9 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -78,6 +78,7 @@ const yargsOptions = { 'open', 'config-dialog', 'config-auth', + 'config-port', 'console', 'sync-console-path', 'contact', @@ -132,6 +133,7 @@ const yargsOptions = { 'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')), 'config-dialog': choose(env.bool('config_dialog'), config('configDialog')), 'config-auth': choose(env.bool('config_auth'), config('configAuth')), + 'config-port': choose(env.bool('config_port'), config('configPort')), 'terminal-path': env.parse('terminal_path') || config('terminalPath'), 'terminal-command': env.parse('terminal_command') || config('terminalCommand'), 'terminal-auto-restart': choose(env.bool('terminal_auto_restart'), config('terminalAutoRestart')), @@ -214,6 +216,7 @@ async function main() { config('oneFilePanel', args.oneFilePanel); config('configDialog', args.configDialog); config('configAuth', args.configAuth); + config('configPort', args.configPort); config('keysPanel', args.keysPanel); config('export', args.export); config('exportToken', args.exportToken); diff --git a/client/modules/config/index.js b/client/modules/config/index.js index b5db80aa..dfa4c105 100644 --- a/client/modules/config/index.js +++ b/client/modules/config/index.js @@ -133,6 +133,7 @@ async function fillTemplate() { columns, theme, configAuth, + configPort, ...obj } = input.convert(config); @@ -142,6 +143,7 @@ async function fillTemplate() { obj[`${columns}-selected`] = 'selected'; obj[`${theme}-selected`] = 'selected'; obj.configAuth = configAuth ? '' : 'hidden'; + obj.configPort = configPort ? '' : 'hidden'; const innerHTML = rendy(Template, obj); diff --git a/json/config.json b/json/config.json index 51bd05ee..3bbb65f4 100644 --- a/json/config.json +++ b/json/config.json @@ -24,6 +24,7 @@ "confirmMove": true, "configDialog": true, "configAuth": true, + "configPort": true, "oneFilePanel": false, "console": true, "syncConsolePath": false, diff --git a/json/help.json b/json/help.json index f8ff0bf8..44f79248 100644 --- a/json/help.json +++ b/json/help.json @@ -25,6 +25,7 @@ "--keys-panel ": "show keys panel", "--config-dialog ": "enable config dialog", "--config-auth ": "enable auth change in config dialog", + "--config-port ": "enable port change in config dialog", "--console ": "enable console", "--sync-console-path ": "sync console path", "--contact ": "enable contact", @@ -56,6 +57,7 @@ "--no-confirm-move ": "do not confirm move", "--no-config-dialog ": "disable config dialog", "--no-config-auth ": "disable auth change in config dialog", + "--no-config-port ": "disable port change in config dialog", "--no-console ": "disable console", "--no-sync-console-path ": "do not sync console path", "--no-contact ": "disable contact", diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index fe2122b7..2bff72db 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -49,6 +49,7 @@ programs in browser from any computer, mobile or tablet device. --contact enable contact --config-dialog enable config dialog --config-auth enable auth change in config dialog + --config-port enable port change in config dialog --console enable console --sync-console-path sync console path --terminal enable terminal @@ -81,6 +82,7 @@ programs in browser from any computer, mobile or tablet device. --no-contact disable contact --no-config-dialog disable config dialog --no-config-auth disable auth change in config dialog + --no-config-port disable port change in config dialog --no-console disable console --no-sync-console-path do not sync console path --no-terminal disable terminal diff --git a/tmpl/config.hbs b/tmpl/config.hbs index 26dc3251..4a82286a 100644 --- a/tmpl/config.hbs +++ b/tmpl/config.hbs @@ -131,7 +131,7 @@ placeholder="root" class="form-control"> -