mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(cloudcmd) add --confirm-move
This commit is contained in:
parent
743b76d3ec
commit
e5e8a566e2
8 changed files with 30 additions and 6 deletions
4
HELP.md
4
HELP.md
|
|
@ -81,6 +81,7 @@ Cloud Commander supports command line parameters:
|
|||
| `--port` | set port number
|
||||
| `--progress` | show progress of file operations
|
||||
| `--confirm-copy` | confirm copy
|
||||
| `--confirm-move` | confirm move
|
||||
| `--html-dialogs` | use html dialogs
|
||||
| `--open` | open web browser when server started
|
||||
| `--name` | set tab name in web browser
|
||||
|
|
@ -99,6 +100,7 @@ Cloud Commander supports command line parameters:
|
|||
| `--no-one-panel-mode` | unset one panel mode
|
||||
| `--no-progress` | do not show progress of file operations
|
||||
| `--no-confirm-copy` | do not confirm copy
|
||||
| `--no-confirm-move` | do not confirm move
|
||||
| `--no-html-dialogs` | do not use html dialogs
|
||||
| `--no-contact` | disable contact
|
||||
| `--no-config-dialog` | disable config dialog
|
||||
|
|
@ -366,6 +368,7 @@ Here is description of options:
|
|||
"prefix" : "", /* url prefix */
|
||||
"progress" : true, /* show progress of file operations */
|
||||
"confirmCopy" : true, /* confirm copy */
|
||||
"confirmMove" : true, /* confirm move */
|
||||
"htmlDialogs" : true, /* use html dialogs */
|
||||
"onePanelMode" : false, /* set one panel mode */
|
||||
"contact" : true, /* enable contact */
|
||||
|
|
@ -395,6 +398,7 @@ Some config options can be overridden with `environment variables` such:
|
|||
- `CLOUDCMD_ONE_PANEL_MODE` - set one panel mode
|
||||
- `CLOUDCMD_VIM` - enable vim hot keys
|
||||
- `CLOUDCMD_CONFIRM_COPY` - confirm copy
|
||||
- `CLOUDCMD_CONFIRM_MOVE` - confirm move
|
||||
|
||||
Menu
|
||||
---------------
|
||||
|
|
|
|||
5
app.json
5
app.json
|
|
@ -86,6 +86,11 @@
|
|||
"description": "confirm copy",
|
||||
"value": "true",
|
||||
"required": false
|
||||
},
|
||||
"CLOUDCMD_CONFIRM_MOVE": {
|
||||
"description": "confirm move",
|
||||
"value": "true",
|
||||
"required": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ const args = require('minimist')(argv.slice(2), {
|
|||
'terminal',
|
||||
'one-panel-mode',
|
||||
'confirm-copy',
|
||||
'confirm-move',
|
||||
'html-dialogs',
|
||||
'show-config',
|
||||
'vim',
|
||||
|
|
@ -70,6 +71,7 @@ const args = require('minimist')(argv.slice(2), {
|
|||
'terminal-path': env('terminal_path') || config('terminalPath'),
|
||||
'one-panel-mode': choose(env.bool('one_panel_mode'), config('onePanelMode')),
|
||||
'confirm-copy': choose(env.bool('confirm_copy'), config('confirmCopy')),
|
||||
'confirm-move': choose(env.bool('confirm_move'), config('confirmMove')),
|
||||
'html-dialogs': config('htmlDialogs'),
|
||||
'vim': choose(env.bool('vim'), config('vim')),
|
||||
},
|
||||
|
|
@ -119,6 +121,7 @@ function main() {
|
|||
config('vim', args.vim);
|
||||
config('htmlDialogs', args['html-dialogs']);
|
||||
config('confirmCopy', args['confirm-copy']);
|
||||
config('confirmMove', args['confirm-move']);
|
||||
config('onePanelMode', args['one-panel-mode']);
|
||||
config('configDialog', args['config-dialog']);
|
||||
|
||||
|
|
|
|||
|
|
@ -438,12 +438,13 @@ function OperationProto(operation, data) {
|
|||
|
||||
const {type} = options;
|
||||
|
||||
if (shouldAsk && config(type)) {
|
||||
const isCopy = type === 'copy';
|
||||
const title = isCopy ? 'Copy' : 'Rename/Move';
|
||||
|
||||
return message(title, to, names).then(ask);
|
||||
}
|
||||
const isCopy = type === 'copy';
|
||||
const option = isCopy ? 'confirmCopy' : 'confirmMove';
|
||||
const title = isCopy ? 'Copy' : 'Rename/Move';
|
||||
|
||||
if (shouldAsk && config(option))
|
||||
return message(title, to, names)
|
||||
.then(ask);
|
||||
|
||||
ask(to);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
"htmlDialogs": true,
|
||||
"contact": true,
|
||||
"confirmCopy": true,
|
||||
"confirmMove": true,
|
||||
"configDialog": true,
|
||||
"onePanelMode": false,
|
||||
"console": true,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
"--port ": "set port number",
|
||||
"--progress ": "show progress of file operations",
|
||||
"--confirm-copy ": "confirm copy",
|
||||
"--confirm-move ": "confirm move",
|
||||
"--html-dialogs ": "use html dialogs",
|
||||
"--open ": "open web browser when server started",
|
||||
"--name ": "set tab name in web browser",
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
"--no-one-panel-mode ": "unset one panel mode",
|
||||
"--no-progress ": "do not show progress of file operations",
|
||||
"--no-confirm-copy ": "do not confirm copy",
|
||||
"--no-confirm-move ": "do not confirm move",
|
||||
"--no-html-dialogs ": "do not use html dialogs",
|
||||
"--no-config-dialog ": "disable config dialog",
|
||||
"--no-console ": "disable console",
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ programs in browser from any computer, mobile or tablet device.
|
|||
--port set port number
|
||||
--progress show progress of file operations
|
||||
--confirm-copy confirm copy
|
||||
--confirm-move confirm move
|
||||
--html-dialogs use html dialogs
|
||||
--open open web browser when server started
|
||||
--name set tab name in web browser
|
||||
|
|
@ -56,6 +57,7 @@ programs in browser from any computer, mobile or tablet device.
|
|||
--no-one-panel-mode unset one panel mode
|
||||
--no-progress do not show progress of file operations
|
||||
--no-confirm-copy do not confirm copy
|
||||
--no-confirm-move do not confirm move
|
||||
--no-html-dialogs do not use html dialogs
|
||||
--no-contact disable contact
|
||||
--no-config-dialog disable config dialog
|
||||
|
|
|
|||
|
|
@ -134,6 +134,12 @@
|
|||
<input data-name="js-confirmCopy" type="checkbox" {{ confirmCopy }}>
|
||||
Confirm Copy
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
<input data-name="js-confirmMove" type="checkbox" {{ confirmMove }}>
|
||||
Confirm Move
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue