Files
Void-Homelab/public/views/terminal.js
root 8ed3c5deb4 feat(ui): Terminal tab — embedded blackflame ttyd to CT300 (claude in persistent tmux)
ttyd on CT300 (:7681, firewalled to Traefik) behind same-origin /terminal via
Traefik + CF Access; iframe view + nav entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 23:09:35 +10:00

22 lines
804 B
JavaScript

// #/terminal — embeds the CT 300 web terminal (ttyd → persistent tmux/claude),
// same-origin under /terminal so it shares the Void's CF Access session.
import { el, mount } from '../dom.js';
export async function render(main) {
mount(main,
el('div', { class: 'term-bar' },
el('span', { class: 'term-title' }, '◆ Terminal'),
el('span', { class: 'muted', style: { fontSize: '11px' } }, 'claude @ ct300 · persistent tmux'),
el('button', { class: 'ghost', style: { marginLeft: 'auto' }, onclick: () => {
const f = document.getElementById('term-frame'); if (f) f.src = f.src;
} }, '⟳ Reconnect')
),
el('iframe', {
id: 'term-frame',
src: '/terminal/',
class: 'term-frame',
allow: 'clipboard-read; clipboard-write'
})
);
}