Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}
});
text.setData([
['Command', '$ ' + chalk.bold(cmd) ],
['Key up', 'Select prev server'],
['Key down', 'Select next server'],
[ 'Ctrl-c', 'Exit MultiSSH']
]);
// text.setContent('Curr. Command: $ ' + chalk.bold(cmd) + '\n\n' +
// 'Key up: Select prev server\n' +
// 'Key down: Select next server\n' +
// 'Ctrl-c: Exit MultiSSH\n');
var list = blessed.list({
parent: screen,
keys: true,
label : chalk.bold(' Server list '),
height : '85%',
width: '20%',
border: 'line',
top: 0,
right: 0,
style: {
fg: 'white',
bg: 'default',
border: {
fg: 'cyan',
bold : true
},
selected: {
// 'use strict';
const blessed = require('blessed');
left = require('./sources/scripts/left.js');
const Editor = require('editor-widget');
const screen = blessed.screen({
smartCSR: true,
autopadding: true,
title: 'Left',
fullUnicode: true,
});
const naviEl = blessed.list({
width: '30%-1',
height: '100%-2',
left: 2,
top: 1,
style: {
border: {
fg: 'white',
}
},
});
const textArea = blessed.textarea({
width: '70%-1',
height: '100%-2',
top: 2,
left: '30%',
function column(options) {
const style = {
item: {
hover: {
bg: "blue",
bold: true
}
},
selected: {
bg: "blue",
bold: true
}
};
const col = blessed.list({
left: options.left,
width: options.width,
right: options.right,
height: "100%-2",
tags: true,
keys: true,
vi: true,
border: {
type: "line"
},
style,
search: options.search
});
// contains the raw keys used to index into the next level
// unlike col.items which contains a human-readable formatted string
import blessed from 'blessed';
import diff from './diff';
import eventEmitter from '../events';
const list = blessed.list({
height: '50%',
padding: {
left: 3
},
top: '10%',
style: {
selected: {
bold: true
}
},
keys: true,
mouse: true,
tags: true
});
function getCurrentItem() {
update() {
this.setLabel(`{bold} ${this.label} {/}`);
this.list = blessed.list({
interactive: true,
keys: true,
style: {
selected: {
bg: 'white',
fg: 'black',
bold: true,
},
},
});
this.list.on('focus', () => this.log('focus'));
this.list.on('blur', () => this.log('blur'));
this.list.on('keypress', this.handleKeyPressed.bind(this));
this.list.on('select', this.handleSelected.bind(this));
this.list.setItems(this.items);
this.append(this.list);
export default (windowBox, stores) => {
let list = blessed.list({
parent: windowBox,
bottom: 0,
left: 0,
height: 10,
width: '100%',
scrollable: true,
interactive: false,
vi: true,
keys: true,
style: {
focus: {
selected: {
bg: Colors.FOCUS,
fg: 'white',
bold: true
},
export function listFactory(options?: Widgets.ListOptions): Widgets.BlessedElement {
const list: Widgets.ListElement = blessed.list(options);
return new Proxy(list, {
set(target, prop, value) {
if (prop === 'items') {
target.setItems(value);
} else {
target[prop] = value;
}
return true;
},
});
}
var outer_box = blessed.box({
fg : '#999999',
bg : 'default',
border : {
type : 'line',
fg : '#ffffff'
},
tags : true,
content : '{center}' + CONST.NAME.toUpperCase() + '{/center}\n\n{center}' + CONST.DESCRIPTION + '{/center}',
width : '90%',
height : '95%',
top : 'center',
left : 'center'
});
var logs = blessed.list({
parent : outer_box,
width : '90%',
height : '40%',
top : '15%',
left : 'center',
fg : 'blue',
border : {
type : 'line'
},
scrollbar : {
fg : 'blue',
ch : '|'
},
selectedBg : "#222222",
mouse : true,
keys : true,
var init = function (screen) {
styles.layout.parent = screen;
layout = blessed.layout(styles.layout);
styles.list.parent = layout;
styles.menubar.parent = layout;
list = blessed.list(styles.list);
menubar = blessed.listbar(styles.menubar);
styles.prompt.parent = list;
prompt = blessed.prompt(styles.prompt);
return {
layout : layout,
list : list,
menubar: menubar,
prompt : prompt
};
};
const columnWidth = options.columnWidth || this.columnWidth;
const pad = options.pad || this.pad;
const content = ' ' + parseToString(headers, calcuHeaderWidth(headers, columnWidth), pad)
const box = blessed.box({
...options,
content: content,
border: {
type: 'line'
},
interactive: false,
mouse: false,
style: {
fg: 'grey'
},
});
const list = blessed.list({
...TABLE_BASE_OPTIONS,
...options.cell,
label: '',
content: '',
parent: box,
top: 1,
border: {
transparent: true
},
height: '100%-3',
items: [],
style: {
...TABLE_BASE_OPTIONS.style,
...((options.style || {}).cell || {}),
},
});