diff --git a/app/containers/AppVersion.js b/app/containers/AppVersion.js
new file mode 100644
index 000000000..c751c3385
--- /dev/null
+++ b/app/containers/AppVersion.js
@@ -0,0 +1,34 @@
+import React from 'react';
+import { StyleSheet, View, Text } from 'react-native';
+import PropTypes from 'prop-types';
+
+import { themes } from '../constants/colors';
+import sharedStyles from '../views/Styles';
+import { getReadableVersion } from '../utils/deviceInfo';
+
+const styles = StyleSheet.create({
+ container: {
+ alignItems: 'center',
+ justifyContent: 'flex-end',
+ backgroundColor: '#ccc'
+ },
+ text: {
+ ...sharedStyles.textRegular,
+ fontSize: 13
+ },
+ bold: {
+ ...sharedStyles.textSemibold
+ }
+});
+
+const Check = React.memo(({ theme }) => (
+
+ App Version: {getReadableVersion}
+
+));
+
+Check.propTypes = {
+ theme: PropTypes.string
+};
+
+export default Check;
diff --git a/app/containers/FormContainer.js b/app/containers/FormContainer.js
new file mode 100644
index 000000000..dbcfb6725
--- /dev/null
+++ b/app/containers/FormContainer.js
@@ -0,0 +1,66 @@
+import React from 'react';
+import { Text, ScrollView, Keyboard, Image, StyleSheet, TouchableOpacity, View, Alert } from 'react-native';
+import PropTypes from 'prop-types';
+import { SafeAreaView } from 'react-navigation';
+
+import { themes } from '../constants/colors';
+import sharedStyles from '../views/Styles';
+import scrollPersistTaps from '../utils/scrollPersistTaps';
+import KeyboardView from '../presentation/KeyboardView';
+import StatusBar from './StatusBar';
+import AppVersion from './AppVersion';
+
+const styles = StyleSheet.create({
+ title: {
+ ...sharedStyles.textBold,
+ fontSize: 22,
+ letterSpacing: 0,
+ textAlign: 'auto'
+ },
+ inputContainer: {
+ marginTop: 24,
+ marginBottom: 32
+ },
+ backButton: {
+ position: 'absolute',
+ paddingHorizontal: 9,
+ left: 15
+ },
+ certificatePicker: {
+ flex: 1,
+ marginTop: 40,
+ alignItems: 'center',
+ justifyContent: 'center'
+ },
+ chooseCertificateTitle: {
+ fontSize: 15,
+ ...sharedStyles.textRegular
+ },
+ chooseCertificate: {
+ fontSize: 15,
+ ...sharedStyles.textSemibold
+ }
+});
+
+const FormContainer = ({ children, theme }) => (
+
+
+
+
+ {children}
+
+
+
+
+);
+
+FormContainer.propTypes = {
+ theme: PropTypes.string
+};
+
+export default FormContainer;
diff --git a/app/i18n/locales/en.js b/app/i18n/locales/en.js
index 190831156..c83f2075a 100644
--- a/app/i18n/locales/en.js
+++ b/app/i18n/locales/en.js
@@ -238,6 +238,7 @@ export default {
Invite_users: 'Invite users',
Join_the_community: 'Join the community',
Join: 'Join',
+ Join_your_workspace: 'Join your workspace',
Just_invited_people_can_access_this_channel: 'Just invited people can access this channel',
Language: 'Language',
last_message: 'last message',
@@ -486,6 +487,7 @@ export default {
Welcome: 'Welcome',
Whats_your_2fa: 'What\'s your 2FA code?',
Without_Servers: 'Without Servers',
+ Workspaces: 'Workspaces',
Write_External_Permission_Message: 'Rocket Chat needs access to your gallery so you can save images.',
Write_External_Permission: 'Gallery Permission',
Yes_action_it: 'Yes, {{action}} it!',
diff --git a/app/views/NewServerView.js b/app/views/NewServerView.js
index 9e7d1642c..3f712b176 100644
--- a/app/views/NewServerView.js
+++ b/app/views/NewServerView.js
@@ -18,34 +18,30 @@ import sharedStyles from './Styles';
import scrollPersistTaps from '../utils/scrollPersistTaps';
import Button from '../containers/Button';
import TextInput from '../containers/TextInput';
+import FormContainer from '../containers/FormContainer';
import I18n from '../i18n';
-import { verticalScale, moderateScale } from '../utils/scaling';
import KeyboardView from '../presentation/KeyboardView';
import { isIOS, isNotch, isTablet } from '../utils/deviceInfo';
import { CustomIcon } from '../lib/Icons';
import StatusBar from '../containers/StatusBar';
+import AppVersion from '../containers/AppVersion';
import { themes } from '../constants/colors';
import log from '../utils/log';
import { animateNextTransition } from '../utils/layoutAnimation';
import { withTheme } from '../theme';
import { setBasicAuth, BASIC_AUTH_KEY } from '../utils/fetch';
+import { themedHeader } from '../utils/navigation';
const styles = StyleSheet.create({
- image: {
- alignSelf: 'center',
- marginVertical: verticalScale(20),
- width: 210,
- height: 171
- },
title: {
...sharedStyles.textBold,
- fontSize: moderateScale(22),
+ fontSize: 22,
letterSpacing: 0,
- alignSelf: 'center'
+ textAlign: 'auto'
},
inputContainer: {
- marginTop: 25,
- marginBottom: 15
+ marginTop: 24,
+ marginBottom: 32
},
backButton: {
position: 'absolute',
@@ -68,11 +64,10 @@ const styles = StyleSheet.create({
}
});
-const defaultServer = 'https://open.rocket.chat';
-
class NewServerView extends React.Component {
- static navigationOptions = () => ({
- header: null
+ static navigationOptions = ({ screenProps }) => ({
+ title: I18n.t('Workspaces'),
+ ...themedHeader(screenProps.theme)
})
static propTypes = {
@@ -97,7 +92,6 @@ class NewServerView extends React.Component {
this.state = {
text: server || '',
- autoFocus: !server,
certificate: null
};
}
@@ -292,49 +286,38 @@ class NewServerView extends React.Component {
render() {
const { connecting, theme } = this.props;
- const { text, autoFocus } = this.state;
+ const { text } = this.state;
return (
-
-
-
-
-
- {I18n.t('Sign_in_your_server')}
-
-
-
- { isIOS ? this.renderCertificatePicker() : null }
-
-
-
- {this.renderBack()}
-
+
+ {I18n.t('Join_your_workspace')}
+
+
+
+
+ { isIOS ? this.renderCertificatePicker() : null }
+ {/* */}
+
);
}
}
diff --git a/app/views/OnboardingView/index.js b/app/views/OnboardingView/index.js
index d8d228a05..ca5557448 100644
--- a/app/views/OnboardingView/index.js
+++ b/app/views/OnboardingView/index.js
@@ -4,7 +4,7 @@ import {
} from 'react-native';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
-import { SafeAreaView } from 'react-navigation';
+import { SafeAreaView, ScrollView } from 'react-navigation';
import Orientation from 'react-native-orientation-locker';
import { selectServerRequest, serverInitAdd, serverFinishAdd } from '../../actions/server';
@@ -16,9 +16,11 @@ import { isIOS, isNotch, isTablet } from '../../utils/deviceInfo';
import EventEmitter from '../../utils/events';
import { CustomIcon } from '../../lib/Icons';
import StatusBar from '../../containers/StatusBar';
+import AppVersion from '../../containers/AppVersion';
import { themes } from '../../constants/colors';
import { withTheme } from '../../theme';
import sharedStyles from '../Styles';
+import FormContainer from '../../containers/FormContainer';
class OnboardingView extends React.Component {
static navigationOptions = () => ({
@@ -139,64 +141,30 @@ class OnboardingView extends React.Component {
render() {
const { theme } = this.props;
return (
-
-
-
+
+
{I18n.t('Onboarding_title')}
{I18n.t('Onboarding_subtitle')}
{I18n.t('Onboarding_description')}
- {/* }
- onPress={this.connectServer}
- testID='connect-server-button'
- theme={theme}
- />
- }
- onPress={this.joinCommunity}
- testID='join-community-button'
- theme={theme}
- />
- }
- onPress={this.createWorkspace}
- testID='create-workspace-button'
- theme={theme}
- /> */}
- {this.renderClose()}
-
+ {/* {this.renderClose()} */}
+
);
}
}
diff --git a/app/views/OnboardingView/styles.js b/app/views/OnboardingView/styles.js
index 3093df0da..9ac774bc8 100644
--- a/app/views/OnboardingView/styles.js
+++ b/app/views/OnboardingView/styles.js
@@ -41,8 +41,7 @@ export default StyleSheet.create({
},
buttonsContainer: {
marginBottom: verticalScale(10),
- marginTop: verticalScale(30),
- marginHorizontal: 16
+ marginTop: verticalScale(30)
},
closeModal: {
position: 'absolute',
diff --git a/app/views/Styles.js b/app/views/Styles.js
index 7aac61d82..dbc4ba5a6 100644
--- a/app/views/Styles.js
+++ b/app/views/Styles.js
@@ -4,7 +4,8 @@ import { MAX_SCREEN_CONTENT_WIDTH, MAX_CONTENT_WIDTH } from '../constants/tablet
export default StyleSheet.create({
container: {
- flex: 1
+ flex: 1,
+ flexDirection: 'column'
},
containerScrollView: {
padding: 15,