Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat.ReactNative into circleciForDetoxAndroid
This commit is contained in:
commit
1a5720a119
|
@ -1,15 +1,16 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
StyleSheet, View, Modal, Animated
|
||||
StyleSheet, Modal, Animated, View
|
||||
} from 'react-native';
|
||||
import { withTheme } from '../theme';
|
||||
import { themes } from '../constants/colors';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.25)'
|
||||
justifyContent: 'center'
|
||||
},
|
||||
image: {
|
||||
width: 100,
|
||||
|
@ -18,9 +19,10 @@ const styles = StyleSheet.create({
|
|||
}
|
||||
});
|
||||
|
||||
export default class Loading extends React.PureComponent {
|
||||
class Loading extends React.PureComponent {
|
||||
static propTypes = {
|
||||
visible: PropTypes.bool.isRequired
|
||||
visible: PropTypes.bool,
|
||||
theme: PropTypes.string
|
||||
}
|
||||
|
||||
state = {
|
||||
|
@ -36,7 +38,7 @@ export default class Loading extends React.PureComponent {
|
|||
opacity,
|
||||
{
|
||||
toValue: 1,
|
||||
duration: 1000,
|
||||
duration: 200,
|
||||
useNativeDriver: true
|
||||
}
|
||||
);
|
||||
|
@ -91,23 +93,39 @@ export default class Loading extends React.PureComponent {
|
|||
|
||||
render() {
|
||||
const { opacity, scale } = this.state;
|
||||
const { visible } = this.props;
|
||||
const { visible, theme } = this.props;
|
||||
|
||||
const scaleAnimation = scale.interpolate({
|
||||
inputRange: [0, 0.5, 1],
|
||||
outputRange: [1, 1.1, 1]
|
||||
});
|
||||
|
||||
const opacityAnimation = opacity.interpolate({
|
||||
inputRange: [0, 1],
|
||||
outputRange: [0, themes[theme].backdropOpacity],
|
||||
extrapolate: 'clamp'
|
||||
});
|
||||
|
||||
return (
|
||||
<Modal
|
||||
visible={visible}
|
||||
transparent
|
||||
onRequestClose={() => {}}
|
||||
>
|
||||
<View style={styles.container} testID='loading'>
|
||||
<View
|
||||
style={styles.container}
|
||||
testID='loading'
|
||||
>
|
||||
<Animated.View
|
||||
style={[{
|
||||
...StyleSheet.absoluteFill,
|
||||
backgroundColor: themes[theme].backdropColor,
|
||||
opacity: opacityAnimation
|
||||
}]}
|
||||
/>
|
||||
<Animated.Image
|
||||
source={require('../static/images/logo.png')}
|
||||
style={[styles.image, {
|
||||
opacity,
|
||||
transform: [{
|
||||
scale: scaleAnimation
|
||||
}]
|
||||
|
@ -118,3 +136,5 @@ export default class Loading extends React.PureComponent {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default (withTheme(Loading));
|
||||
|
|
|
@ -415,11 +415,6 @@ class RoomInfoEditView extends React.Component {
|
|||
return permissions[PERMISSION_DELETE_C];
|
||||
}
|
||||
|
||||
hasArchivePermission = () => {
|
||||
const { permissions } = this.state;
|
||||
return (permissions[PERMISSION_ARCHIVE] || permissions[PERMISSION_UNARCHIVE]);
|
||||
};
|
||||
|
||||
renderSystemMessages = () => {
|
||||
const { systemMessages, enableSysMes } = this.state;
|
||||
const { theme } = this.props;
|
||||
|
@ -691,11 +686,11 @@ class RoomInfoEditView extends React.Component {
|
|||
style={[
|
||||
styles.buttonInverted,
|
||||
styles.buttonContainer_inverted,
|
||||
!this.hasArchivePermission() && sharedStyles.opacity5,
|
||||
archived ? !permissions[PERMISSION_UNARCHIVE] && sharedStyles.opacity5 : !permissions[PERMISSION_ARCHIVE] && sharedStyles.opacity5,
|
||||
{ flex: 1, marginLeft: 10, borderColor: dangerColor }
|
||||
]}
|
||||
onPress={this.toggleArchive}
|
||||
disabled={!this.hasArchivePermission()}
|
||||
disabled={archived ? !permissions[PERMISSION_UNARCHIVE] : !permissions[PERMISSION_ARCHIVE]}
|
||||
testID={archived ? 'room-info-edit-view-unarchive' : 'room-info-edit-view-archive'}
|
||||
>
|
||||
<Text
|
||||
|
|
45
ios/Podfile
45
ios/Podfile
|
@ -21,49 +21,8 @@ abstract_target 'defaults' do
|
|||
|
||||
target 'RocketChatRN' # Experimental app
|
||||
target 'Rocket.Chat' # Official app
|
||||
end
|
||||
|
||||
target 'ShareRocketChatRN' do
|
||||
pod 'EXAppleAuthentication', :path=> "../node_modules/expo-apple-authentication/ios"
|
||||
pod 'EXAV', :path=> "../node_modules/expo-av/ios"
|
||||
pod 'EXFileSystem', :path=> "../node_modules/expo-file-system/ios"
|
||||
pod 'EXHaptics', :path=> "../node_modules/expo-haptics/ios"
|
||||
pod 'EXImageLoader', :path=> "../node_modules/expo-image-loader/ios"
|
||||
pod 'UMCore', :path=> "../node_modules/@unimodules/core/ios"
|
||||
pod 'UMImageLoaderInterface', :path=> "../node_modules/unimodules-image-loader-interface/ios"
|
||||
pod 'UMReactNativeAdapter', :path=> "../node_modules/@unimodules/react-native-adapter/ios"
|
||||
|
||||
use_react_native!(:path => '../node_modules/react-native', :hermes_enabled => true)
|
||||
|
||||
pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'
|
||||
pod 'RNFBAnalytics', :path => '../node_modules/@react-native-firebase/analytics'
|
||||
pod 'RNFBCrashlytics', :path => '../node_modules/@react-native-firebase/crashlytics'
|
||||
pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
|
||||
pod 'RNCMaskedView', :path => '../node_modules/@react-native-community/masked-view'
|
||||
pod 'RNFastImage', :path => '../node_modules/@rocket.chat/react-native-fast-image'
|
||||
pod 'BugsnagReactNative', :path => '../node_modules/@bugsnag/react-native'
|
||||
pod 'react-native-appearance', :path => '../node_modules/react-native-appearance'
|
||||
pod 'RNConfigReader', :path => '../node_modules/react-native-config-reader'
|
||||
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
|
||||
pod 'react-native-document-picker', :path => '../node_modules/react-native-document-picker'
|
||||
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
|
||||
pod 'RNLocalize', :path => '../node_modules/react-native-localize'
|
||||
pod 'react-native-mmkv-storage', :path => '../node_modules/react-native-mmkv-storage'
|
||||
pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
|
||||
pod 'react-native-safe-area-context', :path => '../node_modules/react-native-safe-area-context'
|
||||
pod 'RNScreens', :path => '../node_modules/react-native-screens'
|
||||
pod 'react-native-simple-crypto', :path => '../node_modules/react-native-simple-crypto'
|
||||
pod 'ReactNativeUiLib', :path => '../node_modules/react-native-ui-lib/lib'
|
||||
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
|
||||
pod 'rn-extensions-share', :path => '../node_modules/rn-extensions-share'
|
||||
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
|
||||
pod 'RNRootView', :path => '../node_modules/rn-root-view'
|
||||
pod 'react-native-orientation-locker', :path => '../node_modules/react-native-orientation-locker'
|
||||
end
|
||||
|
||||
# used to get user credentials
|
||||
target 'NotificationService' do
|
||||
all_pods
|
||||
target 'ShareRocketChatRN'
|
||||
target 'NotificationService'
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
|
|
|
@ -1049,6 +1049,6 @@ SPEC CHECKSUMS:
|
|||
Yoga: 575c581c63e0d35c9a83f4b46d01d63abc1100ac
|
||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||
|
||||
PODFILE CHECKSUM: 70acbdf88ff07173b5e52fdbfd3825f5b6a07b83
|
||||
PODFILE CHECKSUM: 2cb6f38193d69310b4dfc466be3cf4ff7a5e98d3
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
|
|
|
@ -1049,6 +1049,6 @@ SPEC CHECKSUMS:
|
|||
Yoga: 575c581c63e0d35c9a83f4b46d01d63abc1100ac
|
||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||
|
||||
PODFILE CHECKSUM: 70acbdf88ff07173b5e52fdbfd3825f5b6a07b83
|
||||
PODFILE CHECKSUM: 2cb6f38193d69310b4dfc466be3cf4ff7a5e98d3
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue