mirror of
https://github.com/ION606/web-to-fish.git
synced 2026-05-14 18:36:53 +00:00
safeguard
This commit is contained in:
+3
-3
@@ -93,7 +93,6 @@
|
|||||||
console.log('Char height:', charHeight);
|
console.log('Char height:', charHeight);
|
||||||
console.log('Rows calculated:', Math.floor(container.clientHeight / charHeight));
|
console.log('Rows calculated:', Math.floor(container.clientHeight / charHeight));
|
||||||
|
|
||||||
|
|
||||||
// Resize the terminal
|
// Resize the terminal
|
||||||
term.resize(cols, rows);
|
term.resize(cols, rows);
|
||||||
}
|
}
|
||||||
@@ -132,8 +131,9 @@
|
|||||||
if (data.event) {
|
if (data.event) {
|
||||||
switch (data.event) {
|
switch (data.event) {
|
||||||
case 'exit':
|
case 'exit':
|
||||||
term.write('\r\nConnection closed. Redirecting...\r\n');
|
term.write('\r\nConnection closed. Refreshing...\r\n');
|
||||||
setTimeout(() => window.location.pathname = '/login', 2000);
|
ws.close();
|
||||||
|
setTimeout(() => window.location.reload(), 2000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user