Skip to content

Commit 7f69eed

Browse files
葛锐葛锐
authored andcommitted
feat:适配英文版
1 parent 7d36c09 commit 7f69eed

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

frontend/app/[locale]/market/MarketContent.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,10 @@ export default function MarketContent({
429429
{/* Featured row per category (show only if there are featured items) */}
430430
{featuredItems.length > 0 && (
431431
<div className="mb-6 featured-area">
432-
<div className="flex items-center justify-between mb-4">
433-
<h2 className="text-2xl font-bold">{t("market.featuredTitle", "精选智能体")}</h2>
432+
<div className="flex items-center justify-between mb-5">
433+
<h2 className="text-2xl font-bold">
434+
{isZh ? t("market.featuredTitle", "精选智能体") : "Featured Agents"}
435+
</h2>
434436
<div className="hidden md:flex items-center gap-2">
435437
<button
436438
aria-label="Prev featured"
@@ -463,7 +465,7 @@ export default function MarketContent({
463465
<div
464466
id="featured-row"
465467
ref={featuredRowRef}
466-
className="flex gap-4 overflow-x-auto no-scrollbar pb-2"
468+
className="flex gap-4 overflow-x-auto no-scrollbar pt-2 pb-2"
467469
>
468470
{featuredItems.map((agent, index) => (
469471
<div
@@ -483,9 +485,16 @@ export default function MarketContent({
483485
</div>
484486
)}
485487

488+
{/* Separator between featured and main list (only when both exist) */}
489+
{featuredItems.length > 0 && agents.length > 0 && (
490+
<div className="mt-4 mb-8">
491+
<div className="w-full h-[0.5px] bg-slate-200 dark:bg-slate-700 rounded" />
492+
</div>
493+
)}
494+
486495
{agents.length > 0 && (
487496
<>
488-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 pb-8">
497+
<div className="mt-6 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 pb-8">
489498
{agents.map((agent, index) => (
490499
<motion.div
491500
key={agent.id}

frontend/app/[locale]/market/components/AgentMarketCard.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,19 @@ export function AgentMarketCard({
4343
: "📦";
4444

4545
const baseClasses =
46-
"group h-full min-h-[320px] rounded-lg border transition-all duration-300 overflow-hidden flex flex-col cursor-pointer relative";
46+
"group z-10 hover:z-0 h-full min-h-[320px] rounded-lg border transition-all duration-300 overflow-visible flex flex-col cursor-pointer relative";
4747
const defaultClasses =
4848
"bg-white dark:bg-slate-800 border-slate-200 dark:border-slate-700 hover:border-purple-300 dark:hover:border-purple-600 hover:shadow-lg";
4949
const featuredClasses =
50-
"border-slate-200 dark:border-slate-700 text-slate-900 dark:text-white";
50+
"bg-white dark:bg-slate-800 border-slate-200 dark:border-slate-700 text-slate-900 dark:text-white hover:border-purple-300 dark:hover:border-purple-600 hover:shadow-lg";
51+
52+
const unifiedHoverShadow =
53+
"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05)";
5154

5255
return (
5356
<motion.div
54-
whileHover={{ y: -4 }}
57+
whileHover={{ y: -4, boxShadow: unifiedHoverShadow }}
58+
transition={{ type: "spring", stiffness: 300, damping: 25 }}
5559
onClick={handleCardClick}
5660
className={`${baseClasses} ${variant === "featured" ? featuredClasses : defaultClasses}`}
5761
>
@@ -142,7 +146,7 @@ export function AgentMarketCard({
142146
<div className="absolute left-0 right-0 bottom-0 px-4 py-3 border-t border-slate-100 dark:border-slate-700 bg-transparent z-10">
143147
<button
144148
onClick={handleDownload}
145-
className="w-full px-4 py-2 rounded-md bg-gradient-to-r from-purple-500 to-indigo-500 hover:from-purple-600 hover:to-indigo-600 text-white text-sm font-medium transition-all duration-300 flex items-center justify-center gap-2 group-hover:shadow-md z-10"
149+
className="w-full px-4 py-2 rounded-md bg-gradient-to-r from-purple-500 to-indigo-500 hover:from-purple-600 hover:to-indigo-600 text-white text-sm font-medium transition-all duration-300 flex items-center justify-center gap-2"
146150
>
147151
<Download className="h-4 w-4" />
148152
{t("market.download", "Download")}

frontend/styles/globals.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@
209209
}
210210
}
211211

212+
/* Reserve space at bottom of featured area so separator spacing stays consistent
213+
whether native scrollbar is visible or not. Matches typical scrollbar height. */
214+
.featured-area {
215+
padding-bottom: 0px;
216+
}
217+
212218
/* Tool Pool Tabs scroll fix */
213219
.tool-pool-tabs .ant-tabs-content-holder {
214220
overflow: hidden;

0 commit comments

Comments
 (0)