diff --git a/HELP.md b/HELP.md index db279b6f8d..309616e0ae 100644 --- a/HELP.md +++ b/HELP.md @@ -164,7 +164,7 @@ Hot keys |Key |Operation |:----------------------|:-------------------------------------------- | `F1` | help -| `F2` | rename or show `user menu` +| `F2` | show `user menu` | `F3` | view, change directory | `Shift + F3` | view as markdown | `F4` | edit @@ -466,7 +466,6 @@ Some config options can be overridden with environment variables, such as: ### User Menu -You can enable `user menu` with help of a flag `--user-menu` (bear in mind that file rename using `F2` will be disabled, but you can use `Shift` + `F6` or `F2` + `F2`). When you press `F2` Cloud Commander will read a file `.cloudcmd.menu.js` by walking up parent directories, if can't read it will try to read `~/.cloudcmd.menu.js`. Let's consider example `user menu` works file: diff --git a/client/key/index.js b/client/key/index.js index d4f99594a2..e530c81d54 100644 --- a/client/key/index.js +++ b/client/key/index.js @@ -195,10 +195,7 @@ function KeyProto() { break; case Key.F2: - if (CloudCmd.config('userMenu')) - return CloudCmd.UserMenu.show(); - - DOM.renameCurrent(current); + CloudCmd.UserMenu.show(); break; case Key.F3: diff --git a/client/listeners/index.js b/client/listeners/index.js index 7c4ec3486a..c523232d9f 100644 --- a/client/listeners/index.js +++ b/client/listeners/index.js @@ -142,10 +142,7 @@ module.exports.initKeysPanel = () => { }; function initF2() { - if (CloudCmd.config('userMenu')) - return CloudCmd.UserMenu.show(); - - return DOM.renameCurrent(); + CloudCmd.UserMenu.show(); } const getPanel = (side) => { diff --git a/html/index.html b/html/index.html index 7f6edac541..00ae977e2b 100644 --- a/html/index.html +++ b/html/index.html @@ -20,7 +20,6 @@
{{ fm }}
- diff --git a/json/config.json b/json/config.json index 406a442133..eec170c824 100644 --- a/json/config.json +++ b/json/config.json @@ -43,7 +43,6 @@ "importListen": false, "log": true, "dropbox": false, - "dropboxToken": "", - "userMenu": false + "dropboxToken": "" } diff --git a/server/route.js b/server/route.js index 845dcbbb65..0dece5f146 100644 --- a/server/route.js +++ b/server/route.js @@ -111,7 +111,6 @@ function indexProcessing(config, options) { const noConfig = !config('configDialog'); const noConsole = !config('console'); const noTerminal = !config('terminal'); - const noUserMenu = !config('userMenu'); const {panel} = options; let {data} = options; @@ -140,13 +139,6 @@ function indexProcessing(config, options) { data = data .replace('icon-terminal', 'icon-terminal none'); - if (noUserMenu) - data = data - .replace('icon-user-menu', 'icon-user-menu none'); - else - data = data - .replace('icon-rename', 'icon-rename none'); - const left = rendy(Template.panel, { side : 'left', content : panel, diff --git a/server/route.spec.js b/server/route.spec.js index 892fcceb5d..b2bd808d81 100644 --- a/server/route.spec.js +++ b/server/route.spec.js @@ -40,36 +40,6 @@ test('cloudcmd: route: buttons: no console', async (t) => { t.end(); }); -test('cloudcmd: route: buttons: user menu: disabled', async (t) => { - const options = { - config: { - userMenu: false, - }, - }; - - const {body} = await request.get('/', { - options, - }); - - t.ok(/icon-user-menu none/.test(body), 'should hide console'); - t.end(); -}); - -test('cloudcmd: route: buttons: user menu: enabled', async (t) => { - const options = { - config: { - userMenu: true, - }, - }; - - const {body} = await request.get('/', { - options, - }); - - t.ok(/icon-rename none/.test(body), 'should hide console'); - t.end(); -}); - test('cloudcmd: route: buttons: console', async (t) => { const config = { console: true,