This commit is contained in:
imeepos 2025-12-26 19:16:17 +08:00
parent 0e249b27e1
commit 8f4285e8a2
1 changed files with 37 additions and 0 deletions

View File

@ -92,6 +92,40 @@ const GridItem = memo(
isVisible: boolean
onSelect: (post: any) => void
}) => {
// 渲染状态标记
const renderStatusBadge = () => {
const status = post.status
// 成功状态不显示标记
if (status === 'completed' || status === 'success') {
return null
}
// 失败状态
if (status === 'failed') {
return (
<Block
className="absolute left-[8px] top-[8px] z-20 flex-row items-center gap-[4px] border-2 border-black bg-[#e61e25] px-[8px] py-[4px] shadow-hard-black"
style={{ transform: [{ skewX: '6deg' }] }}
>
<Ionicons color="white" name="close-circle" size={14} />
<Text className="text-[10px] font-[900] italic text-white"></Text>
</Block>
)
}
// 其他状态显示加载中
return (
<Block
className="absolute left-[8px] top-[8px] z-20 flex-row items-center gap-[4px] border-2 border-black bg-white px-[8px] py-[4px] shadow-hard-black"
style={{ transform: [{ skewX: '6deg' }] }}
>
<SpinningLoader />
<Text className="text-[10px] font-[900] italic text-black"></Text>
</Block>
)
}
return (
<Block className="relative" onClick={() => onSelect(post)}>
<Block
@ -103,6 +137,9 @@ const GridItem = memo(
</Block>
{isSelected && <Block className="absolute inset-0 border-[3px] border-accent" />}
{/* 状态标记 */}
{renderStatusBadge()}
{isSelectionMode && (
<Block
className="absolute inset-0 z-30 items-center justify-center"