feat(auth): guest login with random telegraph operator name
No email required — players pick male/female/mystery, get assigned a humorous period-appropriate operator name (e.g. "Dusty Clicksworth", "Ada Dottsworth", "The Phantom Sender"), can reroll, then hit "Begin Transmitting!" for instant play. Email/magic link moved to a collapsible section for cross-device access only. - server: POST /api/auth/guest creates guest profile + session - server/db: profiles.email now nullable, is_guest column added, migration recreates table for existing installs - client: names.ts with 15 names per gender category - client: LoginPage redesigned — gender picker → name display → play - client: useAuth gains setAuth() for direct session injection - 55 server + 44 client tests pass Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
export type Gender = 'male' | 'female' | 'mystery'
|
||||
|
||||
export const OPERATOR_NAMES: Record<Gender, string[]> = {
|
||||
male: [
|
||||
'Dusty Clicksworth',
|
||||
'Buck Dittley',
|
||||
'Flash Henderson',
|
||||
'Smokey McBeep',
|
||||
'Knuckles McGee',
|
||||
'Leadfoot Larry Tapsworth',
|
||||
'Jittery Jack Clicker',
|
||||
"Two-Finger Tex",
|
||||
'Wild Bill Keyer',
|
||||
'Rusty Tapper',
|
||||
'Cactus Pete Signalton',
|
||||
'Ol\' Sparky Johnson',
|
||||
'Slick Fingersby',
|
||||
'Gabby Dan Dashmore',
|
||||
'Young Buck Beepsworth',
|
||||
],
|
||||
female: [
|
||||
'Ada Dottsworth',
|
||||
'Clementine Dashford',
|
||||
'Pearl Signalton',
|
||||
'Nellie Tapsworth',
|
||||
'Hattie Clickmore',
|
||||
'Violet Waverley',
|
||||
'Mabel Keymoor',
|
||||
'Belle Dashmore',
|
||||
'Ruby Signalbright',
|
||||
'Clara Quick-Keys',
|
||||
'Ethel Clicksworth',
|
||||
'Dot O\'Dashes',
|
||||
'Hazel Transmitter',
|
||||
'Iris Tapford',
|
||||
'Goldie Wavemore',
|
||||
],
|
||||
mystery: [
|
||||
'The Phantom Sender',
|
||||
'Agent Dot-Dash',
|
||||
'X. Marconi',
|
||||
'The Ghost Operator',
|
||||
'Shadow Keyer',
|
||||
'The Unknown Transmitter',
|
||||
'Agent Zero-Zero',
|
||||
'The Masked Tapper',
|
||||
'Signal Unknown',
|
||||
'The Wandering Wave',
|
||||
'Cipher McGee',
|
||||
'The Midnight Sender',
|
||||
'Static McFrequency',
|
||||
'Professor Dash',
|
||||
'The Lone Transmitter',
|
||||
],
|
||||
}
|
||||
|
||||
export function randomName(gender: Gender): string {
|
||||
const list = OPERATOR_NAMES[gender]
|
||||
return list[Math.floor(Math.random() * list.length)]
|
||||
}
|
||||
Reference in New Issue
Block a user