mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-24 15:25:23 +02:00
* feat: update dependencies and enhance UI components in Dokploy - Updated various package versions in pnpm-lock.yaml to improve compatibility and performance, including React and Tailwind CSS. - Modified components.json to change the styling to "radix-nova" and added new properties for icon library and menu color. - Refactored multiple components to use updated class names for better styling consistency and responsiveness. - Removed unused Radix UI components from package.json to streamline dependencies. - Adjusted layout and styling in several dashboard components for improved user experience and visual appeal. - Enhanced tooltip and form item components for better accessibility and usability. * refactor: enhance UI components in HandleCertificate and SidebarLogo - Updated the HandleCertificate component to improve dialog content height and textarea styling for better usability. - Adjusted the SidebarLogo component layout to enhance alignment and spacing, ensuring a more consistent appearance across the sidebar. - Implemented responsive design adjustments to textarea elements, preventing overflow and improving user experience. * refactor: improve UI consistency and styling across dashboard components - Updated Card components in ShowDeployments, ShowSchedules, and ShowVolumeBackups to remove unnecessary border styles for a cleaner look. - Enhanced TabsList components in ShowProviderForm and ShowProviderFormCompose by adding a variant for improved visual distinction. - Adjusted spacing in AdvancedEnvironmentSelector for better layout and readability. - Removed redundant border classes in Service component for a more streamlined design. * [autofix.ci] apply automated fixes * chore: update package dependencies and refactor email rendering - Upgraded React and React DOM to version 19.2.7 across multiple packages for improved performance and compatibility. - Updated TSX to version 4.22.4 in various package.json files. - Refactored email rendering from `renderAsync` to `render` in notification utilities and email templates for consistency. - Adjusted Tailwind configuration usage in email templates to utilize a centralized configuration file. These changes enhance the overall stability and maintainability of the codebase. * refactor: update badge variants across dashboard components - Changed badge variant from "outline-solid" to "outline" in multiple components including columns, show-domains, and various deployment tables for consistency in styling. - Updated button variants in billing and project templates to align with the new badge styling. - Enhanced input components to support password generation and error messaging, improving user experience. These changes streamline the UI and ensure a cohesive design across the application. * refactor: clean up calendar component imports and structure - Removed redundant imports of icons from lucide-react and streamlined the import statements for better readability. - Adjusted the placement of type imports to enhance code organization. These changes improve the maintainability and clarity of the calendar component. * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
135 lines
4.2 KiB
TypeScript
135 lines
4.2 KiB
TypeScript
import {
|
|
FileIcon,
|
|
Folder,
|
|
FolderOpen,
|
|
Loader2,
|
|
MousePointerClick,
|
|
Workflow,
|
|
} from "lucide-react";
|
|
import React from "react";
|
|
import { AlertBlock } from "@/components/shared/alert-block";
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardDescription,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import { Tree } from "@/components/ui/file-tree";
|
|
import { api } from "@/utils/api";
|
|
import { ShowTraefikFile } from "./show-traefik-file";
|
|
|
|
interface Props {
|
|
serverId?: string;
|
|
}
|
|
export const ShowTraefikSystem = ({ serverId }: Props) => {
|
|
const [file, setFile] = React.useState<null | string>(null);
|
|
|
|
const {
|
|
data: directories,
|
|
isLoading,
|
|
error,
|
|
isError,
|
|
} = api.settings.readDirectories.useQuery(
|
|
{
|
|
serverId,
|
|
},
|
|
{
|
|
retry: 2,
|
|
},
|
|
);
|
|
|
|
return (
|
|
<div className="w-full">
|
|
<Card className="h-full bg-sidebar p-2.5 rounded-xl">
|
|
<div className="rounded-xl bg-background shadow-md ">
|
|
<CardHeader className="">
|
|
<CardTitle className="text-xl flex flex-row gap-2">
|
|
<FileIcon className="size-6 text-muted-foreground self-center" />
|
|
Traefik File System
|
|
</CardTitle>
|
|
<CardDescription>
|
|
Manage all the files and directories in {"'/etc/dokploy/traefik'"}
|
|
.
|
|
</CardDescription>
|
|
|
|
<AlertBlock type="warning">
|
|
Adding invalid configuration to existing files, can break your
|
|
Traefik instance, preventing access to your applications.
|
|
</AlertBlock>
|
|
</CardHeader>
|
|
<CardContent className="space-y-2 py-8 border-t">
|
|
<div>
|
|
<div className="flex flex-col lg:flex-row gap-4 md:gap-10 w-full">
|
|
{isError && (
|
|
<AlertBlock type="error" className="w-full">
|
|
{error?.message}
|
|
</AlertBlock>
|
|
)}
|
|
{isLoading && (
|
|
<div className="w-full flex-col gap-2 flex items-center justify-center h-[55vh]">
|
|
<span className="text-muted-foreground text-lg font-medium">
|
|
Loading...
|
|
</span>
|
|
<Loader2 className="animate-spin size-8 text-muted-foreground" />
|
|
</div>
|
|
)}
|
|
{directories?.length === 0 && (
|
|
<div className="w-full flex-col gap-4 flex items-center justify-center h-[55vh] border border-dashed rounded-lg">
|
|
<div className="flex items-center justify-center size-14 rounded-full bg-muted">
|
|
<FolderOpen className="size-7 text-muted-foreground" />
|
|
</div>
|
|
<div className="flex flex-col items-center gap-1 text-center px-4">
|
|
<span className="text-base font-medium">
|
|
No configuration files found
|
|
</span>
|
|
<span className="text-sm text-muted-foreground">
|
|
There are no directories or files in{" "}
|
|
<code className="bg-muted px-1.5 py-0.5 rounded text-xs">
|
|
/etc/dokploy/traefik
|
|
</code>{" "}
|
|
on this server yet.
|
|
</span>
|
|
</div>
|
|
</div>
|
|
)}
|
|
{directories && directories?.length > 0 && (
|
|
<>
|
|
<Tree
|
|
data={directories}
|
|
className="lg:max-w-76 w-full lg:h-[660px] border rounded-lg"
|
|
onSelectChange={(item) => setFile(item?.id || null)}
|
|
folderIcon={Folder}
|
|
itemIcon={Workflow}
|
|
/>
|
|
<div className="w-full">
|
|
{file ? (
|
|
<ShowTraefikFile path={file} serverId={serverId} />
|
|
) : (
|
|
<div className="h-full min-h-[300px] w-full flex-col gap-4 flex items-center justify-center border border-dashed rounded-lg">
|
|
<div className="flex items-center justify-center size-14 rounded-full bg-muted">
|
|
<MousePointerClick className="size-7 text-muted-foreground" />
|
|
</div>
|
|
<div className="flex flex-col items-center gap-1 text-center px-4">
|
|
<span className="text-base font-medium">
|
|
Select a file to edit
|
|
</span>
|
|
<span className="text-sm text-muted-foreground">
|
|
Choose a file from the tree on the left to view
|
|
and edit its contents.
|
|
</span>
|
|
</div>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</>
|
|
)}
|
|
</div>
|
|
</div>
|
|
</CardContent>
|
|
</div>
|
|
</Card>
|
|
</div>
|
|
);
|
|
};
|