diff --git a/.gitignore b/.gitignore
index 029054a0..8ef500b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,7 @@ __debug_bin*
vendor
pb_data
main
-certimate
+./certimate
build
/docker/data
diff --git a/certimate b/certimate
new file mode 100755
index 00000000..11a40ee8
Binary files /dev/null and b/certimate differ
diff --git a/ui/src/components/certimate/Pagination.tsx b/ui/src/components/certimate/Pagination.tsx
new file mode 100644
index 00000000..35eca5a5
--- /dev/null
+++ b/ui/src/components/certimate/Pagination.tsx
@@ -0,0 +1,90 @@
+import { Button } from "../ui/button";
+
+type PaginationProps = {
+ totalPages: number;
+ currentPage: number;
+ onPageChange: (page: number) => void;
+};
+
+type PageNumber = number | string;
+
+const Pagination = ({
+ totalPages,
+ currentPage,
+ onPageChange,
+}: PaginationProps) => {
+ const pageNeighbours = 2; // Number of page numbers to show on either side of the current page
+
+ const getPageNumbers = () => {
+ const totalNumbers = pageNeighbours * 2 + 3; // total pages to display (left + right neighbours + current + 2 for start and end)
+ const totalBlocks = totalNumbers + 2; // adding 2 for the start and end page numbers
+
+ if (totalPages > totalBlocks) {
+ let pages: PageNumber[] = [];
+
+ const leftBound = Math.max(2, currentPage - pageNeighbours);
+ const rightBound = Math.min(totalPages - 1, currentPage + pageNeighbours);
+
+ const beforeLastPage = totalPages - 1;
+
+ pages = range(leftBound, rightBound);
+
+ if (currentPage > pageNeighbours + 2) {
+ pages.unshift("...");
+ }
+ if (currentPage < beforeLastPage - pageNeighbours) {
+ pages.push("...");
+ }
+
+ pages.unshift(1);
+ pages.push(totalPages);
+
+ return pages;
+ }
+
+ return range(1, totalPages);
+ };
+
+ const range = (from: number, to: number, step = 1) => {
+ let i = from;
+ const range = [];
+
+ while (i <= to) {
+ range.push(i);
+ i += step;
+ }
+
+ return range;
+ };
+
+ const pages = getPageNumbers();
+
+ return (
+
+ {pages.map((page, index) => {
+ if (page === "...") {
+ return (
+
+ …
+
+ );
+ }
+
+ return (
+
+ );
+ })}
+
+ );
+};
+
+export default Pagination;
diff --git a/ui/src/components/ui/pagination.tsx b/ui/src/components/ui/pagination.tsx
new file mode 100644
index 00000000..d6b1fcf1
--- /dev/null
+++ b/ui/src/components/ui/pagination.tsx
@@ -0,0 +1,117 @@
+import * as React from "react";
+import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
+
+import { cn } from "@/lib/utils";
+import { ButtonProps, buttonVariants } from "@/components/ui/button";
+
+const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
+
+);
+Pagination.displayName = "Pagination";
+
+const PaginationContent = React.forwardRef<
+ HTMLUListElement,
+ React.ComponentProps<"ul">
+>(({ className, ...props }, ref) => (
+
+));
+PaginationContent.displayName = "PaginationContent";
+
+const PaginationItem = React.forwardRef<
+ HTMLLIElement,
+ React.ComponentProps<"li">
+>(({ className, ...props }, ref) => (
+
+));
+PaginationItem.displayName = "PaginationItem";
+
+type PaginationLinkProps = {
+ isActive?: boolean;
+} & Pick &
+ React.ComponentProps<"a">;
+
+const PaginationLink = ({
+ className,
+ isActive,
+ size = "icon",
+ ...props
+}: PaginationLinkProps) => (
+
+);
+PaginationLink.displayName = "PaginationLink";
+
+const PaginationPrevious = ({
+ className,
+ ...props
+}: React.ComponentProps) => (
+
+
+ 上一页
+
+);
+PaginationPrevious.displayName = "PaginationPrevious";
+
+const PaginationNext = ({
+ className,
+ ...props
+}: React.ComponentProps) => (
+
+ 下一页
+
+
+);
+PaginationNext.displayName = "PaginationNext";
+
+const PaginationEllipsis = ({
+ className,
+ ...props
+}: React.ComponentProps<"span">) => (
+
+
+ More pages
+
+);
+PaginationEllipsis.displayName = "PaginationEllipsis";
+
+export {
+ Pagination,
+ PaginationContent,
+ PaginationEllipsis,
+ PaginationItem,
+ PaginationLink,
+ PaginationNext,
+ PaginationPrevious,
+};
diff --git a/ui/src/pages/domains/Home.tsx b/ui/src/pages/domains/Home.tsx
index 67213a9e..03202a6e 100644
--- a/ui/src/pages/domains/Home.tsx
+++ b/ui/src/pages/domains/Home.tsx
@@ -1,4 +1,5 @@
import DeployProgress from "@/components/certimate/DeployProgress";
+import Pagination from "@/components/certimate/Pagination";
import Show from "@/components/Show";
import {
AlertDialogAction,
@@ -323,6 +324,14 @@ const Home = () => {
))}
+
+ {
+ console.log(page);
+ }}
+ />
>
)}