Files
spacedrive/interface/app/onboarding/Layout.tsx
Vítor Vasconcellos f7277d602f Frontend misc fixes and deps update (#1650)
Dependencies overhaul
 - Update dependencies for all projects (except Mobile-only deps)
 - Remove unused dependencies from all projects (except Mobile-only deps)
 - Fix Storybook failing to import sd/ui style
 - Add Node 21 as not supported due to sass-loader not working on it yet
 - Add work-around for new rook version requiring webpack specific global property
 - Fix landing dev not working due to missing default env value on dev
 - Fix some incorrect uses of phosphor-icons non server side icons on server components on landing
 - Fix some incorrect uses of phosphor-icons server side icon on client components on landing
 - Fix landing fail to build on dev due to always required a Github Token to get the latest release
 - Fix new Next.js version not suporting Response.redirect due to immutable Headers
 - Add Gitlab as social link for teams page
 - Update Vítor's team photo
 - Add Vítor's twitter link
 - Fix some warning due to missing useEffect dependencies
 - Remove test-files dir
 - Fix QuickPreview unblurred buttons in Linux
 - Formatting
2023-10-24 07:51:58 +00:00

54 lines
1.7 KiB
TypeScript

import { BloomOne } from '@sd/assets/images';
import clsx from 'clsx';
import { Navigate, Outlet } from 'react-router';
import { useDebugState } from '@sd/client';
import DragRegion from '~/components/DragRegion';
import { useOperatingSystem } from '~/hooks/useOperatingSystem';
import DebugPopover from '../$libraryId/Layout/Sidebar/DebugPopover';
import { macOnly } from '../$libraryId/Layout/Sidebar/helpers';
import { OnboardingContext, useContextValue } from './context';
import Progress from './Progress';
export const Component = () => {
const os = useOperatingSystem();
const debugState = useDebugState();
const ctx = useContextValue();
if (ctx.libraries.isLoading) return null;
if (ctx.library?.uuid !== undefined)
return <Navigate to={`/${ctx.library.uuid}/overview`} replace />;
return (
<OnboardingContext.Provider value={ctx}>
<div
className={clsx(
macOnly(os, 'bg-opacity-[0.75]'),
'flex h-screen flex-col bg-sidebar text-ink'
)}
>
<DragRegion className="z-50 h-9" />
<div className="-mt-5 flex grow flex-col gap-8 p-10">
<div className="flex grow flex-col items-center justify-center">
<Outlet />
</div>
<Progress />
</div>
<div className="flex justify-center p-4">
<p className="text-xs text-ink-dull opacity-50">
&copy; {new Date().getFullYear()} Spacedrive Technology Inc.
</p>
</div>
<div className="absolute -z-10">
<div className="relative h-screen w-screen">
<img src={BloomOne} className="absolute h-[2000px] w-[2000px]" />
{/* <img src={BloomThree} className="absolute w-[2000px] h-[2000px] -right-[200px]" /> */}
</div>
</div>
{debugState.enabled && <DebugPopover />}
</div>
</OnboardingContext.Provider>
);
};