feat: implement terminal input broadcasting across multiple active panes

This commit is contained in:
2026-06-19 19:54:31 +01:00
parent 790cfc581a
commit 6539a7f2c4
2 changed files with 45 additions and 1 deletions
+13
View File
@@ -17,6 +17,18 @@ const props = defineProps<{
showSftp: boolean;
}>();
const emit = defineEmits<{
(e: 'broadcast-data', data: string): void;
}>();
defineExpose({
sendData: (data: string) => {
if (ws && ws.readyState === WebSocket.OPEN) {
ws.send(new TextEncoder().encode(data));
}
}
});
const termEl = ref<HTMLElement | null>(null);
const status = ref("Connecting…");
const connId = ref<string | null>(null);
@@ -97,6 +109,7 @@ onMounted(async () => {
if (ws && ws.readyState === WebSocket.OPEN) {
ws.send(new TextEncoder().encode(data));
}
emit("broadcast-data", data);
});
term.onResize(({ cols, rows }) => {