fix avatars being weird

This commit is contained in:
Braydon 2024-09-19 21:17:03 -04:00
parent 7a739bd10a
commit 52166e4228
10 changed files with 30 additions and 16 deletions

@ -26,7 +26,7 @@ const UserBillingPage = (): ReactElement => (
{/* Content */} {/* Content */}
<div className="flex flex-col gap-5"> <div className="flex flex-col gap-5">
<Separator className="opacity-65" /> <Separator className="opacity-65" />
Hello World Billing
</div> </div>
</main> </main>
); );

@ -47,8 +47,15 @@ const Branding = ({ href, size, className }: BrandingProps) => (
<Link <Link
className={cn(brandingVariants({ size, className }))} className={cn(brandingVariants({ size, className }))}
href={href ?? "/"} href={href ?? "/"}
draggable={false}
> >
<Image src="/media/logo.png" alt="Pulse App Logo" fill priority /> <Image
src="/media/logo.png"
alt="Pulse App Logo"
fill
priority
draggable={false}
/>
</Link> </Link>
); );
export default Branding; export default Branding;

@ -82,7 +82,7 @@ const OrganizationSelector = (): ReactElement => {
role="combobox" role="combobox"
> >
{selected ? ( {selected ? (
<div className="flex gap-2.5 items-center"> <div className="flex gap-3.5 items-center">
<OrganizationLogo <OrganizationLogo
organization={selected} organization={selected}
size="sm" size="sm"
@ -105,7 +105,7 @@ const OrganizationSelector = (): ReactElement => {
(organization: Organization, index: number) => ( (organization: Organization, index: number) => (
<CommandItem <CommandItem
key={index} key={index}
className="px-3.5 relative flex gap-2 items-center" className="px-3.5 relative flex gap-2.5 items-center"
value={organization.name} value={organization.name}
onSelect={(currentValue: string) => onSelect={(currentValue: string) =>
selectOrganization( selectOrganization(

@ -28,6 +28,7 @@ const Sidebar = (): ReactElement => {
<Link <Link
className="flex gap-4 items-center select-none group" className="flex gap-4 items-center select-none group"
href="/dashboard" href="/dashboard"
draggable={false}
> >
<Branding size="xs" /> <Branding size="xs" />
<h1 className="text-2xl font-bold group-hover:opacity-75 transition-all transform-gpu"> <h1 className="text-2xl font-bold group-hover:opacity-75 transition-all transform-gpu">

@ -72,6 +72,7 @@ const UserMenu = (): ReactElement => {
<DropdownMenuItem <DropdownMenuItem
className="gap-2.5 text-red-500 cursor-pointer" className="gap-2.5 text-red-500 cursor-pointer"
onClick={logout} onClick={logout}
draggable={false}
> >
<ArrowLeftEndOnRectangleIcon className="w-5 h-5" /> <ArrowLeftEndOnRectangleIcon className="w-5 h-5" />
<span>Logout</span> <span>Logout</span>
@ -92,19 +93,19 @@ const MyAccount = (): ReactElement => (
My Account My Account
</DropdownMenuLabel> </DropdownMenuLabel>
<DropdownMenuSeparator /> <DropdownMenuSeparator />
<Link href="/dashboard/user/profile"> <Link href="/dashboard/user/profile" draggable={false}>
<DropdownMenuItem className="gap-2.5 cursor-pointer"> <DropdownMenuItem className="gap-2.5 cursor-pointer">
<UserIcon className="w-5 h-5" /> <UserIcon className="w-5 h-5" />
<span>Profile</span> <span>Profile</span>
</DropdownMenuItem> </DropdownMenuItem>
</Link> </Link>
<Link href="/dashboard/user/billing"> <Link href="/dashboard/user/billing" draggable={false}>
<DropdownMenuItem className="gap-2.5 cursor-pointer"> <DropdownMenuItem className="gap-2.5 cursor-pointer">
<CreditCardIcon className="w-5 h-5" /> <CreditCardIcon className="w-5 h-5" />
<span>Billing</span> <span>Billing</span>
</DropdownMenuItem> </DropdownMenuItem>
</Link> </Link>
<Link href="/dashboard/user/settings"> <Link href="/dashboard/user/settings" draggable={false}>
<DropdownMenuItem className="gap-2.5 cursor-pointer"> <DropdownMenuItem className="gap-2.5 cursor-pointer">
<Cog6ToothIcon className="w-5 h-5" /> <Cog6ToothIcon className="w-5 h-5" />
<span>Settings</span> <span>Settings</span>

@ -27,7 +27,10 @@ const AvatarSetting = (): ReactElement => {
</div> </div>
{/* Setting */} {/* Setting */}
<UserAvatar user={user as User} /> <UserAvatar
className="select-none pointer-events-none"
user={user as User}
/>
</div> </div>
); );
}; };

@ -29,11 +29,11 @@ const TierSetting = (): ReactElement => {
{/* Setting */} {/* Setting */}
<div className="flex gap-10 items-center"> <div className="flex gap-10 items-center">
<span className="font-medium select-none pointer-events-none"> <span className="text-sm font-medium select-none pointer-events-none">
{capitalizeWords(user?.tier)} {capitalizeWords(user?.tier)}
</span> </span>
<Link href="/public#pricing"> <Link href="/#pricing">
<Button <Button
className="bg-background/30" className="bg-background/30"
size="sm" size="sm"

@ -80,9 +80,11 @@ const TFASetting = (): ReactElement => {
if (open) { if (open) {
setupTfa(); setupTfa();
} else if (enabledTfa) { } else if (enabledTfa) {
toast( toast("Two-Factor Auth", {
"Successfully enabled two-factor auth on your account!" icon: "🎉",
); description:
"Successfully enabled two-factor auth on your account!",
});
router.push("/dashboard"); router.push("/dashboard");
} }
}} }}
@ -159,7 +161,7 @@ const TFASetting = (): ReactElement => {
{!enabledTfa && ( {!enabledTfa && (
<DialogFooter className="sm:justify-center gap-1.5 text-sm opacity-75"> <DialogFooter className="sm:justify-center gap-1.5 text-sm opacity-75">
<b>NOTE:</b>Enabling two-factor auth will log <b>NOTE:</b>Enabling two-factor auth will log
you out of all devices. you out of all other devices.
</DialogFooter> </DialogFooter>
)} )}
</DialogContent> </DialogContent>

@ -64,7 +64,7 @@ const OrganizationLogo = ({
/> />
) : ( ) : (
<InitialsAvatar <InitialsAvatar
className="w-6 h-5 bg-muted rounded-full" className="-translate-y-0.5 w-[1.6rem] h-[1.6rem] flex justify-center items-center bg-muted rounded-full"
name={organization.name} name={organization.name}
/> />
)} )}

@ -64,7 +64,7 @@ const UserAvatar = ({
/> />
) : ( ) : (
<InitialsAvatar <InitialsAvatar
className="w-6 h-6 bg-muted rounded-full" className="w-6 h-6 flex justify-center items-center bg-muted rounded-full"
name={user.username} name={user.username}
/> />
)} )}