diff --git a/package.json b/package.json index 25becea57..6391112b4 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "test": "vitest", "test:ui": "vitest --ui", "test:run": "vitest run", - "test:coverage": "vitest run --coverage" + "test:coverage": "vitest run --coverage", + "postinstall": "prisma generate" }, "dependencies": { "@ctrl/deluge": "^4.1.0", diff --git a/src/components/layout/admin/main-admin.layout.tsx b/src/components/layout/admin/main-admin.layout.tsx new file mode 100644 index 000000000..f0090b38f --- /dev/null +++ b/src/components/layout/admin/main-admin.layout.tsx @@ -0,0 +1,164 @@ +import { + Alert, + AppShell, + Avatar, + Box, + Flex, + Footer, + Group, + Header, + Menu, + NavLink, + Navbar, + Paper, + Text, + TextInput, + ThemeIcon, + UnstyledButton, +} from '@mantine/core'; +import { + IconAdjustmentsAlt, + IconAlertTriangle, + IconBook2, + IconBrandDiscord, + IconBrandGithub, + IconDashboard, + IconGitFork, + IconHome, + IconLogout, + IconMailForward, + IconQuestionMark, + IconSun, + IconUser, + IconUserSearch, +} from '@tabler/icons-react'; +import { signOut } from 'next-auth/react'; +import { useTranslation } from 'next-i18next'; +import Image from 'next/image'; +import Link from 'next/link'; +import { ReactNode } from 'react'; +import { usePackageAttributesStore } from '~/tools/client/zustands/usePackageAttributesStore'; + +import { Logo } from '../Logo'; + +interface MainLayoutProps { + children: ReactNode; +} + +export const MainLayout = ({ children }: MainLayoutProps) => { + const { t } = useTranslation(); + const { attributes } = usePackageAttributesStore(); + return ( + + + + + + } + label="Home" + component={Link} + href="/admin/users" + /> + + + + } + > + } + label="Manage" + component={Link} + href="/admin/users" + /> + } + label="Invites" + component={Link} + href="/admin/users/invites" + /> + + + + + } + > + } label="Documentation" /> + } label="Report an issue / bug" /> + } label="Ask a question" /> + } label="Contribute" /> + + + + } + header={ +
+ + + + + + + + + + + + + + }>Switch theme + }>View Profile + }>Default Dashboard + + } + color="red" + onClick={() => signOut()} + > + Logout + + + + + + +
+ } + footer={ + + } + > + + {children} + +
+ ); +}; diff --git a/src/pages/user/settings.tsx b/src/pages/user/settings.tsx new file mode 100644 index 000000000..20e4c55fa --- /dev/null +++ b/src/pages/user/settings.tsx @@ -0,0 +1,12 @@ +import { Title } from "@mantine/core"; +import { MainLayout } from "~/components/layout/admin/main-admin.layout"; + +const SettingsPage = () => { + return ( + + Good morning, Manicraft1001 + + ) +} + +export default SettingsPage; \ No newline at end of file