diff --git a/src/app/[orgId]/auth/resource/[resourceId]/components/ResourceAuthPortal.tsx b/src/app/[orgId]/auth/resource/[resourceId]/components/ResourceAuthPortal.tsx index 39311b08..761f0fb1 100644 --- a/src/app/[orgId]/auth/resource/[resourceId]/components/ResourceAuthPortal.tsx +++ b/src/app/[orgId]/auth/resource/[resourceId]/components/ResourceAuthPortal.tsx @@ -15,7 +15,6 @@ import { import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; import { Form, FormControl, @@ -24,7 +23,12 @@ import { FormLabel, FormMessage, } from "@/components/ui/form"; -import { LockIcon, KeyIcon, UserIcon, Binary, Key, User } from "lucide-react"; +import { LockIcon, UserIcon, Binary, Key, User } from "lucide-react"; +import { + InputOTP, + InputOTPGroup, + InputOTPSlot, +} from "@app/components/ui/input-otp"; const pinSchema = z.object({ pin: z @@ -34,12 +38,16 @@ const pinSchema = z.object({ }); const passwordSchema = z.object({ - email: z.string().email({ message: "Please enter a valid email address" }), password: z .string() .min(8, { message: "Password must be at least 8 characters long" }), }); +const userSchema = z.object({ + email: z.string().email(), + password: z.string().min(1), +}); + export default function ResourceAuthPortal() { const [activeTab, setActiveTab] = useState("pin"); @@ -52,6 +60,13 @@ export default function ResourceAuthPortal() { const passwordForm = useForm>({ resolver: zodResolver(passwordSchema), + defaultValues: { + password: "", + }, + }); + + const userForm = useForm>({ + resolver: zodResolver(userSchema), defaultValues: { email: "", password: "", @@ -77,9 +92,9 @@ export default function ResourceAuthPortal() {
- Welcome Back + Authentication Required - Choose your preferred login method + Choose your preferred method @@ -92,7 +107,7 @@ export default function ResourceAuthPortal() { Password - SSO + User @@ -106,20 +121,44 @@ export default function ResourceAuthPortal() { name="pin" render={({ field }) => ( - Enter PIN + + Enter 6-digit PIN + - +
+ + + + + + + + + + +
)} /> @@ -129,27 +168,10 @@ export default function ResourceAuthPortal() {
- ( - - Email - - - - - - )} - /> Password @@ -175,31 +197,73 @@ export default function ResourceAuthPortal() {
-
-

- Click the button below to login with your - organization's SSO provider. -

- -
+ ( + + Email + + + + + + )} + /> + ( + + Password + + + + + + )} + /> + + +
- +
+ {activeTab === "sso" && ( +

Don't have an account?{" "} Sign up

- - +
+ )}
); } diff --git a/src/app/[orgId]/settings/access/roles/components/CreateRoleForm.tsx b/src/app/[orgId]/settings/access/roles/components/CreateRoleForm.tsx index 9659376e..b5188729 100644 --- a/src/app/[orgId]/settings/access/roles/components/CreateRoleForm.tsx +++ b/src/app/[orgId]/settings/access/roles/components/CreateRoleForm.tsx @@ -123,7 +123,7 @@ export default function CreateRoleForm({
-
+

You're about to delete the{" "} @@ -170,7 +170,7 @@ export default function DeleteRoleForm({ -

+
>( `/org/${params.orgId}/user/${params.userId}`, - await authCookieHeader() + await authCookieHeader(), ); user = res.data.data; } catch { @@ -48,15 +47,17 @@ export default async function UserLayoutProps(props: UserLayoutProps) { <>
- -
- {" "} - All Users -
- + + + + Users + + + + {user.email} + + +
diff --git a/src/app/[orgId]/settings/access/users/components/InviteUserForm.tsx b/src/app/[orgId]/settings/access/users/components/InviteUserForm.tsx index 2f5a31dd..14969265 100644 --- a/src/app/[orgId]/settings/access/users/components/InviteUserForm.tsx +++ b/src/app/[orgId]/settings/access/users/components/InviteUserForm.tsx @@ -171,7 +171,7 @@ export default function InviteUserForm({ open, setOpen }: InviteUserFormProps) { -
+
{!inviteLink && (
- { router.push(`/${val}/settings`); @@ -146,7 +224,7 @@ export default function Header({ email, orgName, name, orgs }: HeaderProps) { ))} - + */}
diff --git a/src/app/[orgId]/settings/general/page.tsx b/src/app/[orgId]/settings/general/page.tsx index ec4fb729..d97e746e 100644 --- a/src/app/[orgId]/settings/general/page.tsx +++ b/src/app/[orgId]/settings/general/page.tsx @@ -46,7 +46,7 @@ export default function GeneralPage() { title="Delete organization" /> -
+
{orgUser.isOwner ? ( diff --git a/src/app/auth/signup/SignupForm.tsx b/src/app/auth/signup/SignupForm.tsx index 6c720836..73003458 100644 --- a/src/app/auth/signup/SignupForm.tsx +++ b/src/app/auth/signup/SignupForm.tsx @@ -111,7 +111,7 @@ export default function SignupForm({ redirect }: SignupFormProps) {
+

Account

diff --git a/src/app/profile/appearance/page.tsx b/src/app/profile/appearance/page.tsx index 6bb6eb13..1c7e6652 100644 --- a/src/app/profile/appearance/page.tsx +++ b/src/app/profile/appearance/page.tsx @@ -3,7 +3,7 @@ import { AppearanceForm } from "./appearance-form" export default function SettingsAppearancePage() { return ( -

+

Appearance

diff --git a/src/app/profile/display/page.tsx b/src/app/profile/display/page.tsx index 6c1b06e5..55ac00e3 100644 --- a/src/app/profile/display/page.tsx +++ b/src/app/profile/display/page.tsx @@ -3,7 +3,7 @@ import { DisplayForm } from "./display-form" export default function SettingsDisplayPage() { return ( -

+

Display

diff --git a/src/app/profile/layout.tsx b/src/app/profile/layout.tsx index d7dbc634..f7fc72d1 100644 --- a/src/app/profile/layout.tsx +++ b/src/app/profile/layout.tsx @@ -56,7 +56,7 @@ export default function SettingsLayout({ children }: SettingsLayoutProps) { className="hidden dark:block" />

-
+

Settings

diff --git a/src/app/profile/notifications/page.tsx b/src/app/profile/notifications/page.tsx index 75e5c96e..0917cd4f 100644 --- a/src/app/profile/notifications/page.tsx +++ b/src/app/profile/notifications/page.tsx @@ -3,7 +3,7 @@ import { NotificationsForm } from "./notifications-form" export default function SettingsNotificationsPage() { return ( -

+

Notifications

diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx index 66744634..f68812c0 100644 --- a/src/app/profile/page.tsx +++ b/src/app/profile/page.tsx @@ -3,7 +3,7 @@ import { ProfileForm } from "@app/components/profile-form" export default function SettingsProfilePage() { return ( -

+

Profile

diff --git a/src/app/setup/page.tsx b/src/app/setup/page.tsx index 4d33812d..fe423f9a 100644 --- a/src/app/setup/page.tsx +++ b/src/app/setup/page.tsx @@ -206,7 +206,7 @@ export default function StepperForm() {

)} {currentStep === "site" && ( -
+
)} {currentStep === "resources" && ( -
+