feature(cloudcmd) only user menu on f2

This commit is contained in:
coderaiser 2019-05-14 18:01:46 +03:00
parent a61eb22b62
commit a8e679bf03
7 changed files with 4 additions and 51 deletions

View file

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

View file

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