mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-15 13:21:11 +00:00
3ca5afd49f
* 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>
96 lines
2.9 KiB
TypeScript
96 lines
2.9 KiB
TypeScript
import {
|
|
Body,
|
|
Container,
|
|
Head,
|
|
Heading,
|
|
Html,
|
|
Img,
|
|
Preview,
|
|
Section,
|
|
Tailwind,
|
|
Text,
|
|
} from "@react-email/components";
|
|
import { emailTailwindConfig } from "../tailwind-config";
|
|
|
|
export type TemplateProps = {
|
|
projectName: string;
|
|
applicationName: string;
|
|
databaseType: "postgres" | "mysql" | "mongodb" | "mariadb" | "libsql";
|
|
type: "error" | "success";
|
|
errorMessage?: string;
|
|
date: string;
|
|
};
|
|
|
|
export const DatabaseBackupEmail = ({
|
|
projectName = "dokploy",
|
|
applicationName = "frontend",
|
|
databaseType = "postgres",
|
|
type = "success",
|
|
errorMessage,
|
|
date = "2023-05-01T00:00:00.000Z",
|
|
}: TemplateProps) => {
|
|
const previewText = `Database backup for ${applicationName} was ${type === "success" ? "successful ✅" : "failed ❌"}`;
|
|
return (
|
|
<Html>
|
|
<Preview>{previewText}</Preview>
|
|
<Tailwind config={emailTailwindConfig}>
|
|
<Head />
|
|
|
|
<Body className="bg-white my-auto mx-auto font-sans px-2">
|
|
<Container className="border border-solid border-[#eaeaea] rounded-lg my-[40px] mx-auto p-[20px] max-w-[465px]">
|
|
<Section className="mt-[32px]">
|
|
<Img
|
|
src={
|
|
"https://raw.githubusercontent.com/Dokploy/dokploy/refs/heads/canary/apps/dokploy/logo.png"
|
|
}
|
|
width="100"
|
|
height="50"
|
|
alt="Dokploy"
|
|
className="my-0 mx-auto"
|
|
/>
|
|
</Section>
|
|
<Heading className="text-black text-[24px] font-normal text-center p-0 my-[30px] mx-0">
|
|
Database backup for <strong>{applicationName}</strong>
|
|
</Heading>
|
|
<Text className="text-black text-[14px] leading-[24px]">
|
|
Hello,
|
|
</Text>
|
|
<Text className="text-black text-[14px] leading-[24px]">
|
|
Your database backup for <strong>{applicationName}</strong> was{" "}
|
|
{type === "success"
|
|
? "successful ✅"
|
|
: "failed Please check the error message below. ❌"}
|
|
.
|
|
</Text>
|
|
<Section className="flex text-black text-[14px] leading-[24px] bg-[#F4F4F5] rounded-lg p-2">
|
|
<Text className="!leading-3 font-bold">Details: </Text>
|
|
<Text className="!leading-3">
|
|
Project Name: <strong>{projectName}</strong>
|
|
</Text>
|
|
<Text className="!leading-3">
|
|
Application Name: <strong>{applicationName}</strong>
|
|
</Text>
|
|
<Text className="!leading-3">
|
|
Database Type: <strong>{databaseType}</strong>
|
|
</Text>
|
|
<Text className="!leading-3">
|
|
Date: <strong>{date}</strong>
|
|
</Text>
|
|
</Section>
|
|
{type === "error" && errorMessage ? (
|
|
<Section className="flex text-black text-[14px] mt-4 leading-[24px] bg-[#F4F4F5] rounded-lg p-2">
|
|
<Text className="!leading-3 font-bold">Reason: </Text>
|
|
<Text className="text-[12px] leading-[24px]">
|
|
{errorMessage || "Error message not provided"}
|
|
</Text>
|
|
</Section>
|
|
) : null}
|
|
</Container>
|
|
</Body>
|
|
</Tailwind>
|
|
</Html>
|
|
);
|
|
};
|
|
|
|
export default DatabaseBackupEmail;
|