change up the dashboard loader
All checks were successful
Deploy / deploy (ubuntu-latest, 2.44.0) (push) Successful in 2m2s

This commit is contained in:
Braydon 2024-09-19 02:29:14 -04:00
parent 8d7c41bac4
commit 5b6ae80948
6 changed files with 64 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -1,21 +1,62 @@
import { ReactElement } from "react"; import { ReactElement } from "react";
import Branding from "@/components/branding"; import Branding from "@/components/branding";
import { ArrowPathIcon, ChartBarSquareIcon } from "@heroicons/react/24/outline";
import Link from "next/link";
import SimpleTooltip from "@/components/simple-tooltip";
import Image from "next/image";
/** /**
* The loader for the dashboard pages. * The loader for the dashboard pages.
* *
* @return the loader jsx * @return the loader jsx
*/ */
const DashboardLoader = (): ReactElement => ( const DashboardLoader = (): ReactElement => {
<div return (
className="absolute w-screen h-screen flex flex-col gap-1.5 animate-pulse justify-center items-center" <div
style={{ className="absolute w-screen h-screen flex flex-col justify-center items-center select-none"
background: style={{
"linear-gradient(to top, hsla(240, 6%, 10%, 0.7), hsl(var(--background)))", background:
}} "linear-gradient(to top, hsla(240, 6%, 10%, 0.7), hsl(var(--background)))",
> }}
<Branding /> >
<h1 className="text-2xl font-semibold opacity-75">Loading</h1> {/* Center Content */}
</div> <div className="flex flex-col gap-3 animate-pulse justify-center items-center">
); <Branding />
<div className="flex gap-3.5 items-center">
<ArrowPathIcon className="w-7 h-7 animate-spin" />
<h1 className="text-2xl font-semibold opacity-75">
Loading
</h1>
</div>
</div>
{/* Support */}
<div className="absolute bottom-7 flex flex-col gap-1.5">
<p className="opacity-75 pointer-events-none">
Still can&apos;t connect?
</p>
<div className="flex gap-2.5 justify-center items-center">
{/* Status Page */}
<SimpleTooltip content="View Status Page">
<Link href="https://status.pulseapp.cc">
<ChartBarSquareIcon className="w-6 h-6" />
</Link>
</SimpleTooltip>
{/* Discord */}
<SimpleTooltip content="Join the Discord server">
<Link href="https://discord.pulseapp.cc">
<Image
src="/media/platforms/discord.png"
alt="Discord Logo"
width={24}
height={24}
/>
</Link>
</SimpleTooltip>
</div>
</div>
</div>
);
};
export default DashboardLoader; export default DashboardLoader;

@ -105,7 +105,7 @@ const OrganizationSelector = (): ReactElement => {
(organization: Organization, index: number) => ( (organization: Organization, index: number) => (
<CommandItem <CommandItem
key={index} key={index}
className="flex gap-2 items-center" className="px-3.5 relative flex gap-2 items-center"
value={organization.name} value={organization.name}
onSelect={(currentValue: string) => onSelect={(currentValue: string) =>
selectOrganization( selectOrganization(
@ -124,7 +124,7 @@ const OrganizationSelector = (): ReactElement => {
{organization.name} {organization.name}
{organization.snowflake === {organization.snowflake ===
selectedOrganization && ( selectedOrganization && (
<CheckIcon className="mx-auto w-4 h-4" /> <CheckIcon className="absolute right-3.5 w-4 h-4" />
)} )}
</CommandItem> </CommandItem>
) )

@ -29,7 +29,7 @@ const UserMenu = (): ReactElement => {
return ( return (
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger> <DropdownMenuTrigger>
<div className="px-5 py-2 flex gap-3 items-center font-medium bg-background/30 border hover:opacity-75 rounded-lg transition-all transform-gpu"> <div className="px-5 py-2 flex gap-2.5 items-center font-medium bg-background/30 border hover:opacity-75 rounded-lg transition-all transform-gpu">
<UserAvatar user={user as User} size="sm" />@ <UserAvatar user={user as User} size="sm" />@
{user?.username} {user?.username}
</div> </div>

@ -63,7 +63,10 @@ const OrganizationLogo = ({
fill fill
/> />
) : ( ) : (
<InitialsAvatar name={organization.name} /> <InitialsAvatar
className="w-6 h-5 bg-muted rounded-full"
name={organization.name}
/>
)} )}
</div> </div>
); );

@ -63,7 +63,10 @@ const UserAvatar = ({
fill fill
/> />
) : ( ) : (
<InitialsAvatar name={user.username} /> <InitialsAvatar
className="w-6 h-6 bg-muted rounded-full"
name={user.username}
/>
)} )}
</div> </div>
); );