* Update post textbox design * Hide team selection * Added channel loader * Update post textbox to new design * Add channel loader animation * Remove error bar * Made image preview fullscreen * Fix channel loader gradient * Fix status icon * Adjust loaded and profile * Fix channel header wrap * Add reply count icon * Fix android styling * Hide send button * Fix thread header * Fix thumbnail upload preview * Fix preview retry and design
69 lines
2.3 KiB
JavaScript
69 lines
2.3 KiB
JavaScript
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
/* eslint-disable */
|
|
|
|
import {connect} from 'react-redux';
|
|
import React, {PropTypes} from 'react';
|
|
import {
|
|
Platform,
|
|
TouchableOpacity,
|
|
View
|
|
} from 'react-native';
|
|
import Icon from 'react-native-vector-icons/FontAwesome';
|
|
|
|
import FormattedText from 'app/components/formatted_text';
|
|
|
|
const defaults = {
|
|
renderBackButton: (props, emitter, theme) => {
|
|
return (
|
|
<TouchableOpacity
|
|
style={{flexDirection: 'row', flex: 1, paddingHorizontal: 15, alignItems: 'center'}}
|
|
onPress={props.onNavigateBack}
|
|
>
|
|
<Icon
|
|
style={{fontWeight: 'bold'}}
|
|
name='angle-left'
|
|
size={35}
|
|
color={theme.sidebarHeaderTextColor}
|
|
/>
|
|
</TouchableOpacity>
|
|
);
|
|
},
|
|
renderTitleComponent: (props, emitter, theme) => {
|
|
const navProps = props.scene.route.navigationProps || {};
|
|
const title = navProps.title;
|
|
if (title) {
|
|
return (
|
|
<View style={{alignItems: 'center', justifyContent: 'center', flex: 1, marginHorizontal: 50}}>
|
|
<FormattedText
|
|
id={title.id}
|
|
defaultMessage={title.defaultMessage}
|
|
ellipsizeMode='tail'
|
|
numberOfLines={1}
|
|
style={{
|
|
textAlign: 'center',
|
|
color: theme.sidebarHeaderTextColor,
|
|
fontSize: 15,
|
|
fontWeight: 'bold'
|
|
}}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
},
|
|
headerStyle: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center'
|
|
},
|
|
allowSceneSwipe: true,
|
|
allowMenuSwipe: false
|
|
};
|
|
|
|
export default (stateProps, dispatchProps) => (WrappedComponent) => {
|
|
const componentNavigationProps = WrappedComponent.WrappedComponent ? WrappedComponent.WrappedComponent.navigationProps : WrappedComponent.navigationProps;
|
|
|
|
WrappedComponent.navigationProps = Object.assign({}, defaults, componentNavigationProps);
|
|
|
|
return connect(stateProps, dispatchProps)(WrappedComponent);
|
|
};
|