feat:1.1 UI/UX

This commit is contained in:
riverLethe committed 2025-10-16 17:35:45 +08:00
1 parent 3c9b037ba7
commit 521c1b7a07
163 files changed
+8325 -2918

No files matched your search

@@ -11,20 +11,14 @@ import { Navigation } from "@/shared/components/Navigation";
import { Footer } from "@/shared/components/Footer";
import { NavigationItems } from "@/components/theme/Theme.const";
import { AboutContent } from "@/components/about/AboutContent";
import { useNavigationItems } from "@/shared/providers/ConfigProvider";
export const AboutThemeSelector: React.FC = () => {
const { platformConfig, topNavigation } = usePlatformConfig();
const currentTheme = platformConfig.theme || Theme.DEFAULT;
const configNavigation = useNavigationItems() || NavigationItems;
const navigationItems = [
...NavigationItems,
...(platformConfig.about_page
? [
{
label: "About",
href: "/about",
},
]
: []),
...configNavigation,
...topNavigation.map((item) => ({
label: item.title,
href: item.link,
@@ -15,6 +15,9 @@ import { NavigationItems } from "./Theme.const";
import { copyToClipboard } from "@/shared/utils/clipboard";
import toast from "react-hot-toast";
import { useTranslation } from "react-i18next";
import { sanitizeMCPServerName } from "@/shared/utils/mcp";
import { useNavigationItems } from "@/shared/providers/ConfigProvider";
import { withComponentInjection } from "@/shared/hooks/useComponentInjection";
interface ProductDetailThemeSelectorProps {
product: ServiceData;
@@ -24,7 +27,7 @@ interface ProductDetailThemeSelectorProps {
}[];
}
export const ProductDetailThemeSelector: React.FC<
const BasicProductDetailThemeSelector: React.FC<
ProductDetailThemeSelectorProps
> = ({ product, breadcrumbs }) => {
const { platformConfig, topNavigation } = usePlatformConfig();
@@ -34,16 +37,10 @@ export const ProductDetailThemeSelector: React.FC<
const [url, setUrl] = useState<string>("");
const [mcpName, setMcpName] = useState<string>("");
const { t } = useTranslation();
const configNavigation = useNavigationItems() || NavigationItems;
const navigationItems = [
...NavigationItems,
...(platformConfig.about_page
? [
{
label: "About",
href: "/about",
},
]
: []),
...configNavigation,
...topNavigation.map((item) => ({
label: item.title,
href: item.link,
@@ -53,29 +50,9 @@ export const ProductDetailThemeSelector: React.FC<
useEffect(() => {
if (url || !product.slug_name) return;
setUrl(
`${
mcpServerPrefix ||
`${window.location.protocol}//${window.location.hostname}:8002`
}/mcp/${product.slug_name}`
`${mcpServerPrefix || window.location.origin}/mcp/${product.slug_name}`
);
}, [product.slug_name]);
function sanitizeMCPServerName(rawName: string | undefined): string {
if (!rawName) return "xpack-mcp-service";
// Lower-case & replace invalid chars with hyphen
let name = rawName
.trim()
.toLowerCase()
.replace(/[^a-z0-9-_]+/g, "-");
// Collapse multiple hyphens
name = name.replace(/-+/g, "-");
// Trim leading/trailing hyphens
name = name.replace(/^-+/, "").replace(/-+$/, "");
return name || "mcp-service";
}
useEffect(() => {
setMcpName(sanitizeMCPServerName(product.name));
}, [product.name]);
@@ -85,7 +62,7 @@ export const ProductDetailThemeSelector: React.FC<
"${mcpName || "xpack-mcp-market"}": {
"type": "sse",
"autoApprove":"all",
"url": "${url}?apikey={Your-${platformConfig?.name}-API-Key}"
"url": "${url}?authkey={Your-${platformConfig?.name}-Auth-Key}"
}
}
}`;
@@ -165,3 +142,7 @@ export const ProductDetailThemeSelector: React.FC<
);
}
};
export const ProductDetailThemeSelector = withComponentInjection(
"components/theme/ProductDetailThemeSelector",
BasicProductDetailThemeSelector
);
+1 -6
View File
@@ -1,8 +1,3 @@
import { NavigationItem } from "@/shared/components/Navigation";
export const NavigationItems: NavigationItem[] = [
{
label: "Home",
href: "/",
},
];
export const NavigationItems: NavigationItem[] = [];
@@ -15,6 +15,7 @@ import { MarketplaceMain } from "../marketplace/Main";
import { Footer } from "@/shared/components/Footer";
import { NavigationItems } from "./Theme.const";
import { Faq } from "../marketplace/Faq";
import { useNavigationItems } from "@/shared/providers/ConfigProvider";
interface ThemeSelectorProps {
initialServices: ServiceData[];
@@ -36,16 +37,9 @@ export const ThemeSelector: React.FC<ThemeSelectorProps> = ({
const router = useRouter();
const { platformConfig, topNavigation } = usePlatformConfig();
const currentTheme = platformConfig.theme || Theme.DEFAULT;
const configNavigation = useNavigationItems() || NavigationItems;
const navigationItems = [
...NavigationItems,
...(platformConfig.about_page
? [
{
label: "About",
href: "/about",
},
]
: []),
...configNavigation,
...topNavigation.map((item) => ({
label: item.title,
href: item.link,
@@ -61,7 +55,7 @@ export const ThemeSelector: React.FC<ThemeSelectorProps> = ({
const [loading, setLoading] = useState(false);
// search suggestion
const searchSuggestions = ["Search services..."];
const searchSuggestions = ["Search MCP servers"];
// loading service data
const loadServices = async (page: number, search: string) => {
@@ -77,7 +71,7 @@ export const ThemeSelector: React.FC<ThemeSelectorProps> = ({
setTotal(result.page.total);
setCurrentPage(page);
} catch (error) {
console.error("Failed to load services:", error);
console.error("Failed to load servers:", error);
} finally {
setLoading(false);
}
@@ -22,7 +22,7 @@ const ClassicDemo: React.FC = () => {
<div className="bg-gray-100 border-b border-gray-300 px-4 py-1">
<div className="flex space-x-4">
<div className="text-xs text-gray-700 font-medium">Home</div>
<div className="text-xs text-gray-500">Services</div>
<div className="text-xs text-gray-500">Servers</div>
<div className="text-xs text-gray-500">About</div>
</div>
</div>
@@ -47,13 +47,13 @@ const ClassicDemo: React.FC = () => {
{/* Content Section */}
<div className="px-4 py-4 bg-gray-50">
<div className="grid grid-cols-1 gap-3">
{/* Service Item */}
{/* Server Item */}
<div className="bg-white border border-gray-200 rounded-sm p-3 shadow-sm">
<div className="flex items-start space-x-3">
<div className="w-4 h-4 bg-slate-600 rounded-sm mt-0.5"></div>
<div className="flex-1">
<div className="text-xs font-semibold text-slate-800 mb-1">
Business Service
Business Server
</div>
<div className="text-xs text-gray-600">
Professional solutions for enterprise
@@ -62,7 +62,7 @@ const ClassicDemo: React.FC = () => {
</div>
</div>
{/* Service Item */}
{/* Server Item */}
<div className="bg-white border border-gray-200 rounded-sm p-3 shadow-sm">
<div className="flex items-start space-x-3">
<div className="w-4 h-4 bg-red-600 rounded-sm mt-0.5"></div>
@@ -25,6 +25,7 @@ interface DetailProps {
// navigation items
navItems?: NavigationItem[];
onCopy: () => void;
innerHeaderNode?: React.ReactNode;
}
export const Detail: React.FC<DetailProps> = ({
@@ -33,6 +34,7 @@ export const Detail: React.FC<DetailProps> = ({
mcpName,
navItems = [],
onCopy,
innerHeaderNode,
}) => {
const { t } = useTranslation();
const [activeTab, setActiveTab] = useState("overview");
@@ -47,8 +49,8 @@ export const Detail: React.FC<DetailProps> = ({
<Navigation items={navItems} />
<div>
{/* Classic Product Header */}
<div className="bg-white border-b border-gray-200 shadow-sm pt-28 pb-6">
<div className="mx-auto p-6 max-w-7xl">
<div className="bg-white border-b border-gray-200 shadow-sm pt-20 pb-6">
<div className="mx-auto p-6 max-w-7xl relative">
<div className="bg-gray-50 rounded-sm p-6 border border-gray-200">
<Card shadow="none" className="bg-gray-50">
<CardBody>
@@ -107,6 +109,7 @@ export const Detail: React.FC<DetailProps> = ({
</CardBody>
</Card>
</div>
{innerHeaderNode}
</div>
</div>
@@ -185,7 +188,7 @@ export const Detail: React.FC<DetailProps> = ({
<Card>
<CardBody>
<p className="text-center">
{t("No tools available in this service.")}
{t("No tools available in this server.")}
</p>
</CardBody>
</Card>
@@ -235,8 +238,8 @@ export const Detail: React.FC<DetailProps> = ({
"${mcpName}": {
"type": "sse",
"autoApprove":"all",
"url": "${url}?apikey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-API-Key}`}</span>
"url": "${url}?authkey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-Auth-Key}`}</span>
{`"
}
}
+8 -21
View File
@@ -54,7 +54,6 @@ export const Home: React.FC<HomeProps> = ({
total,
pageSize,
loading,
error,
onSearchChange,
onSearch,
onPageChange,
@@ -65,19 +64,6 @@ export const Home: React.FC<HomeProps> = ({
const { t } = useTranslation();
const totalPages = Math.ceil(total / pageSize);
// 如果有错误,显示错误信息
if (error) {
return (
<div className="min-h-screen bg-gray-50">
<div className="mx-auto h-[100px] flex items-center justify-center">
<div className="text-red-600 bg-white px-6 py-4 rounded-lg shadow-md border border-red-200">
Error: {error}
</div>
</div>
</div>
);
}
return (
<div className="min-h-screen bg-gray-50 top-0 left-0 right-0 bottom-0 flex flex-col justify-between">
<Navigation items={navItems} />
@@ -97,6 +83,7 @@ export const Home: React.FC<HomeProps> = ({
<h1 className="text-4xl lg:text-5xl font-bold mb-6 text-slate-800">
{t(
platformConfig.headline ||
platformConfig.name ||
_DefaultPlatformConfig.headline ||
""
)}
@@ -122,7 +109,7 @@ export const Home: React.FC<HomeProps> = ({
placeholder={
searchSuggestions.length > 0
? t(searchSuggestions[0])
: t("Search services...")
: t("Search MCP servers")
}
value={searchQuery}
onChange={(e) => onSearchChange(e.target.value)}
@@ -153,7 +140,7 @@ export const Home: React.FC<HomeProps> = ({
</div>
</div>
{/* Service List Section */}
{/* Server List Section */}
{loading ? (
<div className="mx-auto h-[200px] flex items-center justify-center">
<div className="bg-white p-8 rounded-lg shadow-md">
@@ -163,24 +150,24 @@ export const Home: React.FC<HomeProps> = ({
) : (
<div className="bg-gray-50 py-16">
<div className="mx-auto px-6 max-w-7xl">
{/* Services Grid */}
{/* Server Grid */}
<div className="flex flex-wrap justify-center gap-4 mb-12">
{services.map((service) => (
<Link
key={service.service_id}
href={`/marketplace/${service.service_id}`}
className="w-full md:w-[calc(50%-16px)] lg:w-[calc(33%-16px)] xl:w-[calc(25%-16px)]"
href={`/server/${service.service_id}`}
className="block group w-full md:w-[calc(50%-16px)] lg:w-[calc(33%-16px)] xl:w-[calc(25%-16px)]"
>
<Card className="group h-[200px] w-full hover:shadow-lg transition-shadow duration-200 cursor-pointer border border-gray-200 bg-white rounded-sm shadow-sm">
<CardBody className="p-4">
{/* Header */}
<div className="flex items-start justify-between mb-3">
<div className="flex items-center gap-2">
<div className="flex items-center gap-2 w-full">
<div className="w-8 h-8 bg-slate-600 rounded-sm flex items-center justify-center">
<Star className="w-4 h-4 text-white" />
</div>
<div className="flex-1 min-w-0">
<h3 className="font-semibold text-gray-900 text-base mb-1 truncate group-hover:text-slate-700 transition-colors">
<h3 className="font-semibold text-gray-900 text-base mb-1 truncate group-hover:text-slate-700 transition-colors truncate">
{service.name}
</h3>
</div>
@@ -6,8 +6,8 @@ import { useTranslation } from "react-i18next";
import { DynamicLogo } from "@/shared/components/DynamicLogo";
import { useAuth } from "@/shared/lib/useAuth";
import Link from "next/link";
import { NavigationItem } from "@/shared/components/Navigation";
import Link from "next/link";
interface NavigationProps {
items?: NavigationItem[];
@@ -23,9 +23,17 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
<div className="bg-slate-800 text-white px-4 py-2 ">
<div className="flex items-center justify-between max-w-7xl mx-auto">
<div className="flex items-center space-x-2">
<DynamicLogo alt="Platform Logo" className="h-[20px] text-white" />
<DynamicLogo alt="Platform Logo" className="h-[32px] text-white" />
</div>
<div className="flex space-x-2">
<Button
onPress={handleLogin}
variant="light"
className="hidden sm:block text-white text-sm px-4 py-1 rounded-sm font-medium"
size="sm"
>
<b className="text-md"> {t("Sign In")}</b>
</Button>
<Button
color="primary"
className="bg-red-600 hover:bg-red-700 text-white text-sm px-4 py-1 rounded-sm font-medium"
@@ -42,7 +50,14 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
<div className="bg-gray-100 border-b border-gray-300 px-4 py-2">
<div className="flex items-center justify-between max-w-7xl mx-auto">
<div className="flex space-x-6">
{items?.map((item) => (
{(
items || [
{
label: "Home",
href: "/",
},
]
)?.map((item) => (
<Link
key={item.href}
href={item.href}
@@ -24,6 +24,7 @@ interface DetailProps {
// navigation items
navItems?: NavigationItem[];
onCopy: () => void;
innerHeaderNode?: React.ReactNode;
}
export const Detail: React.FC<DetailProps> = ({
@@ -33,6 +34,7 @@ export const Detail: React.FC<DetailProps> = ({
mcpName,
navItems = [],
onCopy,
innerHeaderNode,
}) => {
const { t } = useTranslation();
const [activeTab, setActiveTab] = useState("overview");
@@ -63,8 +65,9 @@ export const Detail: React.FC<DetailProps> = ({
{/* Creative Product Header */}
<div className="pt-24">
<div className="mx-auto p-6 max-w-7xl">
<div className="bg-white/90 backdrop-blur-sm rounded-2xl p-6 shadow-lg border border-pink-200/50">
<div className="bg-white/90 backdrop-blur-sm rounded-2xl p-6 shadow-lg border border-pink-200/50 relative">
<ProductHeader product={product} breadcrumbs={breadcrumbs} />
{innerHeaderNode}
</div>
</div>
</div>
@@ -121,7 +124,7 @@ export const Detail: React.FC<DetailProps> = ({
</div>
}
>
<div className="p-6 pt-4">
<div className="p-6 pt-4 space-y-4">
{product.tools.length > 0 ? (
product.tools.map((tool, index) => (
<Card
@@ -145,7 +148,7 @@ export const Detail: React.FC<DetailProps> = ({
<Card>
<CardBody>
<p className="text-center">
{t("No tools available in this service.")}
{t("No tools available in this server.")}
</p>
</CardBody>
</Card>
@@ -195,8 +198,8 @@ export const Detail: React.FC<DetailProps> = ({
"${mcpName}": {
"type": "sse",
"autoApprove":"all",
"url": "${url}?apikey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-API-Key}`}</span>
"url": "${url}?authkey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-Auth-Key}`}</span>
{`"
}
}
@@ -102,6 +102,7 @@ export const Home: React.FC<HomeProps> = ({
<span className="bg-clip-text text-transparent bg-gradient-to-r from-pink-600 via-red-500 to-orange-600">
{t(
platformConfig.headline ||
platformConfig.name ||
_DefaultPlatformConfig.headline ||
""
)}
@@ -130,7 +131,7 @@ export const Home: React.FC<HomeProps> = ({
placeholder={
searchSuggestions.length > 0
? t(searchSuggestions[0])
: t("✨ Discover amazing services...")
: t("✨ Discover amazing servers...")
}
value={searchQuery}
onChange={(e) => onSearchChange(e.target.value)}
@@ -165,7 +166,7 @@ export const Home: React.FC<HomeProps> = ({
</div>
</div>
{/* Creative Service List Section */}
{/* Creative Server List Section */}
{loading ? (
<div className="relative z-10 mx-auto h-[200px] flex items-center justify-center">
<div className="bg-white/90 backdrop-blur-xl p-8 rounded-2xl shadow-lg border border-pink-200/50">
@@ -177,7 +178,7 @@ export const Home: React.FC<HomeProps> = ({
) : (
<div className="relative z-10">
<div className="relative mx-auto px-6 py-16 max-w-8xl">
{/* Creative Services Grid */}
{/* Creative Server Grid */}
<div className="flex flex-wrap justify-center gap-4 mb-12">
{services.map((service, index) => {
const gradientBorders = [
@@ -208,7 +209,7 @@ export const Home: React.FC<HomeProps> = ({
return (
<Link
key={service.service_id}
href={`/marketplace/${service.service_id}`}
href={`/server/${service.service_id}`}
className="block group w-full md:w-[calc(50%-16px)] lg:w-[calc(33%-16px)] xl:w-[calc(25%-16px)]"
>
<Card
@@ -237,7 +238,7 @@ export const Home: React.FC<HomeProps> = ({
</div>
{/* service description */}
<div className="text-gray-600 text-sm line-clamp-3 leading-relaxed mb-4">
<div className="text-gray-600 text-sm line-clamp-3 leading-relaxed mb-2">
{service.short_description ||
t("No description available")}
</div>
@@ -47,7 +47,7 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
/>
<div className="flex justify-start bg-transparent w-max">
<Link href="/">
<DynamicLogo alt="Platform Logo" className="h-[20px]" />
<DynamicLogo alt="Platform Logo" className="h-[32px]" />
</Link>
</div>
<div className="hidden lg:flex gap-6 justify-center">
@@ -64,7 +64,10 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
</div>
</NavbarContent>
<NavbarContent justify="end" className="items-center gap-2 sm:gap-4">
<div className="hidden sm:block">
<div className="hidden sm:flex gap-2">
<Button onPress={handleLogin} variant="light">
<b className="text-md"> {t("Sign In")}</b>
</Button>
<Button
color="primary"
className="bg-gradient-to-r from-pink-500 via-red-500 to-orange-500 hover:from-pink-600 hover:via-red-600 hover:to-orange-600 text-white shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-105 flex items-center justify-center gap-4 pr-1 h-[45px]"
+11 -15
View File
@@ -37,7 +37,7 @@ const DefaultDemo: React.FC = () => {
<div className="relative">
<input
type="text"
placeholder="Search services..."
placeholder="Search MCP servers"
className="w-full px-4 py-3 border border-gray-300 rounded-full text-sm focus:outline-none focus:border-blue-500"
/>
<Search className="absolute right-4 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400" />
@@ -45,12 +45,12 @@ const DefaultDemo: React.FC = () => {
</div>
</div>
{/* Services Grid */}
{/* Server Grid */}
<div className="grid grid-cols-4 gap-4 max-w-4xl mx-auto">
{/* Service Card 1 */}
{/* Server Card 1 */}
<div className="bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<h3 className="font-medium text-gray-900 mb-1 text-sm">测试1</h3>
<p className="text-xs text-gray-600 mb-2">xpack-opensource-1</p>
<p className="text-xs text-gray-600 mb-2">XPack-1</p>
<div className="flex items-center justify-between">
<span className="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">
Beta
@@ -59,12 +59,10 @@ const DefaultDemo: React.FC = () => {
</div>
</div>
{/* Service Card 2 */}
{/* Server Card 2 */}
<div className="bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<h3 className="font-medium text-gray-900 mb-1 text-sm">
xpack-opensource
</h3>
<p className="text-xs text-gray-600 mb-2">xpack-opensource-1</p>
<h3 className="font-medium text-gray-900 mb-1 text-sm">XPack</h3>
<p className="text-xs text-gray-600 mb-2">XPack-1</p>
<div className="flex items-center justify-between">
<span className="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">
Beta
@@ -73,12 +71,10 @@ const DefaultDemo: React.FC = () => {
</div>
</div>
{/* Service Card 3 */}
{/* Server Card 3 */}
<div className="bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<h3 className="font-medium text-gray-900 mb-1 text-sm">
xpack-opensource
</h3>
<p className="text-xs text-gray-600 mb-2">xpack-opensource</p>
<h3 className="font-medium text-gray-900 mb-1 text-sm">XPack</h3>
<p className="text-xs text-gray-600 mb-2">XPack</p>
<div className="flex items-center justify-between">
<span className="bg-blue-100 text-blue-800 px-2 py-1 rounded text-xs">
Beta
@@ -87,7 +83,7 @@ const DefaultDemo: React.FC = () => {
</div>
</div>
{/* Service Card 4 */}
{/* Server Card 4 */}
<div className="bg-white border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow">
<h3 className="font-medium text-gray-900 mb-1 text-sm">
Pet Store API
@@ -25,6 +25,7 @@ interface DetailProps {
// navigation items
navItems?: NavigationItem[];
onCopy: () => void;
innerHeaderNode?: React.ReactNode;
}
export const Detail: React.FC<DetailProps> = ({
@@ -34,6 +35,7 @@ export const Detail: React.FC<DetailProps> = ({
mcpName,
navItems = [],
onCopy,
innerHeaderNode,
}) => {
const { t } = useTranslation();
const [activeTab, setActiveTab] = useState("overview");
@@ -60,8 +62,9 @@ export const Detail: React.FC<DetailProps> = ({
{/* Modern Product Header */}
<div className="pt-20">
<div className="mx-auto pt-6 px-6 max-w-7xl">
<div className="bg-white/80 backdrop-blur-sm rounded-2xl p-6 shadow-lg border border-white/20">
<div className="bg-white/80 backdrop-blur-sm rounded-2xl p-6 shadow-lg border border-white/20 relative">
<ProductHeader product={product} breadcrumbs={breadcrumbs} />
{innerHeaderNode}
</div>
</div>
</div>
@@ -162,8 +165,8 @@ export const Detail: React.FC<DetailProps> = ({
"${mcpName}": {
"type": "sse",
"autoApprove":"all",
"url": "${url}?apikey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-API-Key}`}</span>
"url": "${url}?authkey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-Auth-Key}`}</span>
{`"
}
}
@@ -90,7 +90,10 @@ export const Home: React.FC<HomeProps> = ({
{/* Modern Title */}
<h1 className="text-4xl lg:text-6xl font-bold mb-6 text-gray-900 leading-tight">
{t(
platformConfig.headline || _DefaultPlatformConfig.headline || ""
platformConfig.headline ||
platformConfig.name ||
_DefaultPlatformConfig.headline ||
""
)}
</h1>
@@ -114,7 +117,7 @@ export const Home: React.FC<HomeProps> = ({
placeholder={
searchSuggestions.length > 0
? t(searchSuggestions[0])
: t("Search services...")
: t("Search MCP servers")
}
value={searchQuery}
onChange={(e) => onSearchChange(e.target.value)}
@@ -143,7 +146,7 @@ export const Home: React.FC<HomeProps> = ({
</div>
<section>
{/* Service List Section */}
{/* Server List Section */}
{loading ? (
<div className="mx-auto h-[200px] flex items-center justify-center">
<div className="bg-white p-8 rounded-lg shadow-md">
@@ -153,12 +156,12 @@ export const Home: React.FC<HomeProps> = ({
) : (
<div className="py-16">
<div className="mx-auto px-6 max-w-7xl">
{/* Services Grid */}
{/* Server Grid */}
<div className="flex flex-wrap justify-center gap-4 mb-12">
{services.map((service) => (
<Link
key={service.service_id}
href={`/marketplace/${service.service_id}`}
href={`/server/${service.service_id}`}
className="w-full md:w-[calc(50%-16px)] lg:w-[calc(33%-16px)] xl:w-[calc(25%-16px)]"
>
<Card className="group h-[200px] w-full hover:shadow-lg transition-all duration-200 cursor-pointer bg-white border border-gray-100 rounded-xl shadow-sm">
@@ -43,7 +43,7 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
/>
<div className="flex justify-start bg-transparent w-max">
<Link href="/">
<DynamicLogo alt="Platform Logo" className="h-[20px]" />
<DynamicLogo alt="Platform Logo" className="h-[32px]" />
</Link>
</div>
<div className="hidden lg:flex gap-6 justify-center">
@@ -60,7 +60,10 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
</div>
</NavbarContent>
<NavbarContent justify="end" className="items-center gap-2 sm:gap-4">
<div className="hidden sm:block">
<div className="hidden sm:flex gap-2">
<Button onPress={handleLogin} variant="light">
<b className="text-md"> {t("Sign In")}</b>
</Button>
<Button
color="primary"
className="bg-gradient-to-r from-blue-500 to-purple-600 text-white hover:from-blue-600 hover:to-purple-700 flex items-center justify-center gap-4 pr-1 h-[45px] shadow-lg"
+1 -1
View File
@@ -31,7 +31,7 @@ const TemuDemo: React.FC = () => {
{/* Subtitle */}
<p className="text-xs text-white/90 mb-3">
Find the perfect MCP service for your needs
Find the perfect MCP server for your needs
</p>
{/* Search Bar */}
@@ -24,6 +24,7 @@ interface DetailProps {
// navigation items
navItems?: NavigationItem[];
onCopy: () => void;
innerHeaderNode?: React.ReactNode;
}
export const Detail: React.FC<DetailProps> = ({
@@ -33,6 +34,7 @@ export const Detail: React.FC<DetailProps> = ({
mcpName,
navItems = [],
onCopy,
innerHeaderNode,
}) => {
const { t } = useTranslation();
const [activeTab, setActiveTab] = useState("overview");
@@ -47,7 +49,7 @@ export const Detail: React.FC<DetailProps> = ({
<div>
{/* Temu Style Product Header */}
<div className="bg-white border-b border-gray-200 shadow-sm pt-20">
<div className="mx-auto p-6 max-w-7xl">
<div className="mx-auto p-6 max-w-7xl relative">
{/* Breadcrumbs */}
{breadcrumbs && breadcrumbs.length > 0 && (
<nav className="mb-4">
@@ -70,6 +72,7 @@ export const Detail: React.FC<DetailProps> = ({
)}
<ProductHeader product={product} breadcrumbs={breadcrumbs} />
{innerHeaderNode}
</div>
</div>
@@ -139,7 +142,7 @@ export const Detail: React.FC<DetailProps> = ({
<Card>
<CardBody>
<p className="text-center">
{t("No tools available in this service.")}
{t("No tools available in this server.")}
</p>
</CardBody>
</Card>
@@ -182,8 +185,8 @@ export const Detail: React.FC<DetailProps> = ({
"${mcpName}": {
"type": "sse",
"autoApprove":"all",
"url": "${url}?apikey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-API-Key}`}</span>
"url": "${url}?authkey=`}
<span className="text-success">{`{Your-${platformConfig?.name}-Auth-Key}`}</span>
{`"
}
}
@@ -23,7 +23,7 @@ export const Footer: React.FC<FooterProps> = ({}) => {
</h3>
<p className="text-gray-600 text-sm mb-4">
{t(
"A marketplace for AI tools and services. Discover and integrate powerful AI solutions for your projects."
"A marketplace for AI tools and servers. Discover and integrate powerful AI solutions for your projects."
)}
</p>
<div className="flex items-center gap-2 text-orange-500">
+6 -3
View File
@@ -94,7 +94,10 @@ export const Home: React.FC<HomeProps> = ({
{/* Title */}
<h1 className="text-4xl lg:text-6xl font-bold mb-6 text-white">
{t(
platformConfig.headline || _DefaultPlatformConfig.headline || ""
platformConfig.headline ||
platformConfig.name ||
_DefaultPlatformConfig.headline ||
""
)}
</h1>
@@ -111,7 +114,7 @@ export const Home: React.FC<HomeProps> = ({
<div className="max-w-2xl mx-auto mb-8">
<div className="flex gap-3">
<Input
placeholder={t("Search services...")}
placeholder={t("Search MCP servers")}
value={searchQuery}
onChange={(e) => onSearchChange(e.target.value)}
onKeyDown={(e) => e.key === "Enter" && onSearch()}
@@ -167,7 +170,7 @@ export const Home: React.FC<HomeProps> = ({
{services.map((service) => (
<Link
key={service.service_id}
href={`/marketplace/${service.service_id}`}
href={`/server/${service.service_id}`}
>
<Card className="group hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border border-gray-200 hover:border-orange-200 h-[200px]">
<CardBody className="p-0">
@@ -12,10 +12,10 @@ import {
NavbarMenu,
NavbarMenuItem,
} from "@nextui-org/react";
import { ArrowRightIcon, ShoppingCart } from "lucide-react";
import { DynamicLogo } from "@/shared/components/DynamicLogo";
import { useAuth } from "@/shared/lib/useAuth";
import { NavigationItem } from "@/shared/components/Navigation";
import { ArrowRightIcon } from "lucide-react";
interface NavigationProps {
items?: NavigationItem[];
@@ -46,7 +46,7 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
/>
<div className="flex justify-start bg-transparent w-max">
<Link href="/">
<DynamicLogo alt="Platform Logo" className="h-[24px]" />
<DynamicLogo alt="Platform Logo" className="h-[32px]" />
</Link>
</div>
<div className="hidden lg:flex gap-8 justify-center ml-8">
@@ -63,13 +63,16 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
</div>
</NavbarContent>
<NavbarContent justify="end" className="items-center gap-2 sm:gap-4">
<div className="hidden sm:flex items-center gap-3">
<div className="hidden sm:flex items-center gap-2">
<Button onPress={handleLogin} variant="light">
<b className="text-md"> {t("Sign In")}</b>
</Button>
<Button
className="bg-orange-500 hover:bg-orange-600 text-white font-semibold px-6 h-[40px] transition-all duration-200"
radius="md"
onPress={handleLogin}
>
{t("Sign In")}
{t("Get Started")}
</Button>
</div>
<div className="sm:hidden">
@@ -91,14 +94,6 @@ export const Navigation: React.FC<NavigationProps> = ({ items }) => {
Home
</Link>
</NavbarMenuItem>
<NavbarMenuItem className="mb-4">
<Link
href="/marketplace"
className="text-gray-700 hover:text-orange-500 font-medium text-lg"
>
Marketplace
</Link>
</NavbarMenuItem>
<NavbarMenuItem className="mt-6">
<Button
className="w-full bg-orange-500 hover:bg-orange-600 text-white font-semibold h-[45px]"