style: redesign login page and create-username page
This commit is contained in:
parent
63f82c3c18
commit
eefb1a0c37
6 changed files with 30 additions and 17 deletions
|
|
@ -5,7 +5,7 @@ import { signIn } from "next-auth/react";
|
||||||
|
|
||||||
export default function LoginButtons() {
|
export default function LoginButtons() {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center gap-2 mt-8">
|
<div className="flex flex-col items-center gap-2">
|
||||||
<button
|
<button
|
||||||
onClick={() => signIn("discord", { redirectTo: "/create-username" })}
|
onClick={() => signIn("discord", { redirectTo: "/create-username" })}
|
||||||
className="pill button gap-2 !px-3 !bg-indigo-400 !border-indigo-500 hover:!bg-indigo-500"
|
className="pill button gap-2 !px-3 !bg-indigo-400 !border-indigo-500 hover:!bg-indigo-500"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import SubmitDialogButton from "./submit-dialog-button";
|
import dayjs from "dayjs";
|
||||||
import DeleteAccount from "./delete-account";
|
|
||||||
|
|
||||||
import { displayNameSchema, usernameSchema } from "@/lib/schemas";
|
import { displayNameSchema, usernameSchema } from "@/lib/schemas";
|
||||||
import dayjs from "dayjs";
|
|
||||||
|
import SubmitDialogButton from "./submit-dialog-button";
|
||||||
|
import DeleteAccount from "./delete-account";
|
||||||
|
|
||||||
export default function ProfileSettings() {
|
export default function ProfileSettings() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -67,7 +67,7 @@ export default function ProfileSettings() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl p-4 flex flex-col gap-4">
|
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg p-4 flex flex-col gap-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-2xl font-bold">Profile Settings</h2>
|
<h2 className="text-2xl font-bold">Profile Settings</h2>
|
||||||
<p className="text-sm text-zinc-500">Update your account info, and username.</p>
|
<p className="text-sm text-zinc-500">Update your account info, and username.</p>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ export default function UsernameForm() {
|
||||||
value={username}
|
value={username}
|
||||||
onChange={(e) => setUsername(e.target.value)}
|
onChange={(e) => setUsername(e.target.value)}
|
||||||
required
|
required
|
||||||
className="pill input w-96 mt-8 mb-2"
|
className="pill input w-96 mb-2"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<button type="submit" className="pill button w-min">
|
<button type="submit" className="pill button w-min">
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,18 @@ export default async function CreateUsernamePage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="flex-grow flex items-center justify-center">
|
||||||
<h1 className="text-3xl font-medium text-center">Welcome to TomodachiShare!</h1>
|
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg px-10 py-12 max-w-md text-center">
|
||||||
<h2 className="text-lg text-center">Please create a username</h2>
|
<h1 className="text-3xl font-bold mb-4">Welcome to TomodachiShare!</h1>
|
||||||
|
|
||||||
<UsernameForm />
|
<div className="flex items-center gap-4 text-zinc-500 text-sm font-medium mb-6">
|
||||||
|
<hr className="flex-grow border-zinc-300" />
|
||||||
|
<span>Please create a username</span>
|
||||||
|
<hr className="flex-grow border-zinc-300" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<UsernameForm />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export default function RootLayout({
|
||||||
|
|
||||||
<Providers>
|
<Providers>
|
||||||
<Header />
|
<Header />
|
||||||
<div className="px-4 py-8 max-w-7xl w-full">{children}</div>
|
<div className="px-4 py-8 max-w-7xl w-full flex-grow flex flex-col">{children}</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
</Providers>
|
</Providers>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
import { auth } from "@/lib/auth";
|
import { auth } from "@/lib/auth";
|
||||||
import LoginButtons from "../components/login-buttons";
|
import LoginButtons from "../components/login-buttons";
|
||||||
|
|
||||||
|
|
@ -12,11 +11,18 @@ export default async function LoginPage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="flex-grow flex items-center justify-center">
|
||||||
<h1 className="text-3xl font-medium text-center">Welcome to TomodachiShare!</h1>
|
<div className="bg-amber-50 border-2 border-amber-500 rounded-2xl shadow-lg px-10 py-12 max-w-md text-center">
|
||||||
<h2 className="text-lg text-center">Choose your login method</h2>
|
<h1 className="text-3xl font-bold mb-4">Welcome to TomodachiShare!</h1>
|
||||||
|
|
||||||
<LoginButtons />
|
<div className="flex items-center gap-4 text-zinc-500 text-sm font-medium mb-8">
|
||||||
|
<hr className="flex-grow border-zinc-300" />
|
||||||
|
<span>Choose your login method</span>
|
||||||
|
<hr className="flex-grow border-zinc-300" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<LoginButtons />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue