fix: preserve week-long sessions and add profile mascot
This commit is contained in:
1 parent
4e71e9b797
commit
40f24cf5f7
18 files changed
+240
-25
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -119,8 +119,8 @@ export function Login() {
|
||||
<Scanner
|
||||
onResult={handleScan}
|
||||
label="Point your camera at your lanyard QR"
|
||||
entryLabel="QR code or admin email"
|
||||
placeholder="QR code or admin email"
|
||||
entryLabel="QR Code"
|
||||
placeholder="QR Code"
|
||||
disabled={busy}
|
||||
submitDisabled={isEmailEntry(entry) && cooldown > 0}
|
||||
submitLabel={busy ? 'Sending...' : isEmailEntry(entry) ? cooldown ? `Resend in ${cooldown}s` : sent ? 'Resend magic link' : 'Send magic link' : 'Go'}
|
||||
|
||||
@@ -14,9 +14,12 @@ const CATEGORY_LABEL: Record<PointsLogRow['category'], string> = {
|
||||
admin: 'Other',
|
||||
};
|
||||
|
||||
const MANFRED_POSES = ['confident', 'coffee', 'celebrating', 'waving'];
|
||||
|
||||
export function Profile() {
|
||||
const { contact, registration, signOut, refresh } = useAuth();
|
||||
const { toast } = useToast();
|
||||
const [manfredPose] = useState(() => MANFRED_POSES[Math.floor(Math.random() * MANFRED_POSES.length)]);
|
||||
const [log, setLog] = useState<PointsLogRow[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
@@ -70,7 +73,18 @@ export function Profile() {
|
||||
|
||||
return (
|
||||
<section className="screen">
|
||||
<div className="h1">Profile</div>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 16 }}>
|
||||
<div className="h1" style={{ marginBottom: 0 }}>Profile</div>
|
||||
<img
|
||||
src={`/manfred/${manfredPose}.webp`}
|
||||
alt="Manfred"
|
||||
title="Manfred"
|
||||
data-testid="profile-manfred"
|
||||
width={76}
|
||||
height={76}
|
||||
style={{ objectFit: 'contain', flexShrink: 0 }}
|
||||
/>
|
||||
</div>
|
||||
<div className="card" style={{ textAlign: 'center' }}>
|
||||
<Avatar name={contact.full_name} id={contact.email} size={72} fs={26} />
|
||||
<div className="h2" style={{ marginTop: 10 }}>{contact.full_name}</div>
|
||||
|
||||
Reference in new issue
Block a user