导出面板改用小红书与 TapTap 真实图标

新增 packages/shared/src/icons/rednote.png 与 taptap.png 两个真实图标。

TargetIcon 按 Target 一处收口图源:陶泥儿用 IP 图,小红书用 RedNote,TapTap 用 TapTap logo。

TapTap 是横向 logo,卡片与 tab 的图标盒改为矩形配 object-contain,宽图按宽度贴满、方图按高度贴满。
This commit is contained in:
2026-10-05 13:12:09 +08:00
parent df4ef37a1c
commit 477e60c3f8
5 changed files with 25 additions and 12 deletions
@@ -21,11 +21,13 @@ export function TargetCard({
className="group flex aspect-square w-full flex-col items-center justify-center gap-4 rounded-3xl border border-[#e2cbb8] bg-[#fffaf5] p-6 text-center shadow-[0_18px_40px_rgba(112,57,30,0.08)] transition hover:-translate-y-0.5 hover:border-[#c7653d] hover:shadow-[0_22px_48px_rgba(112,57,30,0.14)]"
onClick={() => onOpen(target)}
>
<TargetIcon
target={target}
size={200}
className="h-3/5 w-3/5 object-contain transition group-hover:scale-105"
/>
<span className="flex min-h-0 w-4/5 flex-1 items-center justify-center">
<TargetIcon
target={target}
size={200}
className="h-full w-full object-contain transition group-hover:scale-105"
/>
</span>
<span className="text-lg font-semibold text-[#3d1f10]">{meta.label}</span>
</button>
);
@@ -1,12 +1,23 @@
import placeholderIcon from '../../../../../../../packages/shared/src/icons/taonier-product-ip.png';
import type { Target } from '../model';
import rednoteIcon from '../../../../../../../packages/shared/src/icons/rednote.png';
import taonierIcon from '../../../../../../../packages/shared/src/icons/taonier-product-ip.png';
import taptapIcon from '../../../../../../../packages/shared/src/icons/taptap.png';
import { Target } from '../model';
/**
* 目标图标占位。
* 目标图标。
*
* 三个目标的正式图标还没到,先统一用陶泥儿 IP 图占位;补齐后在这里按 `target` 分支,
* 卡片与 tab 都不必改。`className` 交给调用方定尺寸(卡片里是主视觉,tab 里只是小标)。
* 陶泥儿用 IP 图;小红书(RedNote)与 TapTap 用各自的真实图标。三个目标的图源在这里
* 一处收口,卡片与 tab 都只认 `Target`,换图不用改调用方。
*
* TapTap 那张是横向 logo(宽高比约 3.6:1),所以调用方给的是矩形盒 + `object-contain`:
* 它按宽度贴满,方形图标则按高度贴满,互不拉伸。
*/
const TARGET_ICON: Record<Target, string> = {
[Target.Taonier]: taonierIcon,
[Target.Xiaohongshu]: rednoteIcon,
[Target.TapTap]: taptapIcon,
};
export function TargetIcon({
target,
size = 32,
@@ -18,7 +29,7 @@ export function TargetIcon({
}) {
return (
<img
src={placeholderIcon}
src={TARGET_ICON[target]}
alt=""
aria-hidden="true"
width={size}
@@ -38,7 +38,7 @@ export function TargetTabs({
<TargetIcon
target={target}
size={20}
className="size-5 shrink-0 object-contain"
className="h-5 w-7 shrink-0 object-contain"
/>
<span className="truncate">{TARGET_META[target].label}</span>
</button>
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB