mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Added attachment border radius
This commit is contained in:
@ -64,7 +64,9 @@ const AttachmentAudio: React.FC<Props> = ({ total, index, sensitiveShown, audio
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
backgroundColor: colors.shimmerDefault,
|
||||
aspectRatio: aspectRatio({ total, index, ...audio.meta?.original })
|
||||
aspectRatio: aspectRatio({ total, index, ...audio.meta?.original }),
|
||||
borderRadius: StyleConstants.BorderRadius / 2,
|
||||
overflow: 'hidden'
|
||||
}}
|
||||
>
|
||||
<View
|
||||
|
@ -1,4 +1,5 @@
|
||||
import GracefullyImage from '@components/GracefullyImage'
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React from 'react'
|
||||
import { View } from 'react-native'
|
||||
@ -23,7 +24,16 @@ const AttachmentImage = ({
|
||||
const { colors } = useTheme()
|
||||
|
||||
return (
|
||||
<View style={{ flex: 1, backgroundColor: colors.shimmerDefault, alignContent: 'center', justifyContent: 'center' }}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: colors.shimmerDefault,
|
||||
alignContent: 'center',
|
||||
justifyContent: 'center',
|
||||
borderRadius: StyleConstants.BorderRadius / 2,
|
||||
overflow: 'hidden'
|
||||
}}
|
||||
>
|
||||
<GracefullyImage
|
||||
accessibilityLabel={image.description}
|
||||
hidden={sensitiveShown}
|
||||
|
@ -27,7 +27,9 @@ const AttachmentUnsupported: React.FC<Props> = ({ total, index, sensitiveShown,
|
||||
flex: 1,
|
||||
aspectRatio: aspectRatio({ total, index, ...attachment.meta?.original }),
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
alignItems: 'center',
|
||||
borderRadius: StyleConstants.BorderRadius / 2,
|
||||
overflow: 'hidden'
|
||||
}}
|
||||
>
|
||||
{attachment.blurhash ? (
|
||||
|
@ -56,7 +56,9 @@ const AttachmentVideo: React.FC<Props> = ({
|
||||
backgroundColor: colors.shimmerDefault,
|
||||
aspectRatio: aspectRatio({ total, index, ...video.meta?.original }),
|
||||
alignContent: 'center',
|
||||
justifyContent: 'center'
|
||||
justifyContent: 'center',
|
||||
borderRadius: StyleConstants.BorderRadius / 2,
|
||||
overflow: 'hidden'
|
||||
}}
|
||||
>
|
||||
<Video
|
||||
|
@ -171,31 +171,31 @@ const TimelineAttachment = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
marginTop: StyleConstants.Spacing.M,
|
||||
flex: 1,
|
||||
gap: StyleConstants.Spacing.XS,
|
||||
...(isLargeDevice && { maxWidth: 375 })
|
||||
}}
|
||||
>
|
||||
{chunk(status.media_attachments, 2).map((chunk, chunkIndex) => (
|
||||
<View
|
||||
key={chunkIndex}
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
alignContent: 'stretch',
|
||||
gap: StyleConstants.Spacing.XS
|
||||
}}
|
||||
>
|
||||
{chunk.map((a, aIndex) => (
|
||||
<Fragment key={aIndex}>{mapAttachmentType(a, chunkIndex * 2 + aIndex)}</Fragment>
|
||||
))}
|
||||
</View>
|
||||
))}
|
||||
<View style={{ marginTop: StyleConstants.Spacing.M, ...(isLargeDevice && { maxWidth: 375 }) }}>
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
gap: StyleConstants.Spacing.XS
|
||||
}}
|
||||
>
|
||||
{chunk(status.media_attachments, 2).map((chunk, chunkIndex) => (
|
||||
<View
|
||||
key={chunkIndex}
|
||||
style={{
|
||||
flex: 1,
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'center',
|
||||
alignContent: 'stretch',
|
||||
gap: StyleConstants.Spacing.XS
|
||||
}}
|
||||
>
|
||||
{chunk.map((a, aIndex) => (
|
||||
<Fragment key={aIndex}>{mapAttachmentType(a, chunkIndex * 2 + aIndex)}</Fragment>
|
||||
))}
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
|
||||
{defaultSensitive() &&
|
||||
(sensitiveShown ? (
|
||||
@ -231,7 +231,7 @@ const TimelineAttachment = () => {
|
||||
}}
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: StyleConstants.Spacing.S * 2,
|
||||
top: StyleConstants.Spacing.S,
|
||||
left: StyleConstants.Spacing.S
|
||||
}}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user