diff --git a/components/form/login.tsx b/components/form/login.tsx
index 5736c86..1d063ff 100644
--- a/components/form/login.tsx
+++ b/components/form/login.tsx
@@ -55,18 +55,6 @@ export default function Login() {
if (!username || !password) {
error("Username & Password Wajib Diisi !");
} else {
- // let response = await emailValidation(data);
- // if (response?.error) {
- // error("Username / Password Tidak Sesuai");
- // return false;
- // }
-
- // if (response?.data?.messages[0] === "Continue to setup email") {
- // setFirstLogin(true);
- // } else {
- // setNeedOtp(true);
- // }
-
loading();
const response = await postSignIn(data);
if (response?.error) {
@@ -139,7 +127,6 @@ export default function Login() {
close();
}
}
- // }
};
const checkUsername = async () => {
@@ -173,90 +160,6 @@ export default function Login() {
});
};
- // const submitOtp = async () => {
- // loading();
- // const validation = await otpValidationLogin({
- // username: username,
- // otpCode: otpValue,
- // });
- // if (validation?.error) {
- // error("OTP Tidak Sesuai");
- // return false;
- // }
-
- // const response = await postSignIn({
- // username: username,
- // password: password,
- // });
-
- // const resProfile = await getProfile(response?.data?.data?.access_token);
- // const profile = resProfile?.data?.data;
-
- // const dateTime: any = new Date();
-
- // const newTime: any = dateTime.getTime() + 10 * 60 * 1000;
-
- // Cookies.set("access_token", response?.data?.data?.access_token, {
- // expires: 1,
- // });
- // Cookies.set("refresh_token", response?.data?.data?.refresh_token, {
- // expires: 1,
- // });
- // Cookies.set("time_refresh", newTime, {
- // expires: 1,
- // });
- // Cookies.set("is_first_login", "true", {
- // secure: true,
- // sameSite: "strict",
- // });
- // const resActivity = await saveActivity(
- // {
- // activityTypeId: 1,
- // url: "https://kontenhumas.com/auth",
- // userId: profile?.data?.data?.id,
- // },
- // accessData?.id_token
- // );
- // Cookies.set("profile_picture", profile?.profilePictureUrl, {
- // expires: 1,
- // });
- // Cookies.set("uie", profile?.id, {
- // expires: 1,
- // });
- // Cookies.set("ufne", profile?.fullname, {
- // expires: 1,
- // });
- // Cookies.set("ulie", profile?.userLevelGroup, {
- // expires: 1,
- // });
- // Cookies.set("username", profile?.username, {
- // expires: 1,
- // });
- // Cookies.set("urie", profile?.roleId, {
- // expires: 1,
- // });
- // Cookies.set("roleName", profile?.roleName, {
- // expires: 1,
- // });
- // Cookies.set("masterPoldaId", profile?.masterPoldaId, {
- // expires: 1,
- // });
- // Cookies.set("ulne", profile?.userLevelId, {
- // expires: 1,
- // });
- // Cookies.set("urce", profile?.roleCode, {
- // expires: 1,
- // });
- // Cookies.set("email", profile?.email, {
- // expires: 1,
- // });
- // router.push("/admin/dashboard");
- // Cookies.set("status", "login", {
- // expires: 1,
- // });
- // close();
- // };
-
const submitCheckEmail = async () => {
const req = {
oldEmail: oldEmail,
@@ -281,190 +184,264 @@ export default function Login() {
};
return (
-
-
-
-

-
+
+ {/* Left Side - Logo Section */}
+
+
+
+
+
+
+

+
+
+
+
Portal Mikul News
+
Platform berita terpercaya untuk informasi terkini
+
+
+
+ {/* Decorative elements */}
+
+
- {isFirstLogin ? (
-
-
- Setting Account
-
- {/*
Email Lama
*/}
- {/*
*/}
-
-
- setOldEmail(e.target.value)}
- />
-
- {/*
Email Baru
*/}
- {/*
*/}
-
-
- setNewEmail(e.target.value)}
- />
-
-
-
- ) : needOtp ? (
-
- {/*
Submit OTP
-
OTP
-
-
-
-
- Beranda
-
-
*/}
-
- ) : isResetPassword ? (
-
-
- Reset Password
-
-
-
setCheckUsernameValue(e.target.value.trim())}
- onPaste={(e) => setCheckUsernameValue(e.currentTarget.value.trim())}
- onCopy={(e) => setCheckUsernameValue(e.currentTarget.value.trim())}
- />
-
-
-
-
- ) : (
-
-
-
- Selamat Datang di Portal Mikul News
-
-
- Silahkan Login untuk Melihat informasi serta untuk mengetahui
- status permintaan informasi dan keberatan yang sudah diajukan.
-
-
-
-
setValUsername(e.target.value.trim())}
- onPaste={(e) => setValUsername(e.currentTarget.value.trim())}
- onCopy={(e) => setValUsername(e.currentTarget.value.trim())}
- />
-
-
-
-
setPassword(e.target.value)}
+ {/* Right Side - Login Form */}
+
+
+ {/* Mobile Logo */}
+
+
+

-
-
-
-
-
-
+
+
+ {isFirstLogin ? (
+
+
+
+
Setup Akun
+
Lengkapi informasi email Anda
+
+
+
+
+
+ setOldEmail(e.target.value)}
+ />
+
+
+
+
+ setNewEmail(e.target.value)}
+ />
+
+
+
+
+
+ ) : needOtp ? (
+
+
+
+
Verifikasi OTP
+
Masukkan kode OTP yang telah dikirim
+
+
+ ) : isResetPassword ? (
+
+
+
+
Reset Password
+
Masukkan username untuk reset password
+
+
+
+
+
+ setCheckUsernameValue(e.target.value.trim())}
+ onPaste={(e) => setCheckUsernameValue(e.currentTarget.value.trim())}
+ onCopy={(e) => setCheckUsernameValue(e.currentTarget.value.trim())}
+ />
+
+
+
+
+
+
+ Beranda
+
+
+
+
+
+
+ ) : (
+
+
+
+
Selamat Datang
+
Portal Mikul News - Platform berita terpercaya
+
+
+
+
+
+ setValUsername(e.target.value.trim())}
+ onPaste={(e) => setValUsername(e.currentTarget.value.trim())}
+ onCopy={(e) => setValUsername(e.currentTarget.value.trim())}
+ />
+
+
+
+
+
+ setPassword(e.target.value)}
+ />
+
+
+
+
+
+
+
+
+ Beranda
+
+
+
+
+
+
+
+
+
+
+
Informasi Portal
+
Akses informasi terkini dan status permintaan informasi yang telah diajukan.
+
+
+
+
+ )}
- )}
+
);
}
diff --git a/components/landing-page/option.tsx b/components/landing-page/option.tsx
index 45d544c..512232d 100644
--- a/components/landing-page/option.tsx
+++ b/components/landing-page/option.tsx
@@ -21,9 +21,9 @@ const Option = ({ Icon, title, selected, setSelected, open, notifs, active }: Op
onClick={() => setSelected?.(title)}
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
- className={`relative flex h-12 w-full items-center rounded-xl transition-all duration-200 cursor-pointer group ${
+ className={`relative flex h-12 w-full px-3 items-center rounded-xl transition-all duration-200 cursor-pointer group ${
isActive
- ? "bg-gradient-to-r from-blue-500 to-purple-500 text-white shadow-lg shadow-blue-500/25"
+ ? "bg-gradient-to-r from-emerald-500 to-green-500 text-white shadow-lg shadow-emerald-500/25"
: "text-slate-600 hover:bg-gradient-to-r hover:from-slate-100 hover:to-slate-200/50 hover:text-slate-800"
}`}
whileHover={{ scale: 1.02 }}
@@ -94,7 +94,7 @@ const Option = ({ Icon, title, selected, setSelected, open, notifs, active }: Op
transition={{ delay: 0.3, type: "spring" }}
className={`absolute right-3 top-1/2 -translate-y-1/2 size-5 rounded-full text-xs font-semibold flex items-center justify-center ${
isActive
- ? "bg-white text-blue-500"
+ ? "bg-white text-emerald-500"
: "bg-red-500 text-white"
}`}
>
diff --git a/components/landing-page/retracting-sidedar.tsx b/components/landing-page/retracting-sidedar.tsx
index ba869b6..8353e97 100644
--- a/components/landing-page/retracting-sidedar.tsx
+++ b/components/landing-page/retracting-sidedar.tsx
@@ -9,6 +9,7 @@ import DashboardContainer from "../main/dashboard/dashboard-container";
import { usePathname } from "next/navigation";
import Option from "./option";
import { motion, AnimatePresence } from "framer-motion";
+import { useTheme } from "../layout/theme-context";
interface RetractingSidebarProps {
sidebarData: boolean;
@@ -97,7 +98,7 @@ export const RetractingSidebar = ({
updateSidebarData(true)}
>
@@ -155,7 +156,7 @@ export const RetractingSidebar = ({
animate={{ x: 0 }}
exit={{ x: "-100%" }}
transition={{ type: "tween", duration: 0.3 }}
- className="fixed top-0 left-0 z-50 w-[280px] h-full bg-gradient-to-b from-slate-50 to-white p-4 flex flex-col md:hidden shadow-2xl backdrop-blur-sm"
+ className="fixed top-0 left-0 z-50 w-[280px] h-full bg-gradient-to-b from-slate-50 to-white dark:from-slate-800 dark:to-slate-900 p-4 flex flex-col md:hidden shadow-2xl backdrop-blur-sm"
>
{/*