mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(config) add ability to remove auth change from config with help of --config-auth flag
This commit is contained in:
parent
c73e4f1e29
commit
8379a4a9bf
9 changed files with 32 additions and 13 deletions
|
|
@ -26,6 +26,7 @@
|
||||||
"Termux",
|
"Termux",
|
||||||
"Zalitok",
|
"Zalitok",
|
||||||
"WebSocket",
|
"WebSocket",
|
||||||
|
"auth",
|
||||||
"cd",
|
"cd",
|
||||||
"cloudcmd",
|
"cloudcmd",
|
||||||
"coderaiser",
|
"coderaiser",
|
||||||
|
|
|
||||||
4
HELP.md
4
HELP.md
|
|
@ -91,6 +91,7 @@ Cloud Commander supports command line parameters:
|
||||||
| `--keys-panel` | show keys panel
|
| `--keys-panel` | show keys panel
|
||||||
| `--contact` | enable contact
|
| `--contact` | enable contact
|
||||||
| `--config-dialog` | enable config dialog
|
| `--config-dialog` | enable config dialog
|
||||||
|
| `--config-auth` | enable auth change in config dialog
|
||||||
| `--console` | enable console
|
| `--console` | enable console
|
||||||
| `--sync-console-path` | sync console path
|
| `--sync-console-path` | sync console path
|
||||||
| `--terminal` | enable terminal
|
| `--terminal` | enable terminal
|
||||||
|
|
@ -118,6 +119,7 @@ Cloud Commander supports command line parameters:
|
||||||
| `--no-confirm-copy` | do not confirm copy
|
| `--no-confirm-copy` | do not confirm copy
|
||||||
| `--no-confirm-move` | do not confirm move
|
| `--no-confirm-move` | do not confirm move
|
||||||
| `--no-config-dialog` | disable config dialog
|
| `--no-config-dialog` | disable config dialog
|
||||||
|
| `--no-config-auth` | disable auth change in config dialog
|
||||||
| `--no-console` | disable console
|
| `--no-console` | disable console
|
||||||
| `--no-sync-console-path` | do not sync console path
|
| `--no-sync-console-path` | do not sync console path
|
||||||
| `--no-contact` | disable contact
|
| `--no-contact` | disable contact
|
||||||
|
|
@ -397,6 +399,7 @@ Here is description of options:
|
||||||
"showFileName" : false /* do not show file name in view and edit */
|
"showFileName" : false /* do not show file name in view and edit */
|
||||||
"contact" : true, /* enable contact */
|
"contact" : true, /* enable contact */
|
||||||
"configDialog" : true, /* enable config dialog */
|
"configDialog" : true, /* enable config dialog */
|
||||||
|
"configAuth" : true, /* enable auth change in config dialog */
|
||||||
"console" : true, /* enable console */
|
"console" : true, /* enable console */
|
||||||
"syncConsolePath" : false /* do not sync console path */
|
"syncConsolePath" : false /* do not sync console path */
|
||||||
"terminal" : false, /* disable terminal */
|
"terminal" : false, /* disable terminal */
|
||||||
|
|
@ -425,6 +428,7 @@ Some config options can be overridden with `environment variables` such:
|
||||||
- `CLOUDCMD_COLUMNS` - set visible columns
|
- `CLOUDCMD_COLUMNS` - set visible columns
|
||||||
- `CLOUDCMD_CONTACT` - enable contact
|
- `CLOUDCMD_CONTACT` - enable contact
|
||||||
- `CLOUDCMD_CONFIG_DIALOG` - enable config dialog
|
- `CLOUDCMD_CONFIG_DIALOG` - enable config dialog
|
||||||
|
- `CLOUDCMD_CONFIG_AUTH` - enable auth change in config dialog
|
||||||
- `CLOUDCMD_CONSOLE` - enable console
|
- `CLOUDCMD_CONSOLE` - enable console
|
||||||
- `CLOUDCMD_SYNC_CONSOLE_PATH` - sync console path
|
- `CLOUDCMD_SYNC_CONSOLE_PATH` - sync console path
|
||||||
- `CLOUDCMD_TERMINAL` - enable terminal
|
- `CLOUDCMD_TERMINAL` - enable terminal
|
||||||
|
|
|
||||||
5
app.json
5
app.json
|
|
@ -32,6 +32,11 @@
|
||||||
"value": "false",
|
"value": "false",
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
|
"CLOUDCMD_CONFIG_AUTH": {
|
||||||
|
"description": "disable auth change in config dialog",
|
||||||
|
"value": "false",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
"CLOUDCMD_CONSOLE": {
|
"CLOUDCMD_CONSOLE": {
|
||||||
"description": "enable console",
|
"description": "enable console",
|
||||||
"value": "true",
|
"value": "true",
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ const args = require('minimist')(argv.slice(2), {
|
||||||
'open',
|
'open',
|
||||||
'progress',
|
'progress',
|
||||||
'config-dialog',
|
'config-dialog',
|
||||||
|
'config-auth',
|
||||||
'console',
|
'console',
|
||||||
'sync-console-path',
|
'sync-console-path',
|
||||||
'contact',
|
'contact',
|
||||||
|
|
@ -99,6 +100,7 @@ const args = require('minimist')(argv.slice(2), {
|
||||||
'show-file-name': choose(env.bool('show_file_name'), config('showFileName')),
|
'show-file-name': choose(env.bool('show_file_name'), config('showFileName')),
|
||||||
'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')),
|
'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')),
|
||||||
'config-dialog': choose(env.bool('config_dialog'), config('configDialog')),
|
'config-dialog': choose(env.bool('config_dialog'), config('configDialog')),
|
||||||
|
'config-auth': choose(env.bool('config_auth'), config('configAuth')),
|
||||||
'terminal-path': env('terminal_path') || config('terminalPath'),
|
'terminal-path': env('terminal_path') || config('terminalPath'),
|
||||||
'terminal-command': env('terminal_command') || config('terminalCommand'),
|
'terminal-command': env('terminal_command') || config('terminalCommand'),
|
||||||
'terminal-auto-restart': choose(env.bool('terminal_auto_restart'), config('terminalAutoRestart')),
|
'terminal-auto-restart': choose(env.bool('terminal_auto_restart'), config('terminalAutoRestart')),
|
||||||
|
|
@ -162,6 +164,7 @@ function main() {
|
||||||
config('confirmMove', args['confirm-move']);
|
config('confirmMove', args['confirm-move']);
|
||||||
config('oneFilePanel', args['one-file-panel']);
|
config('oneFilePanel', args['one-file-panel']);
|
||||||
config('configDialog', args['config-dialog']);
|
config('configDialog', args['config-dialog']);
|
||||||
|
config('configAuth', args['config-auth']);
|
||||||
config('keysPanel', args['keys-panel']);
|
config('keysPanel', args['keys-panel']);
|
||||||
config('export', args.export);
|
config('export', args.export);
|
||||||
config('exportToken', args['export-token']);
|
config('exportToken', args['export-token']);
|
||||||
|
|
|
||||||
|
|
@ -137,16 +137,18 @@ function fillTemplate(error, template) {
|
||||||
if (error)
|
if (error)
|
||||||
return alert('Could not load config!');
|
return alert('Could not load config!');
|
||||||
|
|
||||||
const obj = input.convert(config);
|
const {
|
||||||
|
editor,
|
||||||
|
packer,
|
||||||
|
columns,
|
||||||
|
configAuth,
|
||||||
|
...obj
|
||||||
|
} = input.convert(config);
|
||||||
|
|
||||||
obj[obj.editor + '-selected'] = 'selected';
|
obj[editor + '-selected'] = 'selected';
|
||||||
delete obj.editor;
|
obj[packer + '-selected'] = 'selected';
|
||||||
|
obj[columns + '-selected'] = 'selected';
|
||||||
obj[obj.packer + '-selected'] = 'selected';
|
obj.configAuth = configAuth ? '' : 'hidden';
|
||||||
delete obj.packer;
|
|
||||||
|
|
||||||
obj[obj.columns + '-selected'] = 'selected';
|
|
||||||
delete obj.columns;
|
|
||||||
|
|
||||||
const innerHTML = rendy(Template, obj);
|
const innerHTML = rendy(Template, obj);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
"confirmCopy": true,
|
"confirmCopy": true,
|
||||||
"confirmMove": true,
|
"confirmMove": true,
|
||||||
"configDialog": true,
|
"configDialog": true,
|
||||||
|
"configAuth": true,
|
||||||
"oneFilePanel": false,
|
"oneFilePanel": false,
|
||||||
"console": true,
|
"console": true,
|
||||||
"syncConsolePath": false,
|
"syncConsolePath": false,
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
"--one-file-panel ": "show one file panel",
|
"--one-file-panel ": "show one file panel",
|
||||||
"--keys-panel ": "show keys panel",
|
"--keys-panel ": "show keys panel",
|
||||||
"--config-dialog ": "enable config dialog",
|
"--config-dialog ": "enable config dialog",
|
||||||
|
"--config-auth ": "enable auth change in config dialog",
|
||||||
"--console ": "enable console",
|
"--console ": "enable console",
|
||||||
"--sync-console-path ": "sync console path",
|
"--sync-console-path ": "sync console path",
|
||||||
"--contact ": "enable contact",
|
"--contact ": "enable contact",
|
||||||
|
|
@ -50,6 +51,7 @@
|
||||||
"--no-confirm-copy ": "do not confirm copy",
|
"--no-confirm-copy ": "do not confirm copy",
|
||||||
"--no-confirm-move ": "do not confirm move",
|
"--no-confirm-move ": "do not confirm move",
|
||||||
"--no-config-dialog ": "disable config dialog",
|
"--no-config-dialog ": "disable config dialog",
|
||||||
|
"--no-config-auth ": "disable auth change in config dialog",
|
||||||
"--no-console ": "disable console",
|
"--no-console ": "disable console",
|
||||||
"--no-sync-console-path ": "do not sync console path",
|
"--no-sync-console-path ": "do not sync console path",
|
||||||
"--no-contact ": "disable contact",
|
"--no-contact ": "disable contact",
|
||||||
|
|
|
||||||
3
now.json
3
now.json
|
|
@ -2,7 +2,8 @@
|
||||||
"type": "npm",
|
"type": "npm",
|
||||||
"alias": "cloudcmd",
|
"alias": "cloudcmd",
|
||||||
"env": {
|
"env": {
|
||||||
"cloudcmd_config_dialog": "false",
|
"cloudcmd_config_dialog": "true",
|
||||||
|
"cloudcmd_config_auth": "false",
|
||||||
"cloudcmd_terminal": "true",
|
"cloudcmd_terminal": "true",
|
||||||
"cloudcmd_terminal_path": "gritty",
|
"cloudcmd_terminal_path": "gritty",
|
||||||
"cloudcmd_import": "true",
|
"cloudcmd_import": "true",
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li>
|
<li {{ configAuth }}>
|
||||||
<label>
|
<label>
|
||||||
<input data-name="js-auth" type="checkbox" {{ auth }} >
|
<input data-name="js-auth" type="checkbox" {{ auth }} >
|
||||||
Auth
|
Auth
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li {{ configAuth }}>
|
||||||
<input
|
<input
|
||||||
data-name="js-username"
|
data-name="js-username"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
title="Username"
|
title="Username"
|
||||||
autocomplete="username">
|
autocomplete="username">
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li {{ configAuth }}>
|
||||||
<input
|
<input
|
||||||
data-name="js-password"
|
data-name="js-password"
|
||||||
type="password"
|
type="password"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue