feature: cloudcmd: add ability to hide port configuration

This commit is contained in:
coderiaser 2026-03-23 23:02:09 +02:00
parent 2f0affd3a3
commit a1216cddeb
7 changed files with 15 additions and 2 deletions

View file

@ -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

View file

@ -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);

View file

@ -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);

View file

@ -24,6 +24,7 @@
"confirmMove": true,
"configDialog": true,
"configAuth": true,
"configPort": true,
"oneFilePanel": false,
"console": true,
"syncConsolePath": false,

View file

@ -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",

View file

@ -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

View file

@ -131,7 +131,7 @@
placeholder="root"
class="form-control">
</li>
<li title="Port used by server">
<li {{ configPort }} title="Port used by server">
<input
data-name="js-port"
min="0"
@ -172,4 +172,4 @@
Sync Console Path
</label>
</li>
</ul>
</ul>