Skip to content

Commit

Permalink
feature(cloudcmd) --one-panel-mode -> --one-file-panel
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed May 6, 2018
1 parent 11c249c commit 291a5f3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 26 deletions.
16 changes: 8 additions & 8 deletions HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,24 @@ Cloud Commander supports command line parameters:
| `--html-dialogs` | use html dialogs
| `--open` | open web browser when server started
| `--name` | set tab name in web browser
| `--one-panel-mode` | set one panel mode
| `--one-file-panel` | show one file panel
| `--keys-panel` | show keys panel
| `--contact` | enable contact
| `--config-dialog` | enable config dialog
| `--console` | enable console
| `--sync-console-path` | sync console path
| `--terminal` | enable terminal
| `--terminal-path` | set terminal path
| `--vim` | enable vim hot keys
| `--keys-panel` | show keys panel
| `--columns` | set visible columns
| `--cache` | enable cache
| `--no-server` | do not start server
| `--no-auth` | disable authorization
| `--no-online` | load scripts from local server
| `--no-open` | do not open web browser when server started
| `--no-name` | set empty tab name in web browser
| `--no-one-panel-mode` | unset one panel mode
| `--no-one-file-panel` | show two file panels
| `--no-keys-panel` | hide keys panel
| `--no-progress` | do not show progress of file operations
| `--no-confirm-copy` | do not confirm copy
| `--no-confirm-move` | do not confirm move
Expand All @@ -112,7 +113,6 @@ Cloud Commander supports command line parameters:
| `--no-sync-console-path` | do not sync console path
| `--no-terminal` | disable terminal
| `--no-vim` | disable vim hot keys
| `--no-keys-panel` | hide keys panel
| `--no-columns` | set visible default columns
| `--no-cache` | disable cache

Expand Down Expand Up @@ -368,6 +368,7 @@ Here is description of options:
"online" : true, /* load js files from cdn or local path */
"open" : false /* open web browser when server started */
"cache" : true, /* enable cache */
"oneFilePanel" : false, /* show one file panel */
"keysPanel" : true, /* show classic panel with buttons of keys */
"port" : 8000, /* http port */
"ip" : null, /* ip or null(default) */
Expand All @@ -378,7 +379,6 @@ Here is description of options:
"confirmMove" : true, /* confirm move */
"htmlDialogs" : true, /* use html dialogs */
"showConfig" : false, /* show config at startap */
"onePanelMode" : false, /* set one panel mode */
"contact" : true, /* enable contact */
"configDialog" : true, /* enable config dialog */
"console" : true, /* enable console */
Expand All @@ -405,11 +405,11 @@ Some config options can be overridden with `environment variables` such:
- `CLOUDCMD_TERMINAL_PATH` - set terminal path
- `CLOUDCMD_CONFIG_DIALOG` - enable config dialog
- `CLOUDCMD_KEYS_PANEL` - show keys panel
- `CLOUDCMD_ONE_FILE_PANEL` - show one file panel
- `CLOUDCMD_AUTH` - enable authentication
- `CLOUDCMD_USERNAME` - set username
- `CLOUDCMD_PASSWORD` - set password
- `CLOUDCMD_ROOT` - set root directory
- `CLOUDCMD_ONE_PANEL_MODE` - set one panel mode
- `CLOUDCMD_VIM` - enable vim hot keys
- `CLOUDCMD_CONFIRM_COPY` - confirm copy
- `CLOUDCMD_CONFIRM_MOVE` - confirm move
Expand Down Expand Up @@ -447,10 +447,10 @@ Right mouse click button shows context menu with items:

One panel mode
---------------
Cloud Commander could work in one panel mode when screen size can not accommodate second panel or via `--one-panel-mode` options flag.
Cloud Commander can work in one panel mode when screen size can not accommodate second panel or via `--one-file-panel` options flag.
It could happen when mobile device, tablet or small window size used to work with file manager.

![One panel mode](/img/screen/one-panel-mode.png "One panel mode")
![One file panel](/img/screen/one-file-panel.png "One file panel")

