mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
removing pan/zoom for now, conflicting with carousel swipe
This commit is contained in:
parent
9731cc8f55
commit
b3222db1f7
@ -104,7 +104,7 @@ compileOptions {
|
||||
applicationId "com.databag"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1015
|
||||
versionCode 1018
|
||||
versionName "1.5"
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
"moment": "^2.29.4",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.71.3",
|
||||
"react-native-awesome-gallery": "^0.3.5",
|
||||
"react-native-base64": "^0.2.1",
|
||||
"react-native-create-thumbnail": "^1.6.4",
|
||||
"react-native-device-info": "^10.4.0",
|
||||
|
@ -4,22 +4,40 @@ import { styles } from './ImageAsset.styled';
|
||||
import Colors from 'constants/Colors';
|
||||
import Ionicons from 'react-native-vector-icons/AntDesign';
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Gallery from 'react-native-awesome-gallery';
|
||||
|
||||
export function ImageAsset({ asset, dismiss }) {
|
||||
const { state, actions } = useImageAsset(asset);
|
||||
|
||||
return (
|
||||
<TouchableOpacity activeOpacity={1} style={{ display: 'flex', width: '100%', height: '100%' }} onPress={actions.showControls}>
|
||||
<TouchableOpacity style={styles.container} activeOpacity={1} onPress={actions.showControls}>
|
||||
<FastImage source={{ uri: asset.thumb }} onLoad={actions.setRatio}
|
||||
style={{ ...styles.thumb, width: state.imageWidth, height: state.imageHeight }}
|
||||
resizeMode={FastImage.resizeMode.contain} />
|
||||
{ state.url && (
|
||||
<Gallery data={[ state.url ]} onIndexChange={actions.loaded}
|
||||
style={{ ...styles.main }} />
|
||||
<FastImage source={{ uri: state.url }} onLoad={actions.loaded}
|
||||
style={{ ...styles.main, width: state.imageWidth, height: state.imageHeight }}
|
||||
resizeMode={FastImage.resizeMode.contain} />
|
||||
)}
|
||||
{ state.controls && (
|
||||
|
||||
{ state.loaded && state.controls && (
|
||||
<TouchableOpacity style={styles.close} onPress={dismiss}>
|
||||
<Ionicons name={'close'} size={32} color={Colors.white} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
|
||||
{ state.failed && (
|
||||
<TouchableOpacity style={styles.loading} onPress={dismiss}>
|
||||
<ActivityIndicator color={Colors.alert} size="large" />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{ !state.loaded && !state.failed && (
|
||||
<TouchableOpacity style={styles.loading} onPress={dismiss}>
|
||||
<ActivityIndicator color={Colors.white} size="large" />
|
||||
{ asset.total > 1 && (
|
||||
<Text style={styles.decrypting}>{ asset.block } / { asset.total }</Text>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user