feat(s3): add custom provider section

This commit is contained in:
oiov
2025-07-20 19:53:38 +08:00
parent 0a128254d3
commit 877e826d23
4 changed files with 11 additions and 6 deletions

View File

@@ -5,8 +5,8 @@ export default function DashboardRecordsLoading() {
return (
<>
<DashboardHeader
heading="Manage DNS Records"
text="List and manage records"
heading="Cloud Storage"
text="List and manage cloud storage"
/>
<Skeleton className="h-[58px] w-full rounded-lg" />
<Skeleton className="h-[400px] w-full rounded-lg" />

View File

@@ -3,7 +3,6 @@
import { useEffect, useMemo, useState, useTransition } from "react";
import Link from "next/link";
import { motion } from "framer-motion";
import { CloudCog } from "lucide-react";
import { useTranslations } from "next-intl";
import { toast } from "sonner";
import useSWR from "swr";
@@ -63,7 +62,12 @@ export default function S3Configs({}: {}) {
channel: "cos",
},
{ label: "Ali OSS", value: "Ali OSS", platform: "ali", channel: "oss" },
{ label: "Minio", value: "Minio", platform: "minio", channel: "s3" },
{
label: "Custom Provider",
value: "Custom Provider",
platform: "custom",
channel: "cp",
},
];
useEffect(() => {

View File

@@ -5,8 +5,8 @@ export default function DashboardRecordsLoading() {
return (
<>
<DashboardHeader
heading="Manage DNS Records"
text="List and manage records"
heading="Cloud Storage"
text="List and manage cloud storage"
/>
<Skeleton className="h-[58px] w-full rounded-lg" />
<Skeleton className="h-[400px] w-full rounded-lg" />

View File

@@ -162,6 +162,7 @@ export async function DELETE(request: NextRequest) {
await softDeleteUserFiles(ids);
return NextResponse.json({ message: "File deleted successfully" });
} catch (error) {
console.error("Error deleting file:", error);
return NextResponse.json("Error deleting file", { status: 500 });
}
}