From 5c5a4f51028c096e016cf9cfe1d760dd2e888a05 Mon Sep 17 00:00:00 2001 From: enahum Date: Wed, 29 Mar 2017 23:54:12 -0300 Subject: [PATCH] Small ui fixes (#419) --- .../channel_drawer_item.js | 2 +- .../channel_drawer_list.js | 3 + app/components/channel_icon.js | 6 +- .../push_notification/push_notification.js | 4 +- app/components/root_navigator.js | 155 ------------------ app/scenes/channel/channel_drawer_button.js | 4 +- .../channel_info/channel_info_header.js | 2 +- app/scenes/settings/settings_item.js | 3 +- 8 files changed, 14 insertions(+), 165 deletions(-) delete mode 100644 app/components/root_navigator.js diff --git a/app/components/channel_drawer_list/channel_drawer_item.js b/app/components/channel_drawer_list/channel_drawer_item.js index 479af7a9f..1438ba13d 100644 --- a/app/components/channel_drawer_list/channel_drawer_item.js +++ b/app/components/channel_drawer_list/channel_drawer_item.js @@ -74,7 +74,7 @@ export default class ChannelDrawerItem extends PureComponent { isActive={isActive} hasUnread={hasUnread} membersCount={channel.display_name.split(',').length} - size={12} + size={16} status={channel.status} theme={theme} type={channel.type} diff --git a/app/components/channel_drawer_list/channel_drawer_list.js b/app/components/channel_drawer_list/channel_drawer_list.js index bf996565e..b89401cb5 100644 --- a/app/components/channel_drawer_list/channel_drawer_list.js +++ b/app/components/channel_drawer_list/channel_drawer_list.js @@ -226,10 +226,12 @@ class ChannelDrawerList extends Component { }; renderSectionAction = (styles, action) => { + const {theme} = this.props; return ( this.props.actions.openSettingsModal()} + underlayColor={changeOpacity(theme.sidebarHeaderBg, 0.5)} > ); } else if (type === Constants.GM_CHANNEL) { return ( - - + + {membersCount} diff --git a/app/components/push_notification/push_notification.js b/app/components/push_notification/push_notification.js index 1920ddeb9..0d549bf18 100644 --- a/app/components/push_notification/push_notification.js +++ b/app/components/push_notification/push_notification.js @@ -109,11 +109,11 @@ export default class PushNotification extends PureComponent { if (data.channel_id !== currentChannelId) { MessageBarManager.showAlert({ - alertType: 'info', + alertType: 'extra', avatar: icon, avatarStyle: {borderRadius: 10, width: 20, height: 20}, message, - stylesheetInfo: {backgroundColor: changeOpacity('#000', 0.9)}, + stylesheetExtra: {backgroundColor: changeOpacity('#000', 0.9)}, messageStyle: {color: 'white', fontSize: 13}, viewTopInset: 15, viewBottomInset: 15, diff --git a/app/components/root_navigator.js b/app/components/root_navigator.js deleted file mode 100644 index 9403f91bb..000000000 --- a/app/components/root_navigator.js +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import React from 'react'; - -import {Image, Navigator, StyleSheet, Text, TouchableOpacity} from 'react-native'; -import SelectServerView from './select_server_view'; - -import menuImage from 'images/menu.png'; - -const styles = StyleSheet.create({ - container: { - flexDirection: 'row', - flex: 1 - }, - - button: { - backgroundColor: 'white', - padding: 15, - borderBottomWidth: StyleSheet.hairlineWidth, - borderBottomColor: '#CDCDCD' - }, - buttonText: { - fontSize: 17, - fontWeight: '500' - }, - navBar: { - backgroundColor: 'white', - flexDirection: 'row' - }, - navBarText: { - fontSize: 16, - marginVertical: 10 - }, - navBarTitleText: { - color: '#373E4D', - fontWeight: '500', - marginVertical: 9 - }, - navBarLeftButton: { - paddingLeft: 10 - }, - navBarRightButton: { - paddingRight: 10 - }, - navBarButtonText: { - color: '#5890FF' - }, - - activityIndicator: { - alignItems: 'center', - justifyContent: 'center', - padding: 8, - flex: 1 - }, - - menuImage: { - height: 30, - width: 30 - } -}); - -const NavigationBarRouteMapper = { - LeftButton(route, navigator, index, navState) { - if (index === 0) { - return null; - } - - const previousRoute = navState.routeStack[index - 1]; - - if (previousRoute.signin) { - return ( - navigator.pop()} - style={styles.navBarLeftButton} - > - - - ); - } - - let title = null; - if (previousRoute.root) { - title = 'Server'; - } else if (previousRoute.channels) { - title = 'Channels'; - } - - return ( - navigator.pop()} - style={styles.navBarLeftButton} - > - - {'< ' + title} - - - ); - }, - - RightButton() { - return null; - }, - - Title(route) { - return ( - - {route.title} - - ); - } -}; - -export default class RootNavigator extends React.Component { - renderScene = (route, navigator) => { - if (route.root) { - return ( - { - navigator.push({signin: true}); - }} - /> - ); - } else if (route.signin) { - // return ( - // { - // navigator.push({title: 'Team Selection', }); - // }} - // /> - // ); - } - - return null; - } - - render() { - return ( - - } - /> - ); - } -} diff --git a/app/scenes/channel/channel_drawer_button.js b/app/scenes/channel/channel_drawer_button.js index e4adc36be..33fbb2a71 100644 --- a/app/scenes/channel/channel_drawer_button.js +++ b/app/scenes/channel/channel_drawer_button.js @@ -10,7 +10,7 @@ import { TouchableOpacity, View } from 'react-native'; -import Icon from 'react-native-vector-icons/FontAwesome'; +import Icon from 'react-native-vector-icons/Ionicons'; import Badge from 'app/components/badge'; import {getTheme} from 'app/selectors/preferences'; @@ -101,7 +101,7 @@ class ChannelDrawerButton extends PureComponent { > diff --git a/app/scenes/channel_info/channel_info_header.js b/app/scenes/channel_info/channel_info_header.js index 5a950bd1f..cebe43a12 100644 --- a/app/scenes/channel_info/channel_info_header.js +++ b/app/scenes/channel_info/channel_info_header.js @@ -24,7 +24,7 @@ function channelInfoHeader(props) { { return StyleSheet.create({ container: { + backgroundColor: theme.centerChannelBg, height: 51, flexDirection: 'column', justifyContent: 'center' @@ -116,7 +117,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { }, icon: { color: theme.linkColor, - fontSize: 16 + fontSize: 20 }, label: { color: theme.centerChannelColor,