{/* Pi-specific toolbar */}
{boardLabel}
{/* Status indicator */}
{booted
? t('editor.pi.connected')
: board?.running
? t('editor.pi.starting')
: t('editor.pi.offline')}
{!board?.running ? (
startBoard(boardId)}
title={t('editor.pi.powerOnTitle')}
>
{t('editor.pi.startPi')}
) : (
<>
{t('editor.pi.connect')}
{t('editor.pi.disconnect')}
>
)}
{/* Tab strip */}
{/* Terminal tab */}
setActivePane('terminal')}
>
{t('editor.pi.terminal')}
{/* File tabs */}
{openFiles.map((f) => (
setActivePane(f.nodeId)}
>
{f.filename}
{
e.stopPropagation();
handleCloseFile(f.nodeId);
}}
title={t('editor.pi.close')}
>
×
))}
{/* Pane content */}
{/* Offline overlay — shown over terminal/editor when Pi is not running */}
{!board?.running && (
{t('editor.pi.offlineTitle', { board: boardLabel })}
{t('editor.pi.offlineSubtitle')}
startBoard(boardId)}>
{t('editor.pi.startPi')}
{t('editor.pi.offlineNote1')}
{t('editor.pi.offlineNote2')}
)}
{/* Booting overlay — shown while the guest Linux comes up (~30-60s).
Without it the user clicks Start and sees nothing change for a
minute and assumes it is broken. */}
{booting && (
{t('editor.pi.bootingTitle', { board: boardLabel })}
{t('editor.pi.bootingNote')}
)}
{activePane === 'terminal' ? (
{t('editor.pi.loadingTerminal')} }>
) : activeFileNode ? (
setContent(boardId, activePane, val ?? '')}
options={{
minimap: { enabled: false },
fontSize: 13,
automaticLayout: true,
scrollBeyondLastLine: false,
wordWrap: 'on',
}}
/>
) : (
{t('editor.pi.selectFile')}
)}