2019-07-18 17:44:02 +00:00
|
|
|
import React from 'react';
|
|
|
|
import {
|
|
|
|
StyleSheet, View, Text
|
|
|
|
} from 'react-native';
|
2019-12-04 16:39:53 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2019-07-18 17:44:02 +00:00
|
|
|
import ShareExtension from 'rn-extensions-share';
|
|
|
|
|
2020-03-30 20:19:01 +00:00
|
|
|
import { CancelModalButton } from '../containers/HeaderButton';
|
2019-07-18 17:44:02 +00:00
|
|
|
import sharedStyles from './Styles';
|
|
|
|
import I18n from '../i18n';
|
2019-12-04 16:39:53 +00:00
|
|
|
import { themes } from '../constants/colors';
|
|
|
|
import { withTheme } from '../theme';
|
2019-07-18 17:44:02 +00:00
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
justifyContent: 'center',
|
2019-07-29 16:33:28 +00:00
|
|
|
alignItems: 'center',
|
|
|
|
padding: 15
|
2019-07-18 17:44:02 +00:00
|
|
|
},
|
|
|
|
title: {
|
|
|
|
fontSize: 18,
|
2019-12-04 16:39:53 +00:00
|
|
|
...sharedStyles.textBold
|
2019-07-18 17:44:02 +00:00
|
|
|
},
|
|
|
|
content: {
|
|
|
|
fontSize: 14,
|
|
|
|
...sharedStyles.textAlignCenter,
|
|
|
|
...sharedStyles.textRegular
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
class WithoutServerView extends React.Component {
|
2020-06-15 14:00:46 +00:00
|
|
|
static navigationOptions = {
|
|
|
|
title: 'Rocket.Chat',
|
|
|
|
headerLeft: () => (
|
2020-03-30 20:19:01 +00:00
|
|
|
<CancelModalButton
|
2019-07-18 17:44:02 +00:00
|
|
|
onPress={ShareExtension.close}
|
|
|
|
testID='share-extension-close'
|
|
|
|
/>
|
|
|
|
)
|
2020-06-15 14:00:46 +00:00
|
|
|
}
|
2019-07-18 17:44:02 +00:00
|
|
|
|
2019-12-04 16:39:53 +00:00
|
|
|
static propTypes = {
|
|
|
|
theme: PropTypes.string
|
|
|
|
}
|
|
|
|
|
2019-07-18 17:44:02 +00:00
|
|
|
render() {
|
2019-12-04 16:39:53 +00:00
|
|
|
const { theme } = this.props;
|
2019-07-18 17:44:02 +00:00
|
|
|
return (
|
2019-12-04 16:39:53 +00:00
|
|
|
<View style={[styles.container, { backgroundColor: themes[theme].backgroundColor }]}>
|
|
|
|
<Text style={[styles.title, { color: themes[theme].titleText }]}>{I18n.t('Without_Servers')}</Text>
|
|
|
|
<Text style={[styles.content, { color: themes[theme].titleText }]}>{I18n.t('You_need_to_access_at_least_one_RocketChat_server_to_share_something')}</Text>
|
2019-07-18 17:44:02 +00:00
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2019-12-04 16:39:53 +00:00
|
|
|
|
|
|
|
export default withTheme(WithoutServerView);
|