全项目扫描修复: Docker数据卷修复+安全requireAdmin+12页SEO+API白名单+脚本超时+常量提取+假数据删除

This commit is contained in:
ZhuiGuangAI Dev
2026-06-12 17:27:47 +08:00
parent 464924aea0
commit 4c325c8699
454 changed files with 33647 additions and 980 deletions
+3 -16
View File
@@ -5,6 +5,7 @@ import { useRouter, useSearchParams } from "next/navigation";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { FavoriteButton } from "@/components/common/FavoriteButton";
import { PRICING_LABEL, PRICING_COLOR } from "@/lib/constants";
interface Category {
id: number;
@@ -26,20 +27,6 @@ interface Tool {
category: { id: number; name: string; slug: string } | null;
}
const pricingLabel: Record<string, string> = {
free: "免费",
freemium: "免费增值",
paid: "付费",
subscription: "订阅",
};
const pricingColor: Record<string, string> = {
free: "bg-emerald-500/15 text-emerald-400 border-emerald-500/20",
freemium: "bg-blue-500/15 text-blue-400 border-blue-500/20",
paid: "bg-amber-500/15 text-amber-400 border-amber-500/20",
subscription: "bg-purple-500/15 text-purple-400 border-purple-500/20",
};
const pricingDot: Record<string, string> = {
free: "bg-emerald-400",
freemium: "bg-blue-400",
@@ -423,8 +410,8 @@ export default function ToolsContent({ initialCategories, initialTools, initialT
<div className="min-w-0 flex-1">
<p className="truncate font-semibold text-foreground group-hover:text-primary transition-colors duration-200">{tool.name}</p>
<div className="mt-1 flex items-center gap-2">
<span className={`inline-flex rounded-md border px-1.5 py-0.5 text-[10px] font-medium ${pricingColor[tool.pricingModel] || "bg-secondary text-muted-foreground border-border"}`}>
{pricingLabel[tool.pricingModel] || tool.pricingModel}
<span className={`inline-flex rounded-md border px-1.5 py-0.5 text-[10px] font-medium ${PRICING_COLOR[tool.pricingModel] || "bg-secondary text-muted-foreground border-border"}`}>
{PRICING_LABEL[tool.pricingModel] || tool.pricingModel}
</span>
{tool.category && (
<span className="text-[10px] text-muted-foreground/60">