diff --git a/rotatyvote/app.py b/rotatyvote/app.py
index a6b416b..697c5e3 100644
--- a/rotatyvote/app.py
+++ b/rotatyvote/app.py
@@ -856,7 +856,8 @@ async def ws_voter(ws: WebSocket):
CSP = ("default-src 'self'; script-src 'self'; worker-src 'self' blob:; style-src 'self'; "
"img-src 'self' data: blob:; media-src 'self' blob: mediastream:; connect-src 'self' ws: wss:; "
- "frame-ancestors 'none'; base-uri 'none'; form-action 'self'; object-src 'none'")
+ # same origin only: the duplicated-screen page shows the admin page in a side panel
+ "frame-ancestors 'self'; base-uri 'none'; form-action 'self'; object-src 'none'")
class SecurityHeaders:
@@ -875,7 +876,7 @@ class SecurityHeaders:
(b"content-security-policy", CSP.encode()),
(b"referrer-policy", b"no-referrer"),
(b"x-content-type-options", b"nosniff"),
- (b"x-frame-options", b"DENY"),
+ (b"x-frame-options", b"SAMEORIGIN"),
(b"permissions-policy", b"camera=(self), microphone=(), geolocation=()"),
]
if not path.startswith("/static/vendor/"):
@@ -911,6 +912,8 @@ routes = [
Route("/", page("index.html")),
Route("/admin/{pid}", page("admin.html")),
Route("/screen/{pid}", page("screen.html")),
+ # duplicated screen: the projector view with the admin in a drawer, opened with the admin key
+ Route("/present/{pid}", page("screen.html")),
Route("/essai", page("essai.html")),
Route("/v/{pid}", page("vote.html")),
Route("/V/{pid}", lambda r: RedirectResponse(f"/v/{r.path_params['pid'].lower()}", status_code=301)),
diff --git a/static/admin.html b/static/admin.html
index d09e91c..f82f726 100644
--- a/static/admin.html
+++ b/static/admin.html
@@ -116,6 +116,10 @@
Lien projecteurRévoque le précédent
+
+
Écran dupliquéProjection et gestion sur le même écran
+
Ouvrir
+
RésultatsBulletins anonymes et décomptes
diff --git a/static/css/app.css b/static/css/app.css
index 0753efb..c165c7a 100644
--- a/static/css/app.css
+++ b/static/css/app.css
@@ -184,3 +184,5 @@ details.advanced { margin-top: 14px; }
details.advanced summary { font-size: .82rem; color: var(--ink-3); cursor: pointer; width: fit-content; padding: 4px 0; }
details.advanced summary:hover { color: var(--ink-2); }
details.advanced[open] summary { color: var(--ink-2); }
+.mode-title { font-size: 1.05rem; margin: 22px 0 2px; }
+.mode-title + .hint { margin: 0 0 8px; }
diff --git a/static/css/screen.css b/static/css/screen.css
index 4e923cf..6b61d8a 100644
--- a/static/css/screen.css
+++ b/static/css/screen.css
@@ -142,3 +142,16 @@ body.entry-q-on { --dock-qr: clamp(160px, min(46vh, 30vw), 520px); }
.s-main > section, .entry, #focus.enter *, #voters.bump { animation: none !important; }
.turnout .progress > div { transition: none; }
}
+
+/* duplicated screen: the admin slides in over the projection, the room sees it while it's open */
+.ctl {
+ position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(480px, 94vw); display: grid; grid-template-rows: auto 1fr;
+ background: var(--bg); box-shadow: -12px 0 40px rgba(28, 32, 54, .18); translate: 105% 0; transition: translate .35s cubic-bezier(.2, .7, .2, 1);
+}
+.ctl.open { translate: 0 0; }
+.ctl-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font: 700 1rem var(--round); }
+.ctl iframe { width: 100%; height: 100%; border: 0; background: var(--bg); }
+/* the manage button stays reachable in full screen, faint until hovered */
+:fullscreen .s-tools .ctl-btn { display: inline-flex; opacity: .3; }
+:fullscreen .s-tools .ctl-btn:hover, :fullscreen .s-tools .ctl-btn:focus-visible { opacity: 1; }
+@media (prefers-reduced-motion: reduce) { .ctl { transition: none; } }
diff --git a/static/index.html b/static/index.html
index 5fed75f..b757cd8 100644
--- a/static/index.html
+++ b/static/index.html
@@ -75,6 +75,8 @@
Scrutin créé
Conservez le lien d'administration : il ne pourra pas être récupéré.
+ Écran splitté
+ L'administration sur votre écran, le projecteur sur l'écran étendu.
+ Écran dupliqué
+ Un seul écran, recopié sur le projecteur. Le bouton « Gérer » ouvre l'administration par-dessus.
+