mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 18:23:35 +00:00
feature(cloudcmd) only user menu on f2
This commit is contained in:
parent
a61eb22b62
commit
a8e679bf03
7 changed files with 4 additions and 51 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue