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>
22 lines
804 B
JavaScript
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'
|
|
})
|
|
);
|
|
}
|