Using as Middleware
---------------
Expand Down
5 changes: 5 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"value": "false",
"required": false
},
"CLOUDCMD_ONE_FILE_PANEL": {
"description": "show one file panel",
"value": "false",
"required": false
},
"CLOUDCMD_KEYS_PANEL": {
"description": "show keys panel",
"value": "true",
Expand Down
6 changes: 3 additions & 3 deletions bin/cloudcmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const args = require('minimist')(argv.slice(2), {
'sync-console-path',
'contact',
'terminal',
'one-panel-mode',
'one-panel',
'confirm-copy',
'confirm-move',
'html-dialogs',
Expand Down Expand Up @@ -75,7 +75,7 @@ const args = require('minimist')(argv.slice(2), {
'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')),
'config-dialog': choose(env.bool('config_dialog'), config('configDialog')),
'terminal-path': env('terminal_path') || config('terminalPath'),
'one-panel-mode': choose(env.bool('one_panel_mode'), config('onePanelMode')),
'one-panel': choose(env.bool('one_panel'), config('onePanel')),
'confirm-copy': choose(env.bool('confirm_copy'), config('confirmCopy')),
'confirm-move': choose(env.bool('confirm_move'), config('confirmMove')),
'html-dialogs': config('htmlDialogs'),
Expand Down Expand Up @@ -133,7 +133,7 @@ function main() {
config('htmlDialogs', args['html-dialogs']);
config('confirmCopy', args['confirm-copy']);
config('confirmMove', args['confirm-move']);
config('onePanelMode', args['one-panel-mode']);
config('onePanel', args['one-panel']);
config('configDialog', args['config-dialog']);
config('keysPanel', args['keys-panel']);

Expand Down
File renamed without changes
9 changes: 5 additions & 4 deletions json/help.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"--html-dialogs ": "use html dialogs",
"--open ": "open web browser when server started",
"--name ": "set tab name in web browser",
"--one-panel-mode ": "set one panel mode",
"--one-file-panel ": "show one file panel",
"--keys-panel ": "show keys panel",
"--config-dialog ": "enable config dialog",
"--console ": "enable console",
"--sync-console-path ": "sync console path",
Expand All @@ -28,14 +29,15 @@
"--terminal-path ": "set terminal path",
"--vim ": "enable vim hot keys",
"--columns ": "set visible columns",
"--keys-panel ": "show keys panel",
"--cache ": "enable cache",
"--no-server ": "do not start server",
"--no-auth ": "disable authorization",
"--no-online ": "load scripts from local server",
"--no-open ": "do not open web browser when server started",
"--no-name ": "set default tab name in web browser",
"--no-one-panel-mode ": "unset one panel mode",
"--no-one-panel ": "show two file panels",
"--no-keys-panel ": "hide keys panel",
"--no-one-file-panel ": "show two file panels",
"--no-progress ": "do not show progress of file operations",
"--no-confirm-copy ": "do not confirm copy",
"--no-confirm-move ": "do not confirm move",
Expand All @@ -46,7 +48,6 @@
"--no-contact ": "disable contact",
"--no-terminal ": "disable terminal",
"--no-vim ": "disable vim hot keys",
"--no-keys-panel ": "hide keys panel",
"--no-columns ": "set default visible columns",
"--no-cache ": "disable cache"
}
10 changes: 5 additions & 5 deletions man/cloudcmd.1
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,24 @@ programs in browser from any computer, mobile or tablet device.
--html-dialogs use html dialogs
--open open web browser when server started
--name set tab name in web browser
--one-panel-mode set one panel mode
--one-file-panele show one file panel
--keys-panel show keys panel
--contact enable contact
--config-dialog enable config dialog
--console enable console
--sync-console-path sync console path
--sync-console-path sync console path
--terminal enable terminal
--terminal-path set terminal path
--vim enable vim hot keys
--columns set visible columns
--keys-panel show keys panel
--cache enable cache
--no-auth disable authorization
--no-server do not start server
--no-online load scripts from local server
--no-open do not open web browser when server started
--no-name set default tab name in web browser
--no-one-panel-mode unset one panel mode
--no-one-file-panel show two file panels
--no-keys-panel hide keys panel
--no-progress do not show progress of file operations
--no-confirm-copy do not confirm copy
--no-confirm-move do not confirm move
Expand All @@ -70,7 +71,6 @@ programs in browser from any computer, mobile or tablet device.
--no-terminal disable terminal
--no-vim disable vim hot keys
--no-columns set visible default columns
--no-keys-panel hide keys panel
--no-cache disable cache

.SH RESOURCES AND DOCUMENTATION
Expand Down
12 changes: 6 additions & 6 deletions tmpl/config.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@
Cache
</label>
</li>
<li>
<label>
<input data-name="js-oneFilePanel" type="checkbox" {{ oneFilePanel }}>
One File Panel
</label>
</li>
<li>
<label>
<input data-name="js-keysPanel" type="checkbox" {{ keysPanel }}>
Expand Down Expand Up @@ -162,12 +168,6 @@
HTML Dialogs
</label>
</li>
<li>
<label>
<input data-name="js-onePanelMode" type="checkbox" {{ onePanelMode }}>
One Panel Mode
</label>
</li>
<li>
<label>
<input data-name="js-syncConsolePath" type="checkbox" {{ syncConsolePath }}>
Expand Down

0 comments on commit 291a5f3

Please sign in to comment.