This commit is contained in:
raven 2023-01-15 23:01:30 -05:00
parent 7511ad9f11
commit 927663a2ca
1 changed files with 0 additions and 15 deletions

View File

@ -254,12 +254,7 @@ async function handleCommand(input) {
} else {
console.log(`${USERNAME}: ${input}`)
}
}
}
swarm.on('connection', conn => {
@ -317,7 +312,6 @@ swarm.on('error', (err) => {
console.log('Error connecting to peer:', err);
});
// Join a common topic
const topic = process.argv[2] ? b4a.from(process.argv[2], 'hex') : crypto.randomBytes(32)
@ -338,15 +332,11 @@ setTimeout(() => {
})
}, 1000);
// Append the boxes to the screen
screen.append(mainBox);
screen.append(stdinBox);
screen.append(sidebarBox);
// Handle input in the stdinBox
stdinBox.on('submit', (input) => {
// handle the input here
@ -354,13 +344,8 @@ stdinBox.on('submit', (input) => {
handleCommand(input);
// clear the input field
stdinBox.focus();
// screen.render();
});
// setInterval(() => {
// mainBox.scrollTo(mainBox.getScrollHeight());
// }, 1000);
stdinBox.focus();
// Render the screen
screen.render()