This commit is contained in:
Bozhidar 2024-04-28 14:02:39 +03:00
parent d5623b854f
commit 21a545829e
5 changed files with 8 additions and 5 deletions

View file

@ -9,7 +9,9 @@
@vite('resources/js/web-terminal.js')
<div id="js-web-terminal"></div>
<div class="bg-black/5 dark:bg-white/5 rounded p-4">
<div id="js-web-terminal"></div>
</div>
</div>

View file

@ -17,7 +17,7 @@
"css": [
"assets/web-terminal-c039bc4a.css"
],
"file": "assets/web-terminal-6085c523.js",
"file": "assets/web-terminal-940be4ad.js",
"isEntry": true,
"src": "resources/js/web-terminal.js"
}

View file

@ -10,7 +10,7 @@ if (terminalElement !== null) {
const terminal = new Terminal({
allowTransparency: true,
theme: {
background: '#09090b',
background: 'rgba(22,22,23,0)',
foreground: '#cccccc',
selectionBackground: '#399ef440',
black: '#666666',
@ -45,6 +45,7 @@ if (terminalElement !== null) {
fitAddon.fit();
const socket = new WebSocket(`ws://${window.location.host}/_shell/?sessionId=${window.terminal.sessionId}`);
socket.addEventListener('open', (_) => {
terminal.onData((data) => socket.send(data));