diff --git a/ui/package-lock.json b/ui/package-lock.json
index 1377450b..f73e352f 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -11,14 +11,11 @@
"@ant-design/pro-components": "^2.8.2",
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-accordion": "^1.2.0",
- "@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0",
- "@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-popover": "^1.1.2",
- "@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-select": "^2.1.1",
@@ -52,7 +49,6 @@
"react-router-dom": "^6.25.1",
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7",
- "vaul": "^0.9.1",
"zod": "^3.23.8",
"zustand": "^5.0.1"
},
@@ -1688,68 +1684,6 @@
}
}
},
- "node_modules/@radix-ui/react-alert-dialog": {
- "version": "1.1.1",
- "resolved": "https://registry.npmmirror.com/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.1.tgz",
- "integrity": "sha512-wmCoJwj7byuVuiLKqDLlX7ClSUU0vd9sdCeM+2Ls+uf13+cpSJoMgwysHq1SGVVkJj5Xn0XWi1NoRCdkMpr6Mw==",
- "dependencies": {
- "@radix-ui/primitive": "1.1.0",
- "@radix-ui/react-compose-refs": "1.1.0",
- "@radix-ui/react-context": "1.1.0",
- "@radix-ui/react-dialog": "1.1.1",
- "@radix-ui/react-primitive": "2.0.0",
- "@radix-ui/react-slot": "1.1.0"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
- "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
- "node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dialog": {
- "version": "1.1.1",
- "resolved": "https://registry.npmmirror.com/@radix-ui/react-dialog/-/react-dialog-1.1.1.tgz",
- "integrity": "sha512-zysS+iU4YP3STKNS6USvFVqI4qqx8EpiwmT5TuCApVEBca+eRCbONi4EgzfNSuVnOXvC5UPHHMjs8RXO6DH9Bg==",
- "dependencies": {
- "@radix-ui/primitive": "1.1.0",
- "@radix-ui/react-compose-refs": "1.1.0",
- "@radix-ui/react-context": "1.1.0",
- "@radix-ui/react-dismissable-layer": "1.1.0",
- "@radix-ui/react-focus-guards": "1.1.0",
- "@radix-ui/react-focus-scope": "1.1.0",
- "@radix-ui/react-id": "1.1.0",
- "@radix-ui/react-portal": "1.1.1",
- "@radix-ui/react-presence": "1.1.0",
- "@radix-ui/react-primitive": "2.0.0",
- "@radix-ui/react-slot": "1.1.0",
- "@radix-ui/react-use-controllable-state": "1.1.0",
- "aria-hidden": "^1.1.1",
- "react-remove-scroll": "2.5.7"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
- "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
"node_modules/@radix-ui/react-arrow": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz",
@@ -2234,41 +2168,6 @@
}
}
},
- "node_modules/@radix-ui/react-navigation-menu": {
- "version": "1.2.0",
- "resolved": "https://registry.npmmirror.com/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.0.tgz",
- "integrity": "sha512-OQ8tcwAOR0DhPlSY3e4VMXeHiol7la4PPdJWhhwJiJA+NLX0SaCaonOkRnI3gCDHoZ7Fo7bb/G6q25fRM2Y+3Q==",
- "dependencies": {
- "@radix-ui/primitive": "1.1.0",
- "@radix-ui/react-collection": "1.1.0",
- "@radix-ui/react-compose-refs": "1.1.0",
- "@radix-ui/react-context": "1.1.0",
- "@radix-ui/react-direction": "1.1.0",
- "@radix-ui/react-dismissable-layer": "1.1.0",
- "@radix-ui/react-id": "1.1.0",
- "@radix-ui/react-presence": "1.1.0",
- "@radix-ui/react-primitive": "2.0.0",
- "@radix-ui/react-use-callback-ref": "1.1.0",
- "@radix-ui/react-use-controllable-state": "1.1.0",
- "@radix-ui/react-use-layout-effect": "1.1.0",
- "@radix-ui/react-use-previous": "1.1.0",
- "@radix-ui/react-visually-hidden": "1.1.0"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
- "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
"node_modules/@radix-ui/react-popover": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/@radix-ui/react-popover/-/react-popover-1.1.2.tgz",
@@ -2528,29 +2427,6 @@
}
}
},
- "node_modules/@radix-ui/react-progress": {
- "version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/@radix-ui/react-progress/-/react-progress-1.1.0.tgz",
- "integrity": "sha512-aSzvnYpP725CROcxAOEBVZZSIQVQdHgBr2QQFKySsaD14u8dNT0batuXI+AAGDdAHfXH8rbnHmjYFqVJ21KkRg==",
- "dependencies": {
- "@radix-ui/react-context": "1.1.0",
- "@radix-ui/react-primitive": "2.0.0"
- },
- "peerDependencies": {
- "@types/react": "*",
- "@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
- "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
- },
- "peerDependenciesMeta": {
- "@types/react": {
- "optional": true
- },
- "@types/react-dom": {
- "optional": true
- }
- }
- },
"node_modules/@radix-ui/react-radio-group": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/@radix-ui/react-radio-group/-/react-radio-group-1.2.0.tgz",
@@ -7866,18 +7742,6 @@
"resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
- "node_modules/vaul": {
- "version": "0.9.1",
- "resolved": "https://registry.npmmirror.com/vaul/-/vaul-0.9.1.tgz",
- "integrity": "sha512-fAhd7i4RNMinx+WEm6pF3nOl78DFkAazcN04ElLPFF9BMCNGbY/kou8UMhIcicm0rJCNePJP0Yyza60gGOD0Jw==",
- "dependencies": {
- "@radix-ui/react-dialog": "^1.0.4"
- },
- "peerDependencies": {
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
- }
- },
"node_modules/vite": {
"version": "5.4.8",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz",
diff --git a/ui/package.json b/ui/package.json
index 022aff59..8758ecbf 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -13,14 +13,11 @@
"@ant-design/pro-components": "^2.8.2",
"@hookform/resolvers": "^3.9.0",
"@radix-ui/react-accordion": "^1.2.0",
- "@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-label": "^2.1.0",
- "@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-popover": "^1.1.2",
- "@radix-ui/react-progress": "^1.1.0",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-scroll-area": "^1.1.0",
"@radix-ui/react-select": "^2.1.1",
@@ -54,7 +51,6 @@
"react-router-dom": "^6.25.1",
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7",
- "vaul": "^0.9.1",
"zod": "^3.23.8",
"zustand": "^5.0.1"
},
diff --git a/ui/src/components/certimate/XPagination.tsx b/ui/src/components/certimate/XPagination.tsx
deleted file mode 100644
index 53435387..00000000
--- a/ui/src/components/certimate/XPagination.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink } from "@/components/ui/pagination";
-
-type PaginationProps = {
- totalPages: number;
- currentPage: number;
- onPageChange: (page: number) => void;
-};
-
-type PageNumber = number | string;
-
-const XPagination = ({ totalPages, currentPage, onPageChange }: PaginationProps) => {
- const pageNeighbours = 1; // 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 (
-
- {
- e.preventDefault();
- onPageChange(page as number);
- }}
- >
- {page}
-
-
- );
- })}
-
-
- >
- );
-};
-
-export default XPagination;
diff --git a/ui/src/components/ui/alert-dialog.tsx b/ui/src/components/ui/alert-dialog.tsx
deleted file mode 100644
index 168887f1..00000000
--- a/ui/src/components/ui/alert-dialog.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import * as React from "react";
-import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
-
-import { cn } from "./utils";
-import { buttonVariants } from "@/components/ui/button";
-
-const AlertDialog = AlertDialogPrimitive.Root;
-
-const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
-
-const AlertDialogPortal = AlertDialogPrimitive.Portal;
-
-const AlertDialogOverlay = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
-
-const AlertDialogContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-
-
-
-));
-AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
-
-const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes) => (
-
-);
-AlertDialogHeader.displayName = "AlertDialogHeader";
-
-const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes) => (
-
-);
-AlertDialogFooter.displayName = "AlertDialogFooter";
-
-const AlertDialogTitle = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => );
-AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
-
-const AlertDialogDescription = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => );
-AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
-
-const AlertDialogAction = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => );
-AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
-
-const AlertDialogCancel = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
-
-export {
- AlertDialog,
- AlertDialogPortal,
- AlertDialogOverlay,
- AlertDialogTrigger,
- AlertDialogContent,
- AlertDialogHeader,
- AlertDialogFooter,
- AlertDialogTitle,
- AlertDialogDescription,
- AlertDialogAction,
- AlertDialogCancel,
-};
diff --git a/ui/src/components/ui/badge.tsx b/ui/src/components/ui/badge.tsx
deleted file mode 100644
index aaa69973..00000000
--- a/ui/src/components/ui/badge.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from "react";
-import { cva, type VariantProps } from "class-variance-authority";
-
-import { cn } from "./utils";
-
-const badgeVariants = cva(
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
- {
- variants: {
- variant: {
- default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
- destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
- outline: "text-foreground",
- },
- },
- defaultVariants: {
- variant: "default",
- },
- }
-);
-
-export interface BadgeProps extends React.HTMLAttributes, VariantProps {}
-
-function Badge({ className, variant, ...props }: BadgeProps) {
- return ;
-}
-
-export { Badge, badgeVariants };
diff --git a/ui/src/components/ui/breadcrumb.tsx b/ui/src/components/ui/breadcrumb.tsx
deleted file mode 100644
index 1b173dd1..00000000
--- a/ui/src/components/ui/breadcrumb.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import * as React from "react";
-import { Slot } from "@radix-ui/react-slot";
-import { ChevronRight, MoreHorizontal } from "lucide-react";
-
-import { cn } from "./utils";
-
-const Breadcrumb = React.forwardRef<
- HTMLElement,
- React.ComponentPropsWithoutRef<"nav"> & {
- separator?: React.ReactNode;
- }
->(({ ...props }, ref) => );
-Breadcrumb.displayName = "Breadcrumb";
-
-const BreadcrumbList = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-BreadcrumbList.displayName = "BreadcrumbList";
-
-const BreadcrumbItem = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-BreadcrumbItem.displayName = "BreadcrumbItem";
-
-const BreadcrumbLink = React.forwardRef<
- HTMLAnchorElement,
- React.ComponentPropsWithoutRef<"a"> & {
- asChild?: boolean;
- }
->(({ asChild, className, ...props }, ref) => {
- const Comp = asChild ? Slot : "a";
-
- return ;
-});
-BreadcrumbLink.displayName = "BreadcrumbLink";
-
-const BreadcrumbPage = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-BreadcrumbPage.displayName = "BreadcrumbPage";
-
-const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentProps<"li">) => (
- svg]:size-3.5", className)} {...props}>
- {children ?? }
-
-);
-BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
-
-const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
-
-
- More
-
-);
-BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
-
-export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis };
diff --git a/ui/src/components/ui/card.tsx b/ui/src/components/ui/card.tsx
deleted file mode 100644
index cb0c1c0b..00000000
--- a/ui/src/components/ui/card.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import * as React from "react";
-
-import { cn } from "./utils";
-
-const Card = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-Card.displayName = "Card";
-
-const CardHeader = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-CardHeader.displayName = "CardHeader";
-
-const CardTitle = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-CardTitle.displayName = "CardTitle";
-
-const CardDescription = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-CardDescription.displayName = "CardDescription";
-
-const CardContent = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-CardContent.displayName = "CardContent";
-
-const CardFooter = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-CardFooter.displayName = "CardFooter";
-
-export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
diff --git a/ui/src/components/ui/drawer.tsx b/ui/src/components/ui/drawer.tsx
deleted file mode 100644
index 81fe4234..00000000
--- a/ui/src/components/ui/drawer.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import * as React from "react";
-import { Drawer as DrawerPrimitive } from "vaul";
-
-import { cn } from "./utils";
-
-const Drawer = ({ shouldScaleBackground = true, ...props }: React.ComponentProps) => (
-
-);
-Drawer.displayName = "Drawer";
-
-const DrawerTrigger = DrawerPrimitive.Trigger;
-
-const DrawerPortal = DrawerPrimitive.Portal;
-
-const DrawerClose = DrawerPrimitive.Close;
-
-const DrawerOverlay = React.forwardRef, React.ComponentPropsWithoutRef>(
- ({ className, ...props }, ref) =>
-);
-DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
-
-const DrawerContent = React.forwardRef, React.ComponentPropsWithoutRef>(
- ({ className, children, ...props }, ref) => (
-
-
-
-
- {children}
-
-
- )
-);
-DrawerContent.displayName = "DrawerContent";
-
-const DrawerHeader = ({ className, ...props }: React.HTMLAttributes) => (
-
-);
-DrawerHeader.displayName = "DrawerHeader";
-
-const DrawerFooter = ({ className, ...props }: React.HTMLAttributes) => (
-
-);
-DrawerFooter.displayName = "DrawerFooter";
-
-const DrawerTitle = React.forwardRef, React.ComponentPropsWithoutRef>(
- ({ className, ...props }, ref) => (
-
- )
-);
-DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
-
-const DrawerDescription = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => );
-DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
-
-export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription };
diff --git a/ui/src/components/ui/navigation-menu.tsx b/ui/src/components/ui/navigation-menu.tsx
deleted file mode 100644
index cba14b92..00000000
--- a/ui/src/components/ui/navigation-menu.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import * as React from "react";
-import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
-import { ChevronDown } from "lucide-react";
-import { cva } from "class-variance-authority";
-
-import { cn } from "./utils";
-
-const NavigationMenu = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
- {children}
-
-
-));
-NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
-
-const NavigationMenuList = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
-
-const NavigationMenuItem = NavigationMenuPrimitive.Item;
-
-const navigationMenuTriggerStyle = cva(
- "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
-);
-
-const NavigationMenuTrigger = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
- {children}
-
-));
-NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
-
-const NavigationMenuContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-));
-NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
-
-const NavigationMenuLink = NavigationMenuPrimitive.Link;
-
-const NavigationMenuViewport = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-
-
-));
-NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
-
-const NavigationMenuIndicator = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-
-
-));
-NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
-
-export {
- navigationMenuTriggerStyle,
- NavigationMenu,
- NavigationMenuList,
- NavigationMenuItem,
- NavigationMenuContent,
- NavigationMenuTrigger,
- NavigationMenuLink,
- NavigationMenuIndicator,
- NavigationMenuViewport,
-};
diff --git a/ui/src/components/ui/pagination.tsx b/ui/src/components/ui/pagination.tsx
deleted file mode 100644
index 474de12f..00000000
--- a/ui/src/components/ui/pagination.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import * as React from "react";
-import { useTranslation } from "react-i18next";
-import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
-
-import { cn } from "./utils";
-import { ButtonProps, buttonVariants } from "@/components/ui/button";
-
-const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
-
-);
-Pagination.displayName = "Pagination";
-
-const PaginationContent = React.forwardRef>(({ className, ...props }, ref) => (
-
-));
-PaginationContent.displayName = "PaginationContent";
-
-const PaginationItem = React.forwardRef>(({ 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) => {
- const { t } = useTranslation();
-
- return (
-
-
- {t("common.pagination.prev")}
-
- );
-};
-PaginationPrevious.displayName = "PaginationPrevious";
-
-const PaginationNext = ({ className, ...props }: React.ComponentProps) => {
- const { t } = useTranslation();
-
- return (
-
- {t("common.pagination.next")}
-
-
- );
-};
-PaginationNext.displayName = "PaginationNext";
-
-const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => {
- const { t } = useTranslation();
-
- return (
-
-
- {t("common.pagination.more")}
-
- );
-};
-PaginationEllipsis.displayName = "PaginationEllipsis";
-
-export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
diff --git a/ui/src/components/ui/progress.tsx b/ui/src/components/ui/progress.tsx
deleted file mode 100644
index 6a9a161b..00000000
--- a/ui/src/components/ui/progress.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import * as React from "react";
-import * as ProgressPrimitive from "@radix-ui/react-progress";
-
-import { cn } from "./utils";
-
-const Progress = React.forwardRef, React.ComponentPropsWithoutRef>(
- ({ className, value, ...props }, ref) => (
-
-
-
- )
-);
-Progress.displayName = ProgressPrimitive.Root.displayName;
-
-export { Progress };
diff --git a/ui/src/components/workflow/AddNode.tsx b/ui/src/components/workflow/AddNode.tsx
index 30322391..95307cac 100644
--- a/ui/src/components/workflow/AddNode.tsx
+++ b/ui/src/components/workflow/AddNode.tsx
@@ -3,7 +3,7 @@ import { Plus } from "lucide-react";
import { BrandNodeProps, NodeProps } from "./types";
import { newWorkflowNode, workflowNodeDropdownList, WorkflowNodeType } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import {
DropdownMenu,
diff --git a/ui/src/components/workflow/ApplyForm.tsx b/ui/src/components/workflow/ApplyForm.tsx
index 90b850da..571d8351 100644
--- a/ui/src/components/workflow/ApplyForm.tsx
+++ b/ui/src/components/workflow/ApplyForm.tsx
@@ -22,7 +22,7 @@ import { useConfigContext } from "@/providers/config";
import { Switch } from "@/components/ui/switch";
import { TooltipFast } from "@/components/ui/tooltip";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
diff --git a/ui/src/components/workflow/BranchNode.tsx b/ui/src/components/workflow/BranchNode.tsx
index f062b33e..b09b2fd3 100644
--- a/ui/src/components/workflow/BranchNode.tsx
+++ b/ui/src/components/workflow/BranchNode.tsx
@@ -4,7 +4,7 @@ import { WorkflowBranchNode, WorkflowNode } from "@/domain/workflow";
import NodeRender from "./NodeRender";
import { memo } from "react";
import { BrandNodeProps } from "./types";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { useTranslation } from "react-i18next";
diff --git a/ui/src/components/workflow/ConditionNode.tsx b/ui/src/components/workflow/ConditionNode.tsx
index e4f31f34..d35d80cc 100644
--- a/ui/src/components/workflow/ConditionNode.tsx
+++ b/ui/src/components/workflow/ConditionNode.tsx
@@ -1,4 +1,4 @@
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import AddNode from "./AddNode";
import { NodeProps } from "./types";
import { useShallow } from "zustand/shallow";
diff --git a/ui/src/components/workflow/CustomAlertDialog.tsx b/ui/src/components/workflow/CustomAlertDialog.tsx
deleted file mode 100644
index 74c79721..00000000
--- a/ui/src/components/workflow/CustomAlertDialog.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import {
- AlertDialog,
- AlertDialogAction,
- AlertDialogCancel,
- AlertDialogContent,
- AlertDialogDescription,
- AlertDialogFooter,
- AlertDialogHeader,
- AlertDialogTitle,
-} from "@/components/ui/alert-dialog";
-import { useTranslation } from "react-i18next";
-
-type CustomAlertDialogProps = {
- open: boolean;
- onOpenChange?: (open: boolean) => void;
- title?: string;
- description?: string;
- confirm?: () => void;
-};
-
-const CustomAlertDialog = ({ open, title, description, confirm, onOpenChange }: CustomAlertDialogProps) => {
- const { t } = useTranslation();
-
- return (
-
-
-
- {title}
- {description}
-
-
- {t("common.cancel")}
- {
- confirm && confirm();
- }}
- >
- {t("common.confirm")}
-
-
-
-
- );
-};
-
-export default CustomAlertDialog;
diff --git a/ui/src/components/workflow/DeployToAliyunALB.tsx b/ui/src/components/workflow/DeployToAliyunALB.tsx
index afb16c43..fda198a9 100644
--- a/ui/src/components/workflow/DeployToAliyunALB.tsx
+++ b/ui/src/components/workflow/DeployToAliyunALB.tsx
@@ -6,7 +6,7 @@ import { Input } from "@/components/ui/input";
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "@/components/ui/select";
import { DeployFormProps } from "./DeployForm";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { useForm } from "react-hook-form";
diff --git a/ui/src/components/workflow/DeployToAliyunCDN.tsx b/ui/src/components/workflow/DeployToAliyunCDN.tsx
index 6161255e..0bf57ec2 100644
--- a/ui/src/components/workflow/DeployToAliyunCDN.tsx
+++ b/ui/src/components/workflow/DeployToAliyunCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToAliyunCLB.tsx b/ui/src/components/workflow/DeployToAliyunCLB.tsx
index 59f69445..79c78027 100644
--- a/ui/src/components/workflow/DeployToAliyunCLB.tsx
+++ b/ui/src/components/workflow/DeployToAliyunCLB.tsx
@@ -6,7 +6,7 @@ import { Input } from "@/components/ui/input";
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "@/components/ui/select";
import { DeployFormProps } from "./DeployForm";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { useForm } from "react-hook-form";
diff --git a/ui/src/components/workflow/DeployToAliyunNLB.tsx b/ui/src/components/workflow/DeployToAliyunNLB.tsx
index c1018023..a902cb6c 100644
--- a/ui/src/components/workflow/DeployToAliyunNLB.tsx
+++ b/ui/src/components/workflow/DeployToAliyunNLB.tsx
@@ -6,7 +6,7 @@ import { Input } from "@/components/ui/input";
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "@/components/ui/select";
import { DeployFormProps } from "./DeployForm";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { useForm } from "react-hook-form";
diff --git a/ui/src/components/workflow/DeployToAliyunOss.tsx b/ui/src/components/workflow/DeployToAliyunOss.tsx
index 98058237..b1011a91 100644
--- a/ui/src/components/workflow/DeployToAliyunOss.tsx
+++ b/ui/src/components/workflow/DeployToAliyunOss.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx b/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx
index 6fb00ea4..6394444f 100644
--- a/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx
+++ b/ui/src/components/workflow/DeployToBaiduCloudCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToByteplusCDN.tsx b/ui/src/components/workflow/DeployToByteplusCDN.tsx
index 08210b3b..d460b97a 100644
--- a/ui/src/components/workflow/DeployToByteplusCDN.tsx
+++ b/ui/src/components/workflow/DeployToByteplusCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToDogeCloudCDN.tsx b/ui/src/components/workflow/DeployToDogeCloudCDN.tsx
index 2ffdb1fc..27ee6b43 100644
--- a/ui/src/components/workflow/DeployToDogeCloudCDN.tsx
+++ b/ui/src/components/workflow/DeployToDogeCloudCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx b/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx
index b5a252c5..f8a89d0c 100644
--- a/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx
+++ b/ui/src/components/workflow/DeployToHuaweiCloudCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx b/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx
index 0e1ed85c..ea6a306c 100644
--- a/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx
+++ b/ui/src/components/workflow/DeployToHuaweiCloudELB.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToKubernetesSecret.tsx b/ui/src/components/workflow/DeployToKubernetesSecret.tsx
index b4091a0a..6c3db321 100644
--- a/ui/src/components/workflow/DeployToKubernetesSecret.tsx
+++ b/ui/src/components/workflow/DeployToKubernetesSecret.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToLocal.tsx b/ui/src/components/workflow/DeployToLocal.tsx
index 8b23a690..5e9cec63 100644
--- a/ui/src/components/workflow/DeployToLocal.tsx
+++ b/ui/src/components/workflow/DeployToLocal.tsx
@@ -7,7 +7,7 @@ import { Input } from "@/components/ui/input";
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "../ui/select";
import { Button } from "../ui/button";
import { DeployFormProps } from "./DeployForm";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { useEffect, useState } from "react";
diff --git a/ui/src/components/workflow/DeployToQiniuCDN.tsx b/ui/src/components/workflow/DeployToQiniuCDN.tsx
index c52bb5f4..b353942e 100644
--- a/ui/src/components/workflow/DeployToQiniuCDN.tsx
+++ b/ui/src/components/workflow/DeployToQiniuCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToSSH.tsx b/ui/src/components/workflow/DeployToSSH.tsx
index f0876b7b..3056c678 100644
--- a/ui/src/components/workflow/DeployToSSH.tsx
+++ b/ui/src/components/workflow/DeployToSSH.tsx
@@ -7,7 +7,7 @@ import { Input } from "@/components/ui/input";
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "../ui/select";
import { Button } from "../ui/button";
import { DeployFormProps } from "./DeployForm";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { useEffect, useState } from "react";
diff --git a/ui/src/components/workflow/DeployToTencentCDN.tsx b/ui/src/components/workflow/DeployToTencentCDN.tsx
index 1e82a015..4ae8270d 100644
--- a/ui/src/components/workflow/DeployToTencentCDN.tsx
+++ b/ui/src/components/workflow/DeployToTencentCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToTencentCLB.tsx b/ui/src/components/workflow/DeployToTencentCLB.tsx
index 9e38a28d..d2fd2c26 100644
--- a/ui/src/components/workflow/DeployToTencentCLB.tsx
+++ b/ui/src/components/workflow/DeployToTencentCLB.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToTencentCOS.tsx b/ui/src/components/workflow/DeployToTencentCOS.tsx
index dcffa661..4091e0b0 100644
--- a/ui/src/components/workflow/DeployToTencentCOS.tsx
+++ b/ui/src/components/workflow/DeployToTencentCOS.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToTencentTEO.tsx b/ui/src/components/workflow/DeployToTencentTEO.tsx
index f40514ea..00247b36 100644
--- a/ui/src/components/workflow/DeployToTencentTEO.tsx
+++ b/ui/src/components/workflow/DeployToTencentTEO.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToVolcengineCDN.tsx b/ui/src/components/workflow/DeployToVolcengineCDN.tsx
index 662fee1d..ad5b0e5e 100644
--- a/ui/src/components/workflow/DeployToVolcengineCDN.tsx
+++ b/ui/src/components/workflow/DeployToVolcengineCDN.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToVolcengineLive.tsx b/ui/src/components/workflow/DeployToVolcengineLive.tsx
index ae464e51..67e68365 100644
--- a/ui/src/components/workflow/DeployToVolcengineLive.tsx
+++ b/ui/src/components/workflow/DeployToVolcengineLive.tsx
@@ -7,7 +7,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/DeployToWebhook.tsx b/ui/src/components/workflow/DeployToWebhook.tsx
index f62e3896..078bff6e 100644
--- a/ui/src/components/workflow/DeployToWebhook.tsx
+++ b/ui/src/components/workflow/DeployToWebhook.tsx
@@ -6,7 +6,7 @@ import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { WorkflowNode, WorkflowNodeConfig } from "@/domain/workflow";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { Button } from "../ui/button";
diff --git a/ui/src/components/workflow/Node.tsx b/ui/src/components/workflow/Node.tsx
index 88ecdef7..4e5995a6 100644
--- a/ui/src/components/workflow/Node.tsx
+++ b/ui/src/components/workflow/Node.tsx
@@ -1,6 +1,6 @@
import { WorkflowNode, WorkflowNodeType } from "@/domain/workflow";
import AddNode from "./AddNode";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/dropdown-menu";
import { Ellipsis, Trash2 } from "lucide-react";
diff --git a/ui/src/components/workflow/NotifyForm.tsx b/ui/src/components/workflow/NotifyForm.tsx
index 3e07a90c..8d6e2d16 100644
--- a/ui/src/components/workflow/NotifyForm.tsx
+++ b/ui/src/components/workflow/NotifyForm.tsx
@@ -5,7 +5,7 @@ import { z } from "zod";
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "../ui/form";
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger } from "../ui/select";
import { Input } from "../ui/input";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
import { useTranslation } from "react-i18next";
diff --git a/ui/src/components/workflow/StartForm.tsx b/ui/src/components/workflow/StartForm.tsx
index ae4fd559..cbdf83ff 100644
--- a/ui/src/components/workflow/StartForm.tsx
+++ b/ui/src/components/workflow/StartForm.tsx
@@ -10,7 +10,7 @@ import { RadioGroup, RadioGroupItem } from "../ui/radio-group";
import { Label } from "../ui/label";
import { useTranslation } from "react-i18next";
import { parseExpression } from "cron-parser";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { usePanel } from "./PanelProvider";
diff --git a/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx b/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx
index 0e1f74d2..a33a430a 100644
--- a/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx
+++ b/ui/src/components/workflow/WorkflowBaseInfoEditDialog.tsx
@@ -1,6 +1,6 @@
import { z } from "zod";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from "../ui/dialog";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { useShallow } from "zustand/shallow";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
diff --git a/ui/src/pages/workflows/WorkflowDetail.tsx b/ui/src/pages/workflows/WorkflowDetail.tsx
index bef32888..9d7dc66a 100644
--- a/ui/src/pages/workflows/WorkflowDetail.tsx
+++ b/ui/src/pages/workflows/WorkflowDetail.tsx
@@ -14,7 +14,7 @@ import { cn } from "@/components/ui/utils";
import WorkflowProvider from "@/components/workflow/WorkflowProvider";
import { allNodesValidated, WorkflowNode } from "@/domain/workflow";
import { getErrMessage } from "@/lib/error";
-import { useWorkflowStore, WorkflowState } from "@/providers/workflow";
+import { useWorkflowStore, WorkflowState } from "@/stores/workflow";
import { ArrowLeft } from "lucide-react";
import { useEffect, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
diff --git a/ui/src/providers/workflow/index.ts b/ui/src/stores/workflow/index.ts
similarity index 92%
rename from ui/src/providers/workflow/index.ts
rename to ui/src/stores/workflow/index.ts
index c85414ce..6cdbdcd4 100644
--- a/ui/src/providers/workflow/index.ts
+++ b/ui/src/stores/workflow/index.ts
@@ -1,3 +1,5 @@
+import { create } from "zustand";
+
import {
addBranch,
addNode,
@@ -12,8 +14,7 @@ import {
WorkflowNode,
WorkflowNodeType,
} from "@/domain/workflow";
-import { save, get as getWrokflow } from "@/repository/workflow";
-import { create } from "zustand";
+import { get as getWorkflow, save as saveWorkflow } from "@/repository/workflow";
export type WorkflowState = {
workflow: Workflow;
@@ -47,7 +48,7 @@ export const useWorkflowStore = create((set, get) => ({
if (!id) {
data = initWorkflow();
} else {
- data = await getWrokflow(id);
+ data = await getWorkflow(id);
}
set({
@@ -64,7 +65,7 @@ export const useWorkflowStore = create((set, get) => ({
if (!data.id) {
data.draft = get().workflow.draft as WorkflowNode;
}
- const resp = await save(data);
+ const resp = await saveWorkflow(data);
set((state: WorkflowState) => {
return {
workflow: {
@@ -79,7 +80,7 @@ export const useWorkflowStore = create((set, get) => ({
switchEnable: async () => {
const root = get().workflow.draft as WorkflowNode;
const executeMethod = getExecuteMethod(root);
- const resp = await save({
+ const resp = await saveWorkflow({
id: (get().workflow.id as string) ?? "",
content: root,
enabled: !get().workflow.enabled,
@@ -104,7 +105,7 @@ export const useWorkflowStore = create((set, get) => ({
save: async () => {
const root = get().workflow.draft as WorkflowNode;
const executeMethod = getExecuteMethod(root);
- const resp = await save({
+ const resp = await saveWorkflow({
id: (get().workflow.id as string) ?? "",
content: root,
hasDraft: false,
@@ -126,7 +127,7 @@ export const useWorkflowStore = create((set, get) => ({
},
updateNode: async (node: WorkflowNode | WorkflowBranchNode) => {
const newRoot = updateNode(get().workflow.draft as WorkflowNode, node);
- const resp = await save({
+ const resp = await saveWorkflow({
id: (get().workflow.id as string) ?? "",
draft: newRoot,
hasDraft: true,
@@ -144,7 +145,7 @@ export const useWorkflowStore = create((set, get) => ({
},
addNode: async (node: WorkflowNode | WorkflowBranchNode, preId: string) => {
const newRoot = addNode(get().workflow.draft as WorkflowNode, preId, node);
- const resp = await save({
+ const resp = await saveWorkflow({
id: (get().workflow.id as string) ?? "",
draft: newRoot,
hasDraft: true,
@@ -162,7 +163,7 @@ export const useWorkflowStore = create((set, get) => ({
},
addBranch: async (branchId: string) => {
const newRoot = addBranch(get().workflow.draft as WorkflowNode, branchId);
- const resp = await save({
+ const resp = await saveWorkflow({
id: (get().workflow.id as string) ?? "",
draft: newRoot,
hasDraft: true,
@@ -180,7 +181,7 @@ export const useWorkflowStore = create((set, get) => ({
},
removeBranch: async (branchId: string, index: number) => {
const newRoot = removeBranch(get().workflow.draft as WorkflowNode, branchId, index);
- const resp = await save({
+ const resp = await saveWorkflow({
id: (get().workflow.id as string) ?? "",
draft: newRoot,
hasDraft: true,
@@ -198,7 +199,7 @@ export const useWorkflowStore = create((set, get) => ({
},
removeNode: async (nodeId: string) => {
const newRoot = removeNode(get().workflow.draft as WorkflowNode, nodeId);
- const resp = await save({
+ const resp = await saveWorkflow({
id: (get().workflow.id as string) ?? "",
draft: newRoot,
hasDraft: true,