ci: Update the login and home screen

This commit is contained in:
2025-06-30 13:07:53 +05:30
parent bc75470d33
commit 6028ed9f5a
12 changed files with 80 additions and 254 deletions

View File

@@ -2,21 +2,7 @@
"use client";
import React, { useState, useEffect } from "react";
import {
Text,
Button,
Paper,
TextInput,
PasswordInput,
Title,
Card,
Group,
Flex,
Box,
Image,
Anchor,
Stack
} from "@mantine/core";
import {Text,Button,TextInput,PasswordInput,Title,Card,Group,Flex,Box,Image,Anchor,Stack} from "@mantine/core";
import { notifications } from "@mantine/notifications";
import myImage from '@/app/image/ebanking.jpg';
import frontPage from '@/app/image/ib_front_page.jpg';
@@ -48,6 +34,10 @@ export default function Login() {
async function handleLogin(e: React.FormEvent) {
e.preventDefault();
const onlyDigit = /^\d{11}$/;
if (!onlyDigit.test(CIF)) {
setError('Input value must be 11 digit');
}
if (inputCaptcha !== captcha) {
notifications.show({
@@ -61,7 +51,7 @@ export default function Login() {
}
if (CIF === "30022497139" && psw === "SecurePass123!") {
const token ="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30";
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30";
localStorage.setItem("customerNumber", CIF);
localStorage.setItem("password", psw);
localStorage.setItem("access_token", token);
@@ -82,18 +72,21 @@ export default function Login() {
return (
<Providers>
<div style={{ backgroundColor: "#f8f9fa", width: "100%", height: "100vh" }}>
<Image
fit="cover"
src={myImage}
component={NextImage}
alt="ebanking"
style={{ width: "100%", height: "12%" }}
/>
<div style={{ backgroundColor: "#f8f9fa", width: "100%", height: "100vh", paddingTop: "5%" }}>
<Box style={{ position: 'fixed', width: '100%', height: '12%', top: 0 }}>
<Image
// radius="md"
fit="cover"
src={myImage}
component={NextImage}
alt="ebanking"
style={{ width: "100%", height: "100%" }}
/>
</Box>
<Box
style={{
width: "100%",
height: "10%",
overflow: "hidden",
whiteSpace: "nowrap",
padding: "8px 0",
@@ -109,7 +102,13 @@ export default function Login() {
color: "#004d99",
}}
>
Always login to our Net Banking site directly or through Banks website...
Always login to our Net Banking site directly or through Banks website.
Do not disclose your UserId and Password to any third party and keep Your UserId and Password strictly confidential.
KCC Bank never asks for UserId,Passwords and Pins through email or phone.
Be ware of Phishing mails with links to fake bank's websites asking for personal information are in circulation.
⚠️ Please DO NOT Click on the links given in the emails asking for personal details like bank account number, userID and password.
⚠️ If you had shard your UserId and Password through such mails or links, please change your Password immediately.
⚠️ Inform the Bank/branch in which your account is maintained for resetting your password.
</Text>
<style>
{`
@@ -149,7 +148,7 @@ export default function Login() {
maxWidth: 480,
height: 380,
marginTop: 0,
paddingTop: 20,
paddingTop: 5,
backgroundColor: "#f0f0f0",
borderRadius: "12px",
boxShadow: "0 2px 10px rgba(0,0,0,0.1)",
@@ -164,8 +163,9 @@ export default function Login() {
<Box
style={{
width: 370,
height: 4500,
padding: "20px",
marginTop: 0,
paddingTop: 5,
padding: "10px",
border: "1px solid #e0e0d1",
}}
>
@@ -185,6 +185,7 @@ export default function Login() {
}
}}
required
error={error}
/>
<PasswordInput
@@ -198,10 +199,10 @@ export default function Login() {
<Group >
<Box
style={{
padding: "10px 5px",
padding: "5px 5px",
backgroundColor: "#ffffff",
fontFamily: "'UnifrakturCook',cursive",
textDecoration:"line-through",
textDecoration: "line-through",
userSelect: "none",
}}
>
@@ -229,7 +230,6 @@ export default function Login() {
</Card>
</div>
</div>
<Box
component="footer"
style={{
@@ -245,8 +245,10 @@ export default function Login() {
>
<Text>
© 2025 KCC Bank. All rights reserved. |{" "}
<Anchor href="/disclaimer">Disclaimer</Anchor> |{" "}
<Anchor href="/privacy">Privacy Policy</Anchor>
<Anchor href="document/disclaimer.pdf" target="_blank" rel="noopener noreferrer">Disclaimer</Anchor> |{" "}
<Anchor href="document/privacy_policy.pdf" target="_blank" rel="noopener noreferrer">Privacy Policy</Anchor> |{" "}
<Anchor href="document/phishing.pdf" target="_blank" rel="noopener noreferrer">Phishing</Anchor> |{" "}
<Anchor href="document/security_tips.pdf" target="_blank" rel="noopener noreferrer">Security Tips</Anchor>
</Text>
</Box>
</div>