This commit is contained in:
郭文文 2026-01-29 11:58:45 +08:00
parent dba5fd7795
commit 9979c00d14
1 changed files with 32 additions and 20 deletions

View File

@ -853,31 +853,43 @@ const SelectionBar = memo(
const FABButtons = memo(({ onGenAgain, handleSync }: { onGenAgain: () => void; handleSync: () => void }) => { const FABButtons = memo(({ onGenAgain, handleSync }: { onGenAgain: () => void; handleSync: () => void }) => {
const insets = useSafeAreaInsets() const insets = useSafeAreaInsets()
const buttonHeight = 56
const skewOffset = 8 // 统一所有平行四边形的倾斜角度
const padding = 2
// 计算按钮宽度父容器宽度screenWidth - 32减去间距12px后平分
const buttonWidth = useMemo(() => (screenWidth - 16 * 2 - 12) / 2, [])
return ( return (
<Block className="absolute inset-x-[16px] bottom-[96px] z-40" style={{ paddingBottom: insets.bottom }}> <Block className="absolute inset-x-[16px] bottom-[96px] z-40" style={{ paddingBottom: insets.bottom }}>
<Block className="w-full flex-row gap-[12px]"> <Block className="w-full flex-row gap-[12px]">
<Block className="flex-1 -skew-x-6 shadow-large-black"> <Block className="flex-1 relative" style={{ height: buttonHeight }} onClick={onGenAgain}>
<Block <ParallelogramShape
className={cn`relative h-[56px] items-center justify-center overflow-hidden border-[2px] border-black bg-[#e61e25] shadow-large-accent`} width={buttonWidth}
onClick={onGenAgain} height={buttonHeight}
> fillColor="#FFFFFF"
<Block className="z-10 skew-x-6 flex-row items-center gap-[8px]"> padding={padding}
<MaterialCommunityIcons color="white" name="star-four-points" size={20} /> skewOffset={skewOffset}
<Text className="font-[bol]d text-[16px] text-white"></Text> >
</Block> <Block className="absolute inset-0 z-10 flex-row items-center justify-center gap-[8px]">
</Block> <MaterialCommunityIcons color="black" name="star-four-points" size={20} />
<Text className="font-bold text-[16px] text-black"></Text>
</Block>
</ParallelogramShape>
</Block> </Block>
<Block className="flex-1 -skew-x-6 shadow-large-accent"> <Block className="flex-1 relative" style={{ height: buttonHeight }} onClick={handleSync}>
<Block <ParallelogramShape
className={cn`relative h-[56px] items-center justify-center overflow-hidden border-[2px] border-black bg-black`} width={buttonWidth}
onClick={handleSync} height={buttonHeight}
> fillColor="#FFE500"
<Block className="z-10 flex-row items-center gap-[8px]"> padding={padding}
<Ionicons color={'white'} name="refresh" size={20} /> skewOffset={skewOffset}
<Text className={cn`font-[bol]d bg-black text-[16px] text-white`}></Text> >
</Block> <Block className="absolute inset-0 z-10 flex-row items-center justify-center gap-[8px]">
</Block> <Ionicons color="black" name="refresh" size={20} />
<Text className="font-bold text-[16px] text-black"></Text>
</Block>
</ParallelogramShape>
</Block> </Block>
</Block> </Block>
</Block> </Block>