From 227d44926f11383365b0edb70c7548edf351775a Mon Sep 17 00:00:00 2001 From: yoan <536464346@qq.com> Date: Sat, 31 Aug 2024 16:18:34 +0800 Subject: [PATCH] Optimize ui --- README.md | 2 +- ui/src/components/ui/sheet.tsx | 48 ++++++++++++++++---------------- ui/src/pages/DashboardLayout.tsx | 4 +-- ui/src/pages/login/Login.tsx | 7 +++-- 4 files changed, 32 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 01f58871..e9218eec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- Certimate - Your Trusted SSL Automation Partner + Certimate - Your Trusted SSL Automation Partner

diff --git a/ui/src/components/ui/sheet.tsx b/ui/src/components/ui/sheet.tsx index d64a6fa7..99e499e6 100644 --- a/ui/src/components/ui/sheet.tsx +++ b/ui/src/components/ui/sheet.tsx @@ -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, @@ -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", @@ -45,7 +45,7 @@ const sheetVariants = cva( side: "right", }, } -) +); interface SheetContentProps extends React.ComponentPropsWithoutRef, @@ -64,13 +64,13 @@ const SheetContent = React.forwardRef< > {children} - + Close -)) -SheetContent.displayName = SheetPrimitive.Content.displayName +)); +SheetContent.displayName = SheetPrimitive.Content.displayName; const SheetHeader = ({ className, @@ -83,8 +83,8 @@ const SheetHeader = ({ )} {...props} /> -) -SheetHeader.displayName = "SheetHeader" +); +SheetHeader.displayName = "SheetHeader"; const SheetFooter = ({ className, @@ -97,8 +97,8 @@ const SheetFooter = ({ )} {...props} /> -) -SheetFooter.displayName = "SheetFooter" +); +SheetFooter.displayName = "SheetFooter"; const SheetTitle = React.forwardRef< React.ElementRef, @@ -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, @@ -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, @@ -135,4 +135,4 @@ export { SheetFooter, SheetTitle, SheetDescription, -} +}; diff --git a/ui/src/pages/DashboardLayout.tsx b/ui/src/pages/DashboardLayout.tsx index 5b69836f..e3cf64aa 100644 --- a/ui/src/pages/DashboardLayout.tsx +++ b/ui/src/pages/DashboardLayout.tsx @@ -104,7 +104,7 @@ export default function Dashboard() { size="icon" className="shrink-0 md:hidden" > - + Toggle navigation menu @@ -115,7 +115,7 @@ export default function Dashboard() { className="flex items-center gap-2 text-lg font-semibold" > - Certimate + Certimate Certimate { const navigage = useNavigate(); return ( -
+
- +