feat: generate room name, link & QR code

This commit is contained in:
Henri Bourcereau 2026-04-25 22:23:52 +02:00
parent c46d26ae02
commit 04369ea28e
7 changed files with 350 additions and 53 deletions

View file

@ -287,6 +287,70 @@ a:hover { text-decoration: underline; }
.portal-error { color: var(--ui-red-accent); font-size: 0.875rem; margin-top: 0.5rem; }
.portal-success { color: var(--ui-green-accent); font-size: 0.875rem; margin-top: 0.5rem; }
/* ── Share URL row (lobby waiting card + game top bar) ──────────── */
.share-url-row {
display: flex;
align-items: center;
gap: 0.5rem;
background: rgba(0,0,0,0.18);
border: 1px solid rgba(200,164,72,0.25);
border-radius: 5px;
padding: 0.4rem 0.6rem;
}
.share-url-text {
flex: 1;
font-family: var(--font-ui);
font-size: 0.72rem;
color: rgba(242,232,208,0.75);
word-break: break-all;
user-select: all;
}
.share-copy-btn {
flex-shrink: 0;
font-family: var(--font-ui);
font-size: 0.72rem;
padding: 0.2rem 0.6rem;
border: 1px solid rgba(200,164,72,0.4);
border-radius: 3px;
background: rgba(200,164,72,0.1);
color: var(--ui-parchment);
cursor: pointer;
transition: background 0.15s;
white-space: nowrap;
}
.share-copy-btn:hover { background: rgba(200,164,72,0.22); }
/* ── QR code container ───────────────────────────────────────────── */
.qr-container {
width: 160px;
height: 160px;
margin: 0 auto;
border-radius: 4px;
overflow: hidden;
}
.qr-container svg { width: 100%; height: 100%; display: block; }
/* ── Share popover (in-game top bar) ─────────────────────────────── */
.share-popover {
width: 100%;
background: rgba(0,0,0,0.3);
border: 1px solid rgba(200,164,72,0.2);
border-radius: 6px;
padding: 0.75rem 1rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 0.4rem;
margin-bottom: 0.5rem;
}
.share-popover .qr-container { width: 120px; height: 120px; }
.share-popover-label {
font-size: 0.75rem;
color: rgba(242,232,208,0.6);
text-align: center;
margin: 0;
}
/* ── Game overlay (full-screen, covers portal during play) ───────── */
.game-overlay {
position: fixed;