From a59eb3aef595078c7d96f8e958e444f7a64a3551 Mon Sep 17 00:00:00 2001 From: Deardo Satria Date: Sun, 1 Nov 2026 20:25:17 +0700 Subject: [PATCH] UI login page revamp --- app/(auth)/login/_components/login-form.tsx | 153 ++++++++++++++------ app/(auth)/login/page.tsx | 6 +- 2 files changed, 113 insertions(+), 46 deletions(-) diff --git a/app/(auth)/login/_components/login-form.tsx b/app/(auth)/login/_components/login-form.tsx index a8ebe11..67c9225 100644 --- a/app/(auth)/login/_components/login-form.tsx +++ b/app/(auth)/login/_components/login-form.tsx @@ -2,13 +2,6 @@ import { useActionState } from "react"; import { Button } from "@/components/ui/button"; -import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from "@/components/ui/card"; import { Field, FieldError, @@ -20,45 +13,119 @@ import { login, type LoginState } from "../../actions"; const initialState: LoginState = {}; +const fieldInputClass = + "h-9 rounded-none border-x-0 border-t-0 border-b border-dashed border-input bg-transparent px-0 font-mono text-[15px] text-foreground focus-visible:border-foreground focus-visible:ring-0 md:text-[15px] dark:bg-transparent"; + +const fieldLabelClass = + "font-mono text-[10px] font-normal tracking-[0.18em] text-muted-foreground uppercase"; + export function LoginForm() { const [state, formAction, pending] = useActionState(login, initialState); return ( - - - Masuk - Cleo Minimarket back-office - - -
- - - Username - - - - Password - - - {state.error && {state.error}} - - -
-
-
+
+
+
+

+ Cleo Minimarket +

+ +
+ + +
+
+ ); +} + +function ReceiptEdge() { + const width = 320; + const depth = 9; + const tooth = 20; + + let d = `M0 0H${width}`; + for (let x = width; x > 0; x -= tooth) { + d += `L${x - tooth / 2} ${depth}L${x - tooth} 0`; + } + + return ( + ); } diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx index bde205d..c648c9a 100644 --- a/app/(auth)/login/page.tsx +++ b/app/(auth)/login/page.tsx @@ -5,13 +5,13 @@ import { redirectIfLoggedIn } from "@/data/auth"; import { LoginForm } from "./_components/login-form"; export const metadata: Metadata = { - title: "Masuk", + title: "Masuk ยท Cleo Minimarket", }; export default function LoginPage() { return ( -
-
+
+