diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json
index 58438f319..06e3167eb 100644
--- a/app/i18n/locales/en.json
+++ b/app/i18n/locales/en.json
@@ -716,5 +716,8 @@
"Read_Only_Team": "Read Only Team",
"Broadcast_Team": "Broadcast Team",
"creating_team" : "creating team",
- "team-name-already-exists": "A team with that name already exists"
+ "team-name-already-exists": "A team with that name already exists",
+ "Add_Channel_to_Team": "Add Channel to Team",
+ "Create_New": "Create New",
+ "Add_Existing": "Add Existing"
}
diff --git a/app/stacks/InsideStack.js b/app/stacks/InsideStack.js
index bda56f0d2..9052b1310 100644
--- a/app/stacks/InsideStack.js
+++ b/app/stacks/InsideStack.js
@@ -71,6 +71,7 @@ import ShareView from '../views/ShareView';
import CreateDiscussionView from '../views/CreateDiscussionView';
import QueueListView from '../ee/omnichannel/views/QueueListView';
+import AddChannelTeamView from '../views/AddChannelTeamView';
// ChatsStackNavigator
const ChatsStack = createStackNavigator();
@@ -174,6 +175,11 @@ const ChatsStackNavigator = () => {
component={TeamChannelsView}
options={TeamChannelsView.navigationOptions}
/>
+
{
+ const { navigation, isMasterDetail, theme } = this.props;
+
+ const options = {
+ headerShown: true,
+ headerTitleAlign: 'center',
+ headerTitle: () => (
+
+ )
+ };
+
+ if (isMasterDetail) {
+ options.headerLeft = () => ;
+ } else {
+ options.headerLeft = () => (
+ navigation.pop()}
+ tintColor={themes[theme].headerTintColor}
+ />
+ );
+ }
+
+ navigation.setOptions(options);
+ }
+
+ renderButton = ({
+ onPress, testID, title, icon, first
+ }) => {
+ const { theme } = this.props;
+
+ return (
+ onPress()}
+ style={{ backgroundColor: themes[theme].backgroundColor }}
+ testID={testID}
+ theme={theme}
+ >
+
+
+ {title}
+
+
+ );
+ }
+
+ render() {
+ const { navigation } = this.props;
+
+ return (
+
+
+
+ {this.renderButton({
+ onPress: navigation.navigate('NewMessageStackNavigator', { screen: 'CreateChannelView', isTeam: false }),
+ title: I18n.t('Create_New'),
+ icon: 'channel-public',
+ testID: 'add-channel-team-view-create-channel',
+ first: true
+ })}
+ {this.renderButton({
+ // onPress: navigation.navigate('AddExistingChannelView'),
+ title: I18n.t('Add_Existing'),
+ icon: 'team',
+ testID: 'add-channel-team-view-create-channel'
+ })}
+
+
+ );
+ }
+}
+
+AddChannelTeamView.propTypes = {
+ route: PropTypes.object,
+ navigation: PropTypes.object,
+ isMasterDetail: PropTypes.bool,
+ theme: PropTypes.string
+};
+
+export default withDimensions(withTheme(AddChannelTeamView));
diff --git a/app/views/TeamChannelsView.js b/app/views/TeamChannelsView.js
index 15724ab5c..83c206298 100644
--- a/app/views/TeamChannelsView.js
+++ b/app/views/TeamChannelsView.js
@@ -146,7 +146,7 @@ class TeamChannelsView extends React.Component {
return;
}
- const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 1 });
+ const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 2 });
if (isSearching) {
return {
@@ -201,6 +201,7 @@ class TeamChannelsView extends React.Component {
options.headerRight = () => (
+ navigation.navigate('AddChannelTeamView')} />
);
return options;