Next.js Supabase V3 (#463)
Version 3 of the kit: - Radix UI replaced with Base UI (using the Shadcn UI patterns) - next-intl replaces react-i18next - enhanceAction deprecated; usage moved to next-safe-action - main layout now wrapped with [locale] path segment - Teams only mode - Layout updates - Zod v4 - Next.js 16.2 - Typescript 6 - All other dependencies updated - Removed deprecated Edge CSRF - Dynamic Github Action runner
This commit is contained in:
committed by
GitHub
parent
4912e402a3
commit
7ebff31475
@@ -87,20 +87,19 @@ export function PersonalAccountDropdown({
|
||||
aria-label="Open your profile menu"
|
||||
data-test={'account-dropdown-trigger'}
|
||||
className={cn(
|
||||
'group/trigger fade-in focus:outline-primary flex cursor-pointer items-center group-data-[minimized=true]/sidebar:px-0',
|
||||
'group/trigger fade-in focus:outline-primary flex cursor-pointer items-center group-data-[collapsible=icon]:px-0',
|
||||
className ?? '',
|
||||
{
|
||||
['active:bg-secondary/50 items-center gap-4 rounded-md' +
|
||||
' hover:bg-secondary border border-dashed p-2 transition-colors']:
|
||||
['active:bg-secondary/50 group-data-[collapsible=none]:hover:bg-secondary items-center gap-4 rounded-md border-dashed p-2 transition-colors group-data-[collapsible=none]:border']:
|
||||
showProfileName,
|
||||
},
|
||||
)}
|
||||
>
|
||||
<ProfileAvatar
|
||||
className={
|
||||
'group-hover/trigger:border-background/50 rounded-md border border-transparent transition-colors'
|
||||
'group-hover/trigger:border-background/50 border border-transparent transition-colors'
|
||||
}
|
||||
fallbackClassName={'rounded-md border'}
|
||||
fallbackClassName={'border'}
|
||||
displayName={displayName ?? user?.email ?? ''}
|
||||
pictureUrl={personalAccountData?.picture_url}
|
||||
/>
|
||||
@@ -108,7 +107,7 @@ export function PersonalAccountDropdown({
|
||||
<If condition={showProfileName}>
|
||||
<div
|
||||
className={
|
||||
'fade-in flex w-full flex-col truncate text-left group-data-[minimized=true]/sidebar:hidden'
|
||||
'fade-in flex w-full flex-col truncate text-left group-data-[collapsible=icon]:hidden'
|
||||
}
|
||||
>
|
||||
<span
|
||||
@@ -128,19 +127,25 @@ export function PersonalAccountDropdown({
|
||||
|
||||
<ChevronsUpDown
|
||||
className={
|
||||
'text-muted-foreground mr-1 h-8 group-data-[minimized=true]/sidebar:hidden'
|
||||
'text-muted-foreground mr-1 h-8 group-data-[collapsible=icon]:hidden'
|
||||
}
|
||||
/>
|
||||
</If>
|
||||
</DropdownMenuTrigger>
|
||||
|
||||
<DropdownMenuContent className={'xl:min-w-[15rem]!'}>
|
||||
<DropdownMenuItem className={'h-10! rounded-none'}>
|
||||
<DropdownMenuItem
|
||||
className={'group/item h-10! data-[highlighted]:bg-transparent'}
|
||||
>
|
||||
<div
|
||||
className={'flex flex-col justify-start truncate text-left text-xs'}
|
||||
>
|
||||
<div className={'text-muted-foreground'}>
|
||||
<Trans i18nKey={'common:signedInAs'} />
|
||||
<div
|
||||
className={
|
||||
'text-muted-foreground group-hover/item:text-muted-foreground!'
|
||||
}
|
||||
>
|
||||
<Trans i18nKey={'common.signedInAs'} />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -151,48 +156,48 @@ export function PersonalAccountDropdown({
|
||||
|
||||
<DropdownMenuSeparator />
|
||||
|
||||
<DropdownMenuItem asChild>
|
||||
<Link
|
||||
className={'s-full flex cursor-pointer items-center space-x-2'}
|
||||
href={paths.home}
|
||||
>
|
||||
<Home className={'h-5'} />
|
||||
<DropdownMenuItem
|
||||
render={
|
||||
<Link className={'flex items-center gap-x-2'} href={paths.home} />
|
||||
}
|
||||
>
|
||||
<Home className={'h-4 w-4'} />
|
||||
|
||||
<span>
|
||||
<Trans i18nKey={'common:routes.home'} />
|
||||
</span>
|
||||
</Link>
|
||||
<span>
|
||||
<Trans i18nKey={'common.routes.home'} />
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
|
||||
<DropdownMenuSeparator />
|
||||
|
||||
<DropdownMenuItem asChild>
|
||||
<Link
|
||||
className={'s-full flex cursor-pointer items-center space-x-2'}
|
||||
href={'/docs'}
|
||||
>
|
||||
<MessageCircleQuestion className={'h-5'} />
|
||||
<DropdownMenuItem
|
||||
render={
|
||||
<Link className={'flex items-center gap-x-2'} href={'/docs'} />
|
||||
}
|
||||
>
|
||||
<MessageCircleQuestion className={'h-4 w-4'} />
|
||||
|
||||
<span>
|
||||
<Trans i18nKey={'common:documentation'} />
|
||||
</span>
|
||||
</Link>
|
||||
<span>
|
||||
<Trans i18nKey={'common.documentation'} />
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
|
||||
<If condition={isSuperAdmin}>
|
||||
<DropdownMenuSeparator />
|
||||
|
||||
<DropdownMenuItem asChild>
|
||||
<Link
|
||||
className={
|
||||
's-full flex cursor-pointer items-center space-x-2 text-yellow-700 dark:text-yellow-500'
|
||||
}
|
||||
href={'/admin'}
|
||||
>
|
||||
<Shield className={'h-5'} />
|
||||
<DropdownMenuItem
|
||||
render={
|
||||
<Link
|
||||
className={
|
||||
'flex items-center gap-x-2 text-yellow-700 dark:text-yellow-500'
|
||||
}
|
||||
href={'/admin'}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Shield className={'h-4 w-4'} />
|
||||
|
||||
<span>Super Admin</span>
|
||||
</Link>
|
||||
<span>Super Admin</span>
|
||||
</DropdownMenuItem>
|
||||
</If>
|
||||
|
||||
@@ -210,11 +215,11 @@ export function PersonalAccountDropdown({
|
||||
className={'cursor-pointer'}
|
||||
onClick={signOutRequested}
|
||||
>
|
||||
<span className={'flex w-full items-center space-x-2'}>
|
||||
<LogOut className={'h-5'} />
|
||||
<span className={'flex w-full items-center gap-x-2'}>
|
||||
<LogOut className={'h-4 w-4'} />
|
||||
|
||||
<span>
|
||||
<Trans i18nKey={'auth:signOut'} />
|
||||
<Trans i18nKey={'auth.signOut'} />
|
||||
</span>
|
||||
</span>
|
||||
</DropdownMenuItem>
|
||||
|
||||
Reference in New Issue
Block a user