Require a nickname before joining and add a quick-start help modal
New visitors (no nickname in localStorage) get a blocking welcome modal instead of a silently-generated guest-N name, so everyone in a room has a name they actually chose. It doubles as quick-start help (join a channel, mic/deafen/share shortcuts, drag-to-reposition on the spatial map) reachable any time via the new ? button. The sidebar nick field no longer falls back to a random name when cleared — it now just rejects the blank edit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
099d637815
commit
5bde1757d6
3 files changed
+90
-6
No files matched your search
@@ -288,6 +288,31 @@ body {
|
||||
.modal-actions button.ghost { background: transparent; color: var(--text-1); }
|
||||
.modal-actions button.ghost:hover { text-decoration: underline; }
|
||||
|
||||
/* welcome modal */
|
||||
#welcome-backdrop {
|
||||
position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid;
|
||||
place-items: center; z-index: 60;
|
||||
}
|
||||
#welcome-backdrop.hidden { display: none; }
|
||||
#welcome-modal {
|
||||
width: min(480px, 92vw); max-height: 90vh; overflow: auto;
|
||||
background: var(--bg-1); border-radius: 8px; padding: 20px;
|
||||
box-shadow: 0 12px 40px rgba(0,0,0,.6);
|
||||
}
|
||||
#welcome-modal h2 { font-size: 18px; margin-bottom: 6px; }
|
||||
#welcome-modal h3 { font-size: 13px; margin: 18px 0 8px; color: var(--text-1); }
|
||||
.field-label { display: block; font-size: 12px; color: var(--text-1); margin-bottom: 4px; }
|
||||
#welcome-nick {
|
||||
width: 100%; background: var(--bg-0); color: var(--text-0); border: 1px solid var(--bg-4);
|
||||
border-radius: 6px; padding: 8px 10px; font-size: 14px;
|
||||
}
|
||||
#welcome-nick:focus { outline: none; border-color: var(--brand); }
|
||||
#welcome-nick.invalid { border-color: var(--red); }
|
||||
.field-error { color: var(--red); font-size: 12px; margin-top: 4px; }
|
||||
.field-error.hidden { display: none; }
|
||||
.howto-list { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; font-size: 13px; color: var(--text-1); }
|
||||
.howto-list li { line-height: 1.4; }
|
||||
|
||||
/* matrix text chat panel */
|
||||
#mx-panel {
|
||||
position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 90vw;
|
||||
|
||||
Reference in new issue
Block a user