Skip to content

Commit

Permalink
UI optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
usual2970 committed Sep 17, 2024
1 parent 34e40e5 commit 2efe0de
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 76 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ui/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Certimate - Your Trusted SSL Automation Partner</title>
<script type="module" crossorigin src="/assets/index-BSGxRdQb.js"></script>
<script type="module" crossorigin src="/assets/index-DoSOua_N.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-ChWRjRip.css">
</head>
<body class="bg-background">
Expand Down
31 changes: 31 additions & 0 deletions ui/src/components/certimate/Version.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { BookOpen } from "lucide-react";

import { Separator } from "../ui/separator";
import { version } from "@/domain/version";

const Version = () => {
return (
<div className="fixed right-0 bottom-0 w-full flex justify-between p-5">
<div className=""></div>
<div className="text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex">
<a
href="https://docs.certimate.me"
target="_blank"
className="flex items-center"
>
<BookOpen size={16} />
<div className="ml-1">文档</div>
</a>
<Separator orientation="vertical" className="mx-2" />
<a
href="https://github.com/usual2970/certimate/releases"
target="_blank"
>
{version}
</a>
</div>
</div>
);
};

export default Version;
1 change: 1 addition & 0 deletions ui/src/domain/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const version = "Certimate v0.1.7";
35 changes: 4 additions & 31 deletions ui/src/pages/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ import {
useLocation,
useNavigate,
} from "react-router-dom";
import {
BookOpen,
CircleUser,
Earth,

History,
Home,
Menu,
Server,
} from "lucide-react";
import { CircleUser, Earth, History, Home, Menu, Server } from "lucide-react";

import { Button } from "@/components/ui/button";

Expand All @@ -31,7 +22,8 @@ import { cn } from "@/lib/utils";
import { ConfigProvider } from "@/providers/config";
import { getPb } from "@/repository/api";
import { ThemeToggle } from "@/components/ThemeToggle";
import { Separator } from "@/components/ui/separator";

import Version from "@/components/certimate/Version";

export default function Dashboard() {
const navigate = useNavigate();
Expand Down Expand Up @@ -212,26 +204,7 @@ export default function Dashboard() {
<main className="flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative">
<Outlet />

<div className="fixed right-0 bottom-0 w-full flex justify-between p-5">
<div className=""></div>
<div className="text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex">
<a
href="https://docs.certimate.me"
target="_blank"
className="flex items-center"
>
<BookOpen size={16} />
<div className="ml-1">文档</div>
</a>
<Separator orientation="vertical" className="mx-2" />
<a
href="https://github.com/usual2970/certimate/releases"
target="_blank"
>
Certimate v0.1.7
</a>
</div>
</div>
<Version />
</main>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions ui/src/pages/LoginLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Version from "@/components/certimate/Version";

import { getPb } from "@/repository/api";

import { Navigate, Outlet } from "react-router-dom";

const LoginLayout = () => {
Expand All @@ -8,6 +11,8 @@ const LoginLayout = () => {
return (
<div className="container">
<Outlet />

<Version />
</div>
);
};
Expand Down

0 comments on commit 2efe0de

Please sign in to comment.