Skip to content

Commit 22d8bd0

Browse files
committed
styling for invitation pages
1 parent 0263d1e commit 22d8bd0

File tree

3 files changed

+55
-40
lines changed

3 files changed

+55
-40
lines changed

apps/sim/app/api/workspaces/invitations/[invitationId]/route.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ describe('Workspace Invitation [invitationId] API Route', () => {
221221

222222
expect(response.status).toBe(307)
223223
expect(response.headers.get('location')).toBe(
224-
'https://test.sim.ai/invite/token-abc123?error=expired'
224+
'https://test.sim.ai/invite/invitation-789?error=expired'
225225
)
226226
})
227227

@@ -245,7 +245,7 @@ describe('Workspace Invitation [invitationId] API Route', () => {
245245

246246
expect(response.status).toBe(307)
247247
expect(response.headers.get('location')).toBe(
248-
'https://test.sim.ai/invite/token-abc123?error=email-mismatch'
248+
'https://test.sim.ai/invite/invitation-789?error=email-mismatch'
249249
)
250250
})
251251
})

apps/sim/app/invite/components/layout.tsx

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import Image from 'next/image'
44
import { useBrandConfig } from '@/lib/branding/branding'
5+
import { GridPattern } from '@/app/(landing)/components/grid-pattern'
56

67
interface InviteLayoutProps {
78
children: React.ReactNode
@@ -11,26 +12,45 @@ export function InviteLayout({ children }: InviteLayoutProps) {
1112
const brandConfig = useBrandConfig()
1213

1314
return (
14-
<div className='flex min-h-screen flex-col items-center justify-center bg-white px-4 dark:bg-black'>
15-
<div className='mb-8'>
16-
<Image
17-
src={brandConfig.logoUrl || '/logo/b&w/medium.png'}
18-
alt='Sim Logo'
19-
width={120}
20-
height={67}
21-
className='dark:invert'
22-
priority
23-
/>
24-
</div>
15+
<main className='dark relative flex min-h-screen flex-col bg-[var(--brand-background-hex)] font-geist-sans text-white'>
16+
{/* Background pattern */}
17+
<GridPattern
18+
x={-5}
19+
y={-5}
20+
className='absolute inset-0 z-0 stroke-[#ababab]/5'
21+
width={90}
22+
height={90}
23+
aria-hidden='true'
24+
/>
2525

26-
{children}
26+
{/* Content */}
27+
<div className='relative z-10 flex flex-1 items-center justify-center px-4 pb-6'>
28+
<div className='w-full max-w-md'>
29+
<div className='mb-8 text-center'>
30+
<Image
31+
src={brandConfig.logoUrl || '/logo/primary/text/medium.png'}
32+
alt='Sim Logo'
33+
width={140}
34+
height={42}
35+
priority
36+
className='mx-auto'
37+
/>
38+
</div>
39+
<div className='rounded-xl border border-neutral-700/40 bg-neutral-800/50 p-6 backdrop-blur-sm'>
40+
{children}
41+
</div>
2742

28-
<footer className='mt-8 text-center text-gray-500 text-xs'>
29-
Need help?{' '}
30-
<a href='mailto:help@sim.ai' className='text-blue-400 hover:text-blue-300'>
31-
Contact support
32-
</a>
33-
</footer>
34-
</div>
43+
<div className='mt-6 text-center text-neutral-500/80 text-xs leading-relaxed'>
44+
Need help?{' '}
45+
<a
46+
href={`mailto:${brandConfig.supportEmail}`}
47+
className='text-[var(--brand-accent-hex)] underline-offset-4 transition hover:text-[var(--brand-accent-hover-hex)] hover:underline'
48+
>
49+
Contact support
50+
</a>
51+
</div>
52+
</div>
53+
</div>
54+
</main>
3555
)
3656
}

apps/sim/app/invite/components/status-card.tsx

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ const iconMap = {
2929
}
3030

3131
const iconColorMap = {
32-
userPlus: 'text-blue-500 dark:text-blue-400',
33-
mail: 'text-blue-500 dark:text-blue-400',
34-
users: 'text-blue-500 dark:text-blue-400',
32+
userPlus: 'text-[#701ffc]',
33+
mail: 'text-[#701ffc]',
34+
users: 'text-[#701ffc]',
3535
error: 'text-red-500 dark:text-red-400',
3636
success: 'text-green-500 dark:text-green-400',
3737
}
3838

3939
const iconBgMap = {
40-
userPlus: 'bg-blue-50 dark:bg-blue-950/20',
41-
mail: 'bg-blue-50 dark:bg-blue-950/20',
42-
users: 'bg-blue-50 dark:bg-blue-950/20',
40+
userPlus: 'bg-[#701ffc]/10',
41+
mail: 'bg-[#701ffc]/10',
42+
users: 'bg-[#701ffc]/10',
4343
error: 'bg-red-50 dark:bg-red-950/20',
4444
success: 'bg-green-50 dark:bg-green-950/20',
4545
}
@@ -58,7 +58,7 @@ export function InviteStatusCard({
5858
return (
5959
<div className='flex w-full max-w-md flex-col items-center'>
6060
<LoadingAgent size='lg' />
61-
<p className='mt-4 text-gray-400 text-sm'>{description}</p>
61+
<p className='mt-4 text-muted-foreground text-sm'>{description}</p>
6262
</div>
6363
)
6464
}
@@ -75,15 +75,15 @@ export function InviteStatusCard({
7575
</div>
7676
)}
7777

78-
<h1 className='mb-2 font-semibold text-black text-xl dark:text-white'>{title}</h1>
78+
<h1 className='mb-2 font-semibold text-[32px] text-white tracking-tight'>{title}</h1>
7979

80-
<p className='mb-6 text-gray-600 text-sm leading-relaxed dark:text-gray-300'>{description}</p>
80+
<p className='mb-6 text-neutral-400 text-sm leading-relaxed'>{description}</p>
8181

8282
<div className='flex w-full flex-col gap-3'>
8383
{isExpiredError && (
8484
<Button
8585
variant='outline'
86-
className='w-full border-brand-primary text-brand-primary hover:bg-brand-primary hover:text-white'
86+
className='h-11 w-full border-[var(--brand-primary-hex)] font-medium text-[var(--brand-primary-hex)] text-base transition-colors duration-200 hover:bg-[var(--brand-primary-hex)] hover:text-white'
8787
onClick={() => router.push('/')}
8888
>
8989
<RotateCcw className='mr-2 h-4 w-4' />
@@ -96,16 +96,11 @@ export function InviteStatusCard({
9696
key={index}
9797
variant={action.variant || 'default'}
9898
className={
99-
action.variant === 'default'
100-
? 'w-full'
99+
(action.variant || 'default') === 'default'
100+
? 'h-11 w-full bg-brand-primary font-medium text-base text-white shadow-[var(--brand-primary-hex)]/20 shadow-lg transition-colors duration-200 hover:bg-brand-primary-hover'
101101
: action.variant === 'outline'
102-
? 'w-full border-brand-primary text-brand-primary hover:bg-brand-primary hover:text-white'
103-
: 'w-full text-gray-600 hover:bg-gray-200 hover:text-black dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white'
104-
}
105-
style={
106-
action.variant === 'default'
107-
? { backgroundColor: 'var(--brand-primary-hex)', color: 'white' }
108-
: undefined
102+
? 'h-11 w-full border-[var(--brand-primary-hex)] font-medium text-[var(--brand-primary-hex)] text-base transition-colors duration-200 hover:bg-[var(--brand-primary-hex)] hover:text-white'
103+
: 'h-11 w-full text-muted-foreground hover:bg-secondary hover:text-foreground'
109104
}
110105
onClick={action.onClick}
111106
disabled={action.disabled || action.loading}

0 commit comments

Comments
 (0)