Skip to content

Commit

Permalink
Optimize ui
Browse files Browse the repository at this point in the history
  • Loading branch information
usual2970 committed Aug 31, 2024
1 parent 7d3e942 commit 227d449
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="#" target="_blank" rel="noopener">
<img src="https://i.imgur.com/4ff4nUV.jpeg" alt="Certimate - Your Trusted SSL Automation Partner" />
<img src="https://i.imgur.com/Nno3V5B.jpeg" alt="Certimate - Your Trusted SSL Automation Partner" />
</a>
</p>

Expand Down
48 changes: 24 additions & 24 deletions ui/src/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import * as React from "react"
import * as SheetPrimitive from "@radix-ui/react-dialog"
import { cva, type VariantProps } from "class-variance-authority"
import { X } from "lucide-react"
import * as React from "react";
import * as SheetPrimitive from "@radix-ui/react-dialog";
import { cva, type VariantProps } from "class-variance-authority";
import { X } from "lucide-react";

import { cn } from "@/lib/utils"
import { cn } from "@/lib/utils";

const Sheet = SheetPrimitive.Root
const Sheet = SheetPrimitive.Root;

const SheetTrigger = SheetPrimitive.Trigger
const SheetTrigger = SheetPrimitive.Trigger;

const SheetClose = SheetPrimitive.Close
const SheetClose = SheetPrimitive.Close;

const SheetPortal = SheetPrimitive.Portal
const SheetPortal = SheetPrimitive.Portal;

const SheetOverlay = React.forwardRef<
React.ElementRef<typeof SheetPrimitive.Overlay>,
Expand All @@ -25,8 +25,8 @@ const SheetOverlay = React.forwardRef<
{...props}
ref={ref}
/>
))
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
));
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;

const sheetVariants = cva(
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
Expand All @@ -45,7 +45,7 @@ const sheetVariants = cva(
side: "right",
},
}
)
);

interface SheetContentProps
extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
Expand All @@ -64,13 +64,13 @@ const SheetContent = React.forwardRef<
>
{children}
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
<X className="h-4 w-4" />
<X className="h-4 w-4 dark:text-stone-200" />
<span className="sr-only">Close</span>
</SheetPrimitive.Close>
</SheetPrimitive.Content>
</SheetPortal>
))
SheetContent.displayName = SheetPrimitive.Content.displayName
));
SheetContent.displayName = SheetPrimitive.Content.displayName;

const SheetHeader = ({
className,
Expand All @@ -83,8 +83,8 @@ const SheetHeader = ({
)}
{...props}
/>
)
SheetHeader.displayName = "SheetHeader"
);
SheetHeader.displayName = "SheetHeader";

const SheetFooter = ({
className,
Expand All @@ -97,8 +97,8 @@ const SheetFooter = ({
)}
{...props}
/>
)
SheetFooter.displayName = "SheetFooter"
);
SheetFooter.displayName = "SheetFooter";

const SheetTitle = React.forwardRef<
React.ElementRef<typeof SheetPrimitive.Title>,
Expand All @@ -109,8 +109,8 @@ const SheetTitle = React.forwardRef<
className={cn("text-lg font-semibold text-foreground", className)}
{...props}
/>
))
SheetTitle.displayName = SheetPrimitive.Title.displayName
));
SheetTitle.displayName = SheetPrimitive.Title.displayName;

const SheetDescription = React.forwardRef<
React.ElementRef<typeof SheetPrimitive.Description>,
Expand All @@ -121,8 +121,8 @@ const SheetDescription = React.forwardRef<
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
))
SheetDescription.displayName = SheetPrimitive.Description.displayName
));
SheetDescription.displayName = SheetPrimitive.Description.displayName;

export {
Sheet,
Expand All @@ -135,4 +135,4 @@ export {
SheetFooter,
SheetTitle,
SheetDescription,
}
};
4 changes: 2 additions & 2 deletions ui/src/pages/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default function Dashboard() {
size="icon"
className="shrink-0 md:hidden"
>
<Menu className="h-5 w-5" />
<Menu className="h-5 w-5 dark:text-white" />
<span className="sr-only">Toggle navigation menu</span>
</Button>
</SheetTrigger>
Expand All @@ -115,7 +115,7 @@ export default function Dashboard() {
className="flex items-center gap-2 text-lg font-semibold"
>
<img src="/vite.svg" className="w-[36px] h-[36px]" />
<span className="">Certimate</span>
<span className="dark:text-white">Certimate</span>
<span className="sr-only">Certimate</span>
</Link>
<Link
Expand Down
7 changes: 5 additions & 2 deletions ui/src/pages/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ const Login = () => {

const navigage = useNavigate();
return (
<div className="max-w-[35em] border mx-auto mt-32 p-10 rounded-md shadow-md">
<div className="max-w-[35em] border dark:border-stone-500 mx-auto mt-32 p-10 rounded-md shadow-md">
<div className="flex justify-center mb-10">
<img src="/vite.svg" className="w-16" />
</div>
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<form
onSubmit={form.handleSubmit(onSubmit)}
className="space-y-8 dark:text-stone-200"
>
<FormField
control={form.control}
name="username"
Expand Down

0 comments on commit 227d449

Please sign in to comment.