diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index a38c8c1f..4e64d051 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,7 @@
-
+
@@ -41,30 +41,31 @@
- {
- "keyToString": {
- "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.git.unshallow": "true",
- "Shell Script.Node Server.js Start.executor": "Run",
- "Shell Script.Run backend and frontend.executor": "Run",
- "Shell Script.run_backend_frontend.executor": "Run",
- "git-widget-placeholder": "alpha-1.0",
- "ignore.virus.scanning.warn.message": "true",
- "last_opened_file_path": "D:/Programming Projects/SSH-Project-JB",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "npm.run_start.executor": "Run",
- "npm.run_start_frontend.executor": "Run",
- "npm.run_start_node_backend.executor": "Run",
- "npm.run_start_vite.executor": "Run",
- "npm.start.executor": "Run",
- "vue.rearranger.settings.migration": "true"
+
+}]]>
@@ -112,7 +113,7 @@
1733439468142
-
+
@@ -130,15 +131,31 @@
1733448864234
-
+
+
+ 1733449234908
+
+
+
+ 1733449234908
+
+
+
+ 1733449331913
+
+
+
+ 1733449331913
+
+
-
-
+
+
\ No newline at end of file
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx
index e6589d84..08ea4d34 100644
--- a/frontend/src/App.jsx
+++ b/frontend/src/App.jsx
@@ -100,6 +100,11 @@ const App = () => {
socket.current.onmessage = (event) => {
console.log('Received message:', event.data);
terminal.current.write(event.data);
+
+ const parsedData = JSON.parse(event.data);
+ if (parsedData.type === 'process_closed') {
+ notifyServerOfResize();
+ }
};
socket.current.onerror = (error) => {
@@ -114,6 +119,21 @@ const App = () => {
};
};
+ const notifyServerOfResize = () => {
+ if (socket.current && socket.current.readyState === WebSocket.OPEN) {
+ const { rows, cols } = terminal.current;
+ socket.current.send(
+ JSON.stringify({
+ type: 'resize',
+ rows,
+ cols,
+ height: terminalRef.current.offsetHeight,
+ width: terminalRef.current.offsetWidth,
+ })
+ );
+ }
+ };
+
const handleInputChange = (event, setState) => {
setState(event.target.value);
};