diff --git a/app.js b/app.js index 6dbf9f6..07e8cd0 100644 --- a/app.js +++ b/app.js @@ -83,7 +83,8 @@ function render() { const seconds = controller.time(); byId('clock').textContent = `${String(Math.floor(seconds / 60)).padStart(2, '0')}:${String(seconds % 60).padStart(2, '0')}`; - byId('controller-screen').textContent = controller.render(); + const screenView = document.querySelector('input[name="screen-view"]:checked').value; + byId('controller-screen').textContent = screenView === 'configured' ? controller.render_timing() : controller.render(); byId('signal-summary').textContent = green.length ? `Green: ${green.join(' / ')}` : yellow.length ? `Yellow: ${yellow.join(' / ')}` : clearing ? 'Red clearance · all red' : 'Startup · all red'; @@ -172,6 +173,7 @@ try { byId('lcd-toggle').addEventListener('change', () => { byId('controller-screen').classList.toggle('lcd-mode', byId('lcd-toggle').checked); }); + for (const el of document.querySelectorAll('input[name="screen-view"]')) el.addEventListener('change', render); for (const phase of phases) { document.querySelector(`[data-call="${phase.id}"]`).addEventListener('click', () => { controller.call(phase.id); diff --git a/icons.svg b/icons.svg new file mode 100644 index 0000000..4bdc291 --- /dev/null +++ b/icons.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/index.html b/index.html index 714d951..9b1aa64 100644 --- a/index.html +++ b/index.html @@ -101,7 +101,13 @@
Controller display -
+
+
+ + + + +
@@ -129,15 +135,17 @@
-