Settings - WIP
* User account settings * Workspace settings * Workspace membership management *
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
'use client';
|
||||
|
||||
import AccountNameForm from '@/features/user/components/account-name-form';
|
||||
import ChangePassword from "@/features/user/components/change-password";
|
||||
import ChangeEmail from "@/features/user/components/change-email";
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import React from "react";
|
||||
|
||||
export default function Home() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<AccountNameForm />
|
||||
|
||||
<Separator className="my-4" />
|
||||
|
||||
<ChangeEmail />
|
||||
|
||||
<Separator className="my-4" />
|
||||
|
||||
<ChangePassword />
|
||||
</>);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
export default function SettingsLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<div className="w-full flex justify-center z-10 flex-shrink-0">
|
||||
<div className={`w-[800px]`}>{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
'use client';
|
||||
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
export default function Home() {
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
router.push('/settings/account');
|
||||
}, [router]);
|
||||
|
||||
return <></>;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
"use client";
|
||||
|
||||
import { Separator } from "@/components/ui/separator";
|
||||
import WorkspaceInviteSection from "@/features/workspace/components/workspace-invite-section";
|
||||
import React from "react";
|
||||
import WorkspaceInviteDialog from "@/features/workspace/components/workspace-invite-dialog";
|
||||
|
||||
const WorkspaceMembersTable = React.lazy(() => import('@/features/workspace/components/workspace-members-table'));
|
||||
|
||||
export default function WorkspaceMembers() {
|
||||
return (
|
||||
<>
|
||||
<WorkspaceInviteSection />
|
||||
|
||||
<Separator className="my-8" />
|
||||
|
||||
<div className="space-y-4">
|
||||
<h4 className="font-semibold">Members</h4>
|
||||
|
||||
<WorkspaceInviteDialog />
|
||||
|
||||
<WorkspaceMembersTable />
|
||||
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
'use client';
|
||||
|
||||
import WorkspaceNameForm from "@/features/workspace/components/workspace-name-form";
|
||||
|
||||
|
||||
export default function Home() {
|
||||
|
||||
return (<WorkspaceNameForm />);
|
||||
}
|
||||
@@ -3,17 +3,21 @@ import type { Metadata } from 'next'
|
||||
import { Inter } from 'next/font/google'
|
||||
import { cn } from "@/lib/utils";
|
||||
import { ThemeProvider } from "@/components/providers/theme-provider";
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import { TanstackProvider } from "@/components/providers/tanstack-provider";
|
||||
import CustomToaster from "@/components/ui/custom-toaster";
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] })
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Create Next App',
|
||||
description: 'Generated by create next app',
|
||||
viewport: {
|
||||
width: 'device-width',
|
||||
initialScale: 1,
|
||||
maximumScale: 1,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
@@ -26,7 +30,7 @@ export default function RootLayout({
|
||||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
||||
<TanstackProvider>
|
||||
{children}
|
||||
<Toaster />
|
||||
<CustomToaster />
|
||||
</TanstackProvider>
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user