import { Avatar, ItemBadge, Space, Text } from '@stash/ui' import type { AppItem } from '../../data/types' /** * 应用卡片:头像 + 名称(热门带 HOT 角标)+ 单行描述。 * 点击进入条目详情;按住修饰键时保持浏览器默认行为(新标签打开原始链接)。 */ type AppCardProps = { item: AppItem onOpen?: (itemId: string) => void } export function AppCard({ item, onOpen }: AppCardProps) { return ( { if (onOpen === undefined) return if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return event.preventDefault() onOpen(item.id) }} >
{item.name} {item.hot === true && HOT} {item.desc}
) }