diff --git a/frontend/next.config.js b/frontend/next.config.js index 17b0e72..3ff5566 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -19,18 +19,20 @@ const nextConfig = { async redirects() { return []; }, - // async rewrites() { - // return [ - // { - // source: "/api/:path*", - // destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/api/:path*`, - // }, - // { - // source: "/uploads/:path*", - // destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/uploads/:path*`, - // }, - // ]; - // }, + async rewrites() { + return [ + // { + // source: "/api/:path*", + // destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/api/:path*`, + // }, + { + source: "/uploads/:path*", + destination: `${ + process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001" + }/uploads/:path*`, + }, + ]; + }, // Headers for better performance async headers() { diff --git a/frontend/public/locales/en/translation.json b/frontend/public/locales/en/translation.json index 55c4781..1f8d294 100644 --- a/frontend/public/locales/en/translation.json +++ b/frontend/public/locales/en/translation.json @@ -874,5 +874,7 @@ "or create your account": "or create your account", "No account? Just continue—we’ll set you up.": "No account? Just continue—we’ll set you up.", "Password must be at least 6 characters": "Password must be at least 6 characters", - "Email is required": "Email is required" + "Email is required": "Email is required", + "No servers available": "No servers available", + "(Deleted)": "(Deleted)" } diff --git a/frontend/public/locales/zh-CN/translation.json b/frontend/public/locales/zh-CN/translation.json index 5d7f646..e3abc59 100644 --- a/frontend/public/locales/zh-CN/translation.json +++ b/frontend/public/locales/zh-CN/translation.json @@ -876,5 +876,7 @@ "or create your account": "或创建您的账户", "No account? Just continue—we’ll set you up.": "没有账户?继续即可,我们会为您设置。", "Password must be at least 6 characters": "密码必须至少6个字符", - "Email is required": "邮箱为必填项" + "Email is required": "邮箱为必填项", + "No servers available": "没有可用服务", + "(Deleted)": "(已删除)" } diff --git a/frontend/src/api/adminAnalytics.api.ts b/frontend/src/api/adminAnalytics.api.ts index ebeca65..c1a926b 100644 --- a/frontend/src/api/adminAnalytics.api.ts +++ b/frontend/src/api/adminAnalytics.api.ts @@ -44,6 +44,7 @@ export interface TopServiceItem { name: string; // server name short_description: string; // short description call_count: number; // call count + is_deleted: boolean; //It means the server was deleted. } // admin analytics data diff --git a/frontend/src/components/console/ConsoleStats.tsx b/frontend/src/components/console/ConsoleStats.tsx index 911cd56..7464c48 100644 --- a/frontend/src/components/console/ConsoleStats.tsx +++ b/frontend/src/components/console/ConsoleStats.tsx @@ -282,10 +282,14 @@ const ConsoleStats: React.FC = () => { {index + 1}
- - {" "} - {service.name} - +
+ + {service.is_deleted ? t("(Deleted)") : ""} + + + {service.name} + +
{service.short_description} diff --git a/frontend/src/components/mcp-services/ServiceEditPage.tsx b/frontend/src/components/mcp-services/ServiceEditPage.tsx index 4ef8a7c..7d0cdab 100644 --- a/frontend/src/components/mcp-services/ServiceEditPage.tsx +++ b/frontend/src/components/mcp-services/ServiceEditPage.tsx @@ -197,7 +197,8 @@ const BaseServiceEditPage: React.FC = ({ const hasBasicInfo = formData.name.trim() && formData.short_description?.trim() && - formData.slug_name?.trim(); + formData.slug_name?.trim() && + formData.base_url?.trim(); // if free, no need to validate price if (formData.charge_type === ChargeType.Free) {