feat : APi integrated foe change password and change trans password
feat: Change the UI design
This commit is contained in:
@@ -177,7 +177,6 @@ export default function ChangePassword() {
|
||||
|
||||
return (
|
||||
<Paper shadow="sm" radius="md" p="md" withBorder h={400}>
|
||||
<Title order={3} style={{ color: "red" }}>More Updates comming soon .....</Title>
|
||||
<Title order={3} mb="sm">
|
||||
Change Login Password
|
||||
</Title>
|
||||
@@ -286,7 +285,7 @@ export default function ChangePassword() {
|
||||
</Group>
|
||||
</div>
|
||||
<Text size="sm" c="dimmed" style={{ marginTop: "40px" }}>
|
||||
Note: Your new password must be 8–15 characters long and contain at least one number and one special character.
|
||||
Note: Your new Login password must be 8–15 characters long and contain at least one number and one special character.
|
||||
</Text>
|
||||
</Paper>
|
||||
);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { TextInput, PasswordInput, Button, Title, Paper, Group, Box } from "@mantine/core";
|
||||
import { TextInput, PasswordInput, Button, Title, Paper, Group, Box, Text } from "@mantine/core";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import { IconLock } from "@tabler/icons-react";
|
||||
import { generateCaptcha } from "@/app/captcha";
|
||||
@@ -183,16 +183,17 @@ export default function ChangePassword() {
|
||||
</Title>
|
||||
|
||||
{/* Scrollable form area */}
|
||||
<div style={{ overflowY: "auto", maxHeight: "280px", paddingRight: 8 }}>
|
||||
<PasswordInput
|
||||
label="Old Password"
|
||||
placeholder="Enter old password"
|
||||
value={oldPassword}
|
||||
onChange={(e) => setOldPassword(e.currentTarget.value)}
|
||||
withAsterisk
|
||||
mb="xs"
|
||||
/>
|
||||
<div style={{ overflowY: "auto", maxHeight: "280px" }}>
|
||||
<Group grow>
|
||||
<PasswordInput
|
||||
label="Old Password"
|
||||
placeholder="Enter old password"
|
||||
value={oldPassword}
|
||||
onChange={(e) => setOldPassword(e.currentTarget.value)}
|
||||
withAsterisk
|
||||
mb="xs"
|
||||
/>
|
||||
|
||||
<PasswordInput
|
||||
label="New Password"
|
||||
placeholder="Enter new password"
|
||||
@@ -217,9 +218,7 @@ export default function ChangePassword() {
|
||||
/>
|
||||
|
||||
</Group>
|
||||
|
||||
{/* CAPTCHA */}
|
||||
|
||||
<div style={{ marginTop: 5 }}>
|
||||
<label style={{ display: "block", marginBottom: 4, fontSize: "14px" }}>
|
||||
|
||||
@@ -274,20 +273,22 @@ export default function ChangePassword() {
|
||||
readOnly={otpValidated}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Group mt="md" gap="sm">
|
||||
<Button onClick={handleSubmit}>
|
||||
{step === "form" && "Submit"}
|
||||
{step === "otp" && "Validate OTP"}
|
||||
{step === "final" && "Change Password"}
|
||||
</Button>
|
||||
<Button variant="outline" color="gray" onClick={resetForm}>
|
||||
Reset
|
||||
</Button>
|
||||
</Group>
|
||||
</div>
|
||||
|
||||
{/* Buttons */}
|
||||
<Group mt="md" gap="sm">
|
||||
<Button onClick={handleSubmit}>
|
||||
{step === "form" && "Submit"}
|
||||
{step === "otp" && "Validate OTP"}
|
||||
{step === "final" && "Change Password"}
|
||||
</Button>
|
||||
<Button variant="outline" color="gray" onClick={resetForm}>
|
||||
Reset
|
||||
</Button>
|
||||
</Group>
|
||||
<Text size="sm" c="dimmed" style={{ marginTop: "40px" }}>
|
||||
Note: Your new Transaction password must be 8–15 characters long and contain at least one number and one special character.
|
||||
</Text>
|
||||
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
{ label: "Change Login Password", href: "/settings/change_login_password" },
|
||||
{ label: "Change transaction Password", href: "/settings/change_txn_password" },
|
||||
{ label: "Set transaction Password", href: "/settings/set_txn_password" },
|
||||
{ label: "Set userId", href: "/settings/user_id" },
|
||||
];
|
||||
useEffect(() => {
|
||||
const token = localStorage.getItem("access_token");
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
Title,
|
||||
Paper,
|
||||
Group,
|
||||
Text
|
||||
} from "@mantine/core";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import { IconLock } from "@tabler/icons-react";
|
||||
@@ -294,6 +295,10 @@ export default function ChangePassword() {
|
||||
Reset
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
<Text size="sm" c="dimmed" style={{ marginTop: "40px" }}>
|
||||
Note: Your new Transaction password must be 8–15 characters long and contain at least one number and one special character.
|
||||
</Text>
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
|
||||
18
src/app/(main)/settings/user_id/page.tsx
Normal file
18
src/app/(main)/settings/user_id/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
"use client";
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Group, Loader, Paper, Text } from "@mantine/core";
|
||||
|
||||
|
||||
export default function ChangePassword() {
|
||||
return (
|
||||
<Paper shadow="sm" radius="md" p="md" withBorder h={400} >
|
||||
<Group>
|
||||
<Text fw={700} size="lg">
|
||||
The feature will be available soon...
|
||||
</Text>
|
||||
<Loader color="blue" type="bars" size="sm" />
|
||||
</Group>
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user