Skip to content

Commit fc04b84

Browse files
committed
feat: add little padding to terminal area
1 parent 844a731 commit fc04b84

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/components/terminal/terminal.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@ export default class TerminalComponent {
468468
position: relative;
469469
background: ${this.options.theme.background};
470470
overflow: hidden;
471+
padding: 0.25rem;
472+
box-sizing: border-box;
471473
`;
472474

473475
return this.container;
@@ -691,7 +693,18 @@ export default class TerminalComponent {
691693
* @param {string} data - Data to write
692694
*/
693695
write(data) {
694-
this.terminal.write(data);
696+
if (
697+
this.serverMode &&
698+
this.isConnected &&
699+
this.websocket &&
700+
this.websocket.readyState === WebSocket.OPEN
701+
) {
702+
// Send data through WebSocket instead of direct write
703+
this.websocket.send(data);
704+
} else {
705+
// For local mode or disconnected terminals, write directly
706+
this.terminal.write(data);
707+
}
695708
}
696709

697710
/**

src/components/terminal/terminalManager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ class TerminalManager {
472472
background: #1e1e1e;
473473
overflow: hidden;
474474
position: relative;
475+
padding: 0.25rem;
475476
}
476477
`;
477478
}

0 commit comments

Comments
 (0)