diff --git a/web/console.html b/web/console.html index 1c2d372..9375104 100644 --- a/web/console.html +++ b/web/console.html @@ -11,6 +11,7 @@
open viewer + open agenda
diff --git a/web/console.js b/web/console.js index 3c955b3..56c5940 100644 --- a/web/console.js +++ b/web/console.js @@ -15,6 +15,7 @@ const room = roomFromPath(); document.title = `${room} — console`; el('roomName').textContent = room; el('viewerLink').href = `/${room}`; +el('agendaLink').href = `/${room}/agenda`; const QUICK_MINUTES = [5, 10, 15, 20, 30]; const TONES = ['neutral', 'warn', 'alert']; diff --git a/web/picker.html b/web/picker.html index 2385a38..4ad3dd2 100644 --- a/web/picker.html +++ b/web/picker.html @@ -45,8 +45,13 @@

Point the stage display here

Console +

- The viewer needs no token. Keep the console link to yourself. + The viewer and the agenda need no token. Keep the console link to + yourself.

diff --git a/web/picker.js b/web/picker.js index 6f88bda..9854c6d 100644 --- a/web/picker.js +++ b/web/picker.js @@ -10,6 +10,7 @@ function showLinks(room) { const links = urls(room); el('viewerUrl').value = links.viewer; el('consoleUrl').value = links.console; + el('agendaUrl').value = links.agenda; el('qr').src = `/api/qr?text=${encodeURIComponent(links.viewer)}`; el('linksPanel').hidden = false; } @@ -68,13 +69,16 @@ async function loadRooms() { const edit = document.createElement('a'); edit.href = urls(room).console; edit.textContent = 'console'; + const agenda = document.createElement('a'); + agenda.href = `/${room}/agenda`; + agenda.textContent = 'agenda'; const remove = document.createElement('button'); remove.type = 'button'; remove.className = 'removeRoom'; remove.textContent = 'delete'; remove.addEventListener('click', () => deleteRoom(room)); - item.append(name, view, edit, remove); + item.append(name, view, edit, agenda, remove); list.append(item); } } catch { diff --git a/web/picker.test.mjs b/web/picker.test.mjs index 102f0ab..6576a58 100644 --- a/web/picker.test.mjs +++ b/web/picker.test.mjs @@ -38,6 +38,11 @@ test('builds a console link that carries the token', () => { assert.equal(links.console, 'http://192.168.1.20:8080/keynote/edit?token=s3cret'); }); +test('builds an agenda link that carries no token', () => { + const links = roomLinks('http://192.168.1.20:8080', 'keynote', 's3cret'); + assert.equal(links.agenda, 'http://192.168.1.20:8080/keynote/agenda'); +}); + test('omits the query when there is no token', () => { const links = roomLinks('http://host', 'keynote', ''); assert.equal(links.console, 'http://host/keynote/edit'); diff --git a/web/shared.js b/web/shared.js index 470411f..cbe3cd5 100644 --- a/web/shared.js +++ b/web/shared.js @@ -309,6 +309,7 @@ export function roomLinks(origin, room, token) { return { viewer: `${origin}/${room}`, console: `${origin}/${room}/edit${suffix}`, + agenda: `${origin}/${room}/agenda`, }; }