Adding scrolling for peer list
This commit is contained in:
parent
308c3c210b
commit
f9c2f44d2e
25
sshChat.js
25
sshChat.js
@ -72,6 +72,12 @@ screen.key(['t', 'enter'], function (ch, key) {
|
||||
stdinBox.focus();
|
||||
});
|
||||
|
||||
// Return to chat
|
||||
screen.key(['p', 'enter'], function (ch, key) {
|
||||
sidebarBox.focus();
|
||||
});
|
||||
|
||||
|
||||
// Debug ONLY
|
||||
// screen.on('keypress', function(ch, key){
|
||||
// console.log(JSON.stringify(key));
|
||||
@ -126,22 +132,29 @@ const stdinBox = blessed.textbox({
|
||||
input: true
|
||||
});
|
||||
|
||||
// Create the sidebar box for connected peers
|
||||
const sidebarBox = blessed.box({
|
||||
|
||||
|
||||
let sidebarBox = blessed.box({
|
||||
parent: screen,
|
||||
top: '0',
|
||||
right: '0',
|
||||
width: '20%',
|
||||
height: '100%',
|
||||
content: '',
|
||||
border: {
|
||||
type: 'line'
|
||||
},
|
||||
style: {
|
||||
fg: 'white',
|
||||
bg: 'black',
|
||||
border: {
|
||||
fg: '#f0f0f0'
|
||||
bg: 'black'
|
||||
},
|
||||
keys: true,
|
||||
vi: true,
|
||||
alwaysScroll: true,
|
||||
scrollable: true,
|
||||
scrollbar: {
|
||||
style: {
|
||||
bg: 'yellow'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user