add coporate theme color variables

This commit is contained in:
Johannes Kirschbauer
2023-10-08 15:46:33 +02:00
parent cc47206fd6
commit d3310f861b
48 changed files with 15269 additions and 259 deletions

View File

@@ -1,41 +1,39 @@
"use client";
import { NetworkOverview } from "@/components/dashboard/NetworkOverview";
import { RecentActivity } from "@/components/dashboard/activity";
import { AppOverview } from "@/components/dashboard/appOverview";
import { NetworkOverview } from "@/components/dashboard/NetworkOverview";
import { Notifications } from "@/components/dashboard/notifications";
import { QuickActions } from "@/components/dashboard/quickActions";
import { TaskQueue } from "@/components/dashboard/taskQueue";
import { useAppState } from "@/components/hooks/useAppContext";
import { MachineContextProvider } from "@/components/hooks/useMachines";
import { LoadingOverlay } from "@/components/join/loadingOverlay";
import { tw } from "@/utils/tailwind";
import JoinPrequel from "@/views/joinPrequel";
interface DashboardCardProps {
children?: React.ReactNode;
rowSpan?: number;
sx?: string;
}
const DashboardCard = (props: DashboardCardProps) => {
const { children, rowSpan, sx = "" } = props;
return (
<div
className={tw`col-span-full row-span-${rowSpan || 1} xl:col-span-1 ${sx}`}
>
{children}
</div>
);
};
// interface DashboardCardProps {
// children?: React.ReactNode;
// rowSpan?: number;
// sx?: string;
// }
// const DashboardCard = (props: DashboardCardProps) => {
// const { children, rowSpan, sx = "" } = props;
// return (
// // <div className={tw`col-span-full row-span-${rowSpan} 2xl:col-span-1 ${sx}`}>
// <div className={tw`row-span-2`}>
// {children}
// </div>
// );
// };
interface DashboardPanelProps {
children?: React.ReactNode;
}
const DashboardPanel = (props: DashboardPanelProps) => {
const { children } = props;
return (
<div className="col-span-full row-span-1 xl:col-span-2">{children}</div>
);
};
// interface DashboardPanelProps {
// children?: React.ReactNode;
// }
// const DashboardPanel = (props: DashboardPanelProps) => {
// const { children } = props;
// return (
// <div className="col-span-full row-span-1 2xl:col-span-2">{children}</div>
// );
// };
export default function Dashboard() {
const { data, isLoading } = useAppState();
@@ -58,26 +56,20 @@ export default function Dashboard() {
if (data.isJoined) {
return (
<MachineContextProvider>
<div className="flex h-screen w-full">
<div className="grid w-full auto-rows-max grid-cols-1 grid-rows-none gap-4 xl:grid-cols-2 2xl:grid-cols-3 ">
<DashboardCard rowSpan={2}>
<div className="flex w-full">
<div className="grid w-full grid-flow-row grid-cols-3 gap-4">
<div className="row-span-2">
<NetworkOverview />
</DashboardCard>
<DashboardCard rowSpan={2}>
<RecentActivity />
</DashboardCard>
<DashboardCard>
<Notifications />
</DashboardCard>
<DashboardCard>
<QuickActions />
</DashboardCard>
<DashboardPanel>
</div>
<div className="col-span-2">
<AppOverview />
</DashboardPanel>
<DashboardCard sx={tw`xl:col-span-full 2xl:col-span-1`}>
<TaskQueue />
</DashboardCard>
</div>
<div className="row-span-2">
<RecentActivity />
</div>
<QuickActions />
<Notifications />
<TaskQueue />
</div>
</div>
</MachineContextProvider>