This commit is contained in:
ue 2018-11-09 17:08:49 +01:00
commit 82a0ee9ef4
13 changed files with 171 additions and 76 deletions

BIN
src/assets/keep_calm.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@ -3,9 +3,11 @@ import { View, Text, Image } from 'react-native';
import NO_POST from '../../../assets/no_post.png';
import styles from './noPostStyles';
const NoPost = ({ text, name, defaultText }) => (
<View style={styles.wrapper}>
<Image style={styles.image} source={NO_POST} />
const NoPost = ({
text, name, defaultText, source, imageStyle, style,
}) => (
<View style={[styles.wrapper, style]}>
<Image style={[styles.image, imageStyle]} source={source || NO_POST} />
{name ? (
<Text style={styles.text}>{`@${name} ${text}`}</Text>
) : (

View File

@ -8,7 +8,7 @@ export default [
key: 'B',
title: 'B',
icon: 'bold',
iconType: 'Feather',
iconType: 'FontAwesome',
wrapper: '**',
onPress: applyWrapFormat,
// style: { fontWeight: 'bold' },
@ -25,7 +25,7 @@ export default [
key: 'L',
title: 'L',
icon: 'list',
iconType: 'Feather',
iconType: 'FontAwesome',
prefix: '-',
onPress: applyListFormat,
},
@ -40,7 +40,7 @@ export default [
key: 'I',
title: 'I',
icon: 'italic',
iconType: 'Feather',
iconType: 'FontAwesome',
wrapper: '*',
onPress: applyWrapFormat,
},
@ -48,7 +48,7 @@ export default [
key: 'U',
title: 'U',
icon: 'underline',
iconType: 'Feather',
iconType: 'FontAwesome',
wrapper: '__',
onPress: applyWrapFormat,
},
@ -67,7 +67,6 @@ export default [
icon: 'ios-quote',
onPress: applyListFormat,
},
{
key: 'CC',
title: 'CC',
@ -75,14 +74,6 @@ export default [
wrapper: '```',
onPress: applyWrapFormatNewLines,
},
{
key: 'WEB',
title: 'WEB',
icon: 'link-2',
iconType: 'Feather',
onPress: applyWebLinkFormat,
},
// {
// key: 'H2',
// title: 'H2',

View File

@ -99,8 +99,8 @@ export default class MarkdownEditorView extends Component {
<IconButton
size={20}
style={styles.rightIcons}
iconType="Feather"
name="link-2"
iconType="FontAwesome"
name="link"
onPress={() => Formats[9].onPress({ getState, setState })}
/>
<IconButton style={styles.rightIcons} size={20} iconType="Feather" name="image" />

View File

@ -22,44 +22,35 @@ class NotificationView extends Component {
notification: [
{
name: 'esteemapp',
title: '25% likes your post:',
title: 'eSteem Mobile!',
avatar: 'https://steemitimages.com/u/feruz/avatar/small',
description: 'My own Top 5 eSteem Surfer Featuressasasaasasas',
description: 'eSteem app with new ui!',
image: 'https://steemitimages.com/u/feruz/avatar/small',
date: 'yesterday',
// date: 'today',
isNew: true,
},
{
name: 'esteemapp',
title: '25% likes your post:',
avatar: 'https://steemitimages.com/u/feruz/avatar/small',
description: 'My own Top 5 eSteem Surfer Features',
image: 'https://steemitimages.com/u/feruz/avatar/small',
date: 'yesterday',
isNew: true,
},
{
name: 'esteemapp',
title: '25% likes your post:',
description: 'My own Top 5 eSteem Surfer Features',
image: 'https://steemitimages.com/u/feruz/avatar/small',
date: 'yesterday',
},
{
name: 'esteemapp',
title: '25% likes your post:',
avatar: 'https://steemitimages.com/u/feruz/avatar/small',
description: 'My own Top 5 eSteem Surfer Featuresasassasasaasas',
date: 'yesterday',
},
{
name: 'esteemapp',
title: '25% likes your post:',
avatar: 'https://steemitimages.com/u/feruz/avatar/small',
description: 'My own Top 5 eSteem Surfer Features',
image: 'https://steemitimages.com/u/feruz/avatar/small',
date: 'yesterday',
},
// {
// name: 'esteemapp',
// title: '25% likes your post:',
// description: 'My own Top 5 eSteem Surfer Features',
// image: 'https://steemitimages.com/u/feruz/avatar/small',
// date: 'yesterday',
// },
// {
// name: 'esteemapp',
// title: '25% likes your post:',
// avatar: 'https://steemitimages.com/u/feruz/avatar/small',
// description: 'My own Top 5 eSteem Surfer Featuresasassasasaasas',
// date: 'yesterday',
// },
// {
// name: 'esteemapp',
// title: '25% likes your post:',
// avatar: 'https://steemitimages.com/u/feruz/avatar/small',
// description: 'My own Top 5 eSteem Surfer Features',
// image: 'https://steemitimages.com/u/feruz/avatar/small',
// date: 'yesterday',
// },
],
};
}
@ -75,10 +66,7 @@ class NotificationView extends Component {
_getRenderItem = item => (
<View
key={Math.random()}
style={[
styles.notificationWrapper,
item.isNew && styles.isNewNotification,
]}
style={[styles.notificationWrapper, item.isNew && styles.isNewNotification]}
>
<Image
style={[styles.avatar, !item.avatar && styles.hasNoAvatar]}
@ -99,11 +87,11 @@ class NotificationView extends Component {
</Text>
</View>
{item.image && (
<Image
style={styles.image}
source={{ uri: item.image }}
defaultSource={require('../../../assets/no_image.png')}
/>
<Image
style={styles.image}
source={{ uri: item.image }}
defaultSource={require('../../../assets/no_image.png')}
/>
)}
</View>
);
@ -115,14 +103,7 @@ class NotificationView extends Component {
<View style={styles.container}>
<FilterBar
dropdownIconName="md-arrow-dropdown"
options={[
'ALL ACTIVITIES',
'VOTES',
'REPLIES',
'MENTIONS',
'FOLLOWS',
'REBLOGS',
]}
options={['ALL ACTIVITIES', 'VOTES', 'REPLIES', 'MENTIONS', 'FOLLOWS', 'REBLOGS']}
defaultText="ALL NOTIFICATION"
onDropdownSelect={this._handleOnDropdownSelect}
rightIconName="ios-checkmark"
@ -135,12 +116,12 @@ class NotificationView extends Component {
keyExtractor={item => item.email}
/>
{/* Will remove follow lines */}
<ContainerHeader hasSeperator isBoldTitle title="Yesterday" />
{/* <ContainerHeader hasSeperator isBoldTitle title="Yesterday" />
<FlatList
data={notification}
renderItem={({ item }) => this._getRenderItem(item)}
keyExtractor={item => item.email}
/>
/> */}
</ScrollView>
</View>
);

View File

@ -13,7 +13,7 @@ import { default as ROUTES } from '../../../constants/routeNames';
// Styles
import styles from './postButtonStyles';
const SIZE = 70;
const SIZE = 75;
const durationIn = 300;
const durationOut = 200;

View File

@ -2,7 +2,7 @@ import React from 'react';
import { createBottomTabNavigator } from 'react-navigation';
import Icon from 'react-native-vector-icons/FontAwesome';
import {
Home, Notification, Profile, RootComponent,
Home, Notification, Profile, RootComponent, Messages,
} from '../screens';
import { PostButton } from '../components/postButton';
@ -27,8 +27,8 @@ const BaseNavigator = createBottomTabNavigator(
tabBarIcon: <PostButton />,
}),
},
AuthorProfile: {
screen: RootComponent()(Profile),
Messages: {
screen: RootComponent()(Messages),
navigationOptions: () => ({
tabBarIcon: ({ tintColor }) => <Icon name="envelope-o" color={tintColor} size={18} />,
}),

View File

@ -9,6 +9,7 @@ import { Notification } from './notification';
import { Post } from './post';
import { Profile } from './profile';
import { Voters } from './voters';
import { Messages } from './messages';
// import Author from './authorProfile';
// import SideMenu from './sideMenuScreen';
@ -34,6 +35,7 @@ export {
Splash,
SteemConnect,
Voters,
Messages,
// Author,
// SideMenu,
// Hot,

View File

@ -0,0 +1,39 @@
import React, { Component } from 'react';
// import { connect } from 'react-redux';
// Services and Actions
// Middleware
// Constants
// Utilities
// Component
import { MessagesScreen } from '..';
/*
* Props Name Description Value
*@props --> props name here description here Value Type Here
*
*/
class MessagesContainer extends Component {
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycle Functions
// Component Functions
render() {
// eslint-disable-next-line
//const {} = this.props;
return <MessagesScreen {...this.props} />;
}
}
export default MessagesContainer;

View File

@ -0,0 +1,5 @@
import MessagesScreen from './screen/messagesScreen';
import Messages from './container/messagesContainer';
export { MessagesScreen, Messages };
export default Messages;

View File

@ -0,0 +1,43 @@
import React, { Component, Fragment } from 'react';
// Constants
// Components
import { Header } from '../../../components/header';
import { NoPost } from '../../../components/basicUIElements';
// Styles
import styles from './messagesStyle';
import MESSAGES_IMAGE from '../../../assets/keep_calm.png';
class MessagesScreen extends Component {
/* Props
* ------------------------------------------------
* @prop { type } name - Description....
*/
constructor(props) {
super(props);
this.state = {};
}
// Component Life Cycles
// Component Functions
render() {
return (
<Fragment>
<Header />
<NoPost
style={{ marginTop: 118 }}
imageStyle={styles.image}
source={MESSAGES_IMAGE}
defaultText="Messages feature is coming soon!"
/>
</Fragment>
);
}
}
export default MessagesScreen;

View File

@ -0,0 +1,19 @@
import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({
container: {
// flexDirection: 'center',
// width: 50,
justifyContent: 'center',
alignContent: 'center',
alignItems: 'center',
},
image: {
width: 193,
height: 189,
},
text: {
color: '#788187',
fontWeight: 'bold',
},
});

View File

@ -6,6 +6,11 @@ import { Notification } from '../../../components/notification';
import { Header } from '../../../components/header';
// Styles
import styles from './notificationStyles';
// Components
import { NoPost } from '../../../components/basicUIElements';
// Styles
import MESSAGES_IMAGE from '../../../assets/keep_calm.png';
class NotificationScreen extends PureComponent {
constructor(props) {
@ -33,7 +38,15 @@ class NotificationScreen extends PureComponent {
<Notification />
</View>
<View tabLabel="Leaderboard" style={styles.leaderboardTab}>
<Text>Leaderboard</Text>
<NoPost
style={{ marginTop: 118 }}
imageStyle={{
width: 193,
height: 189,
}}
source={MESSAGES_IMAGE}
defaultText="Leaderboard feature is coming soon!"
/>
</View>
</ScrollableTabView>
</Fragment>