Skip to content
Snippets Groups Projects
Commit 1e16bf72 authored by echicken's avatar echicken :chicken:
Browse files

Assorted minor fixes

parent 6afbf87f
No related branches found
No related tags found
No related merge requests found
......@@ -1985,7 +1985,7 @@
},
"node_modules/@swag/ts4s": {
"version": "1.0.0",
"resolved": "git+ssh://git@gitlab.synchro.net:swag/ts4s.git#d3f8edb99956374272e3fd68dc8ed22d09f1e5f5",
"resolved": "git+ssh://git@gitlab.synchro.net:swag/ts4s.git#6c247e3c467b9131673877aafc8ab1da57d24a10",
"dependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
......@@ -3454,7 +3454,7 @@
},
"node_modules/swindows": {
"version": "1.0.0",
"resolved": "git+ssh://git@gitlab.synchro.net:echicken/swindows.git#ff531ca49b851d06672c9872407ef038402c7b62"
"resolved": "git+ssh://git@gitlab.synchro.net:echicken/swindows.git#17b759f305b1d5079737ffe09af14f55822b9d16"
},
"node_modules/to-fast-properties": {
"version": "2.0.0",
......
......@@ -24,7 +24,7 @@ export default class ActivityWindow extends ShellWindow {
constructor(name: string, wm: WindowManager, position: IPosition, size: ISize, footer: IBorderText) {
super(name, wm, position, size, footer);
this.window.wrap = defs.WRAP.WORD;
this.window.write(HELP.split('\r\n').slice(2).join('\r\n'));
this.window.write(HELP.split('\r\n').slice(1).join('\r\n'));
this.inputWindow = new ControlledWindow({
windowManager: wm,
......@@ -86,11 +86,11 @@ export default class ActivityWindow extends ShellWindow {
this.window.scrollTo({ x: 0, y: this.window.contentWindow.dataHeight - this.window.contentWindow.size.height });
break;
case keydefs.CTRL_H: // Help
this.window.write(HELP);
this.window.write(`\r\n${HELP}`);
break;
case keydefs.CTRL_W: // Who's Online
const presence = getPresence();
if (presence !== undefined) this.window.write(presence);
if (presence !== undefined) this.window.write(`\r\n${presence}`);
break;
case keydefs.CTRL_S: // Send
if (!this.forceFocus) {
......@@ -112,7 +112,7 @@ export default class ActivityWindow extends ShellWindow {
if (str !== '\x04') msg.push(str);
}
if (msg.length < 1) return;
this.window.write(`\x01n\x01m${system.timestr(time())}\x01n\x01w\r\n`);
this.window.write(`\r\n\x01n\x01m${system.timestr(time())}\x01n\x01w\r\n`);
this.window.write(msg.join('\r\n'));
}
......
......@@ -126,12 +126,11 @@ export default class UI {
break;
// Global commands not handled by any window
case keydefs.CTRL_D: // Disconnect immediately
this.windows[0].close?.();
bbs.hangup();
break;
case keydefs.CTRL_L: // Log off
this.windows[0].close?.();
bbs.logoff(true);
console.clear();
bbs.logout();
break;
// Pass input to the focused window
default:
......
......@@ -34,9 +34,9 @@ export function loadItems(filename: string, wm: WindowManager): ILightBarItem[]
const name = section.name as string;
let onSelect = () => {};
if (section.xtrn !== undefined) {
onSelect = () => exec(wm, bbs.exec_xtrn.bind(bbs), section.xtrn as string)
onSelect = () => exec(wm, bbs.exec_xtrn.bind(bbs), section.xtrn as string);
} else if (section.exec !== undefined) {
onSelect = () => exec(wm, bbs.exec.bind(bbs), section.exec as string)
onSelect = () => exec(wm, bbs.exec.bind(bbs), section.exec as string);
} else if (section.eval !== undefined) {
onSelect = () => {
// TypeScript disallows eval from modules (ts4s) so we'll just fake it.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment