style: tighten embedded preset cards layout
This commit is contained in:
parent
3e4594273b
commit
de947dd5aa
@ -99,7 +99,7 @@ export function AgentPresetCardDark({
|
||||
whileHover={{ y: -3, scale: 1.01 }}
|
||||
whileTap={{ scale: 0.98 }}
|
||||
className={cn(
|
||||
"group relative cursor-pointer overflow-hidden rounded-2xl border p-3 transition-all duration-300",
|
||||
"group relative cursor-pointer overflow-hidden rounded-2xl border p-2.5 transition-all duration-300",
|
||||
selected
|
||||
? "border-emerald-400/40 bg-emerald-500/[0.08] shadow-[0_0_24px_rgba(16,185,129,0.14)]"
|
||||
: "border-white/10 bg-white/[0.03] hover:border-white/20 hover:bg-white/[0.06]"
|
||||
@ -145,8 +145,8 @@ export function AgentPresetCardDark({
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="relative h-[76px] w-[76px] shrink-0 overflow-hidden rounded-2xl border border-white/10 bg-black/30">
|
||||
<div className="flex items-center gap-2.5">
|
||||
<div className="relative h-[64px] w-[64px] shrink-0 overflow-hidden rounded-[18px] border border-white/10 bg-black/30">
|
||||
{previewUrl ? (
|
||||
<img
|
||||
src={previewUrl}
|
||||
@ -155,26 +155,26 @@ export function AgentPresetCardDark({
|
||||
/>
|
||||
) : (
|
||||
<div className={cn("flex h-full w-full items-center justify-center bg-gradient-to-br", typeInfo.gradient)}>
|
||||
<TypeIcon className="h-7 w-7 text-white" />
|
||||
<TypeIcon className="h-6 w-6 text-white" />
|
||||
</div>
|
||||
)}
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/35 to-transparent" />
|
||||
<div className="absolute left-2 top-2 rounded-full border border-white/10 bg-black/45 px-2 py-0.5 text-[10px] text-white/78">
|
||||
<div className="absolute left-1.5 top-1.5 rounded-full border border-white/10 bg-black/45 px-1.5 py-0.5 text-[9px] text-white/78">
|
||||
{imageModeLabel || typeInfo.label}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="min-w-0 flex-1 pr-8">
|
||||
<div className="line-clamp-2 text-sm font-semibold leading-5 text-white">
|
||||
<div className="min-w-0 flex-1 pr-7">
|
||||
<div className="line-clamp-2 text-[13px] font-semibold leading-5 text-white">
|
||||
{preset.name}
|
||||
</div>
|
||||
<div className="mt-2 flex flex-col gap-1.5 text-[11px] text-white/50">
|
||||
<div className="mt-1.5 flex flex-col gap-1 text-[10px] text-white/50">
|
||||
<div className="flex items-center gap-1.5">
|
||||
<User className="h-3.5 w-3.5 text-white/34" />
|
||||
<User className="h-3 w-3 text-white/34" />
|
||||
<span className="truncate">贡献者:{ownerName}</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<Clock className="h-3.5 w-3.5 text-white/34" />
|
||||
<Clock className="h-3 w-3 text-white/34" />
|
||||
<span className="truncate">贡献时间:{publishedAt || "未记录"}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -338,7 +338,7 @@ export function AgentPresetPanelDarkV2({
|
||||
) : null}
|
||||
|
||||
{/* 卡片网格 */}
|
||||
<div className="grid grid-cols-1 gap-3 xl:grid-cols-2">
|
||||
<div className="grid grid-cols-1 gap-2.5 md:grid-cols-2 lg:grid-cols-3">
|
||||
{isLoading ? (
|
||||
<div className="col-span-full flex items-center justify-center py-8">
|
||||
<Loader2 className="h-6 w-6 animate-spin text-violet-500" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user