safeguard

This commit is contained in:
2024-12-15 12:29:09 -05:00
parent 28af0d709e
commit b2d2a172b6
+3 -3
View File
@@ -93,7 +93,6 @@
console.log('Char height:', charHeight);
console.log('Rows calculated:', Math.floor(container.clientHeight / charHeight));
// Resize the terminal
term.resize(cols, rows);
}
@@ -132,8 +131,9 @@
if (data.event) {
switch (data.event) {
case 'exit':
term.write('\r\nConnection closed. Redirecting...\r\n');
setTimeout(() => window.location.pathname = '/login', 2000);
term.write('\r\nConnection closed. Refreshing...\r\n');
ws.close();
setTimeout(() => window.location.reload(), 2000);
break;
default: