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>
This commit is contained in:
root
2026-06-04 23:09:35 +10:00
parent 16f2083253
commit 8ed3c5deb4
5 changed files with 29 additions and 0 deletions

21
public/views/terminal.js Normal file
View File

@@ -0,0 +1,21 @@
// #/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'
})
);
}