This commit is contained in:
Guilherme Gazzo 2018-02-16 14:02:04 -02:00
parent 5f43aa2e38
commit 69e04a4c26
No known key found for this signature in database
GPG Key ID: 1F85C9AD922D0829
5 changed files with 556 additions and 245 deletions

View File

@ -3,7 +3,7 @@ import { Provider } from 'react-redux';
import { createStore, combineReducers } from 'redux'; import { createStore, combineReducers } from 'redux';
const reducers = combineReducers({settings:() => ({})}); const reducers = combineReducers({login:() => ({user: {}}), settings:() => ({})});
const store = createStore(reducers); const store = createStore(reducers);
import React from 'react'; import React from 'react';

View File

@ -33,7 +33,7 @@ exports[`render channel 1`] = `
style={ style={
Array [ Array [
Object { Object {
"alignItems": "flex-start", "alignItems": "center",
"borderBottomColor": "#ddd", "borderBottomColor": "#ddd",
"borderBottomWidth": 0.5, "borderBottomWidth": 0.5,
"flexDirection": "row", "flexDirection": "row",
@ -50,13 +50,12 @@ exports[`render channel 1`] = `
Object { Object {
"alignItems": "center", "alignItems": "center",
"justifyContent": "center", "justifyContent": "center",
"overflow": "hidden",
}, },
Object { Object {
"backgroundColor": "#00BCD4", "backgroundColor": "#00BCD4",
"borderRadius": 4, "borderRadius": 4,
"height": 56, "height": 46,
"width": 56, "width": 46,
}, },
undefined, undefined,
] ]
@ -77,7 +76,7 @@ exports[`render channel 1`] = `
"color": "#ffffff", "color": "#ffffff",
}, },
Object { Object {
"fontSize": 28, "fontSize": 23,
}, },
], ],
Object { Object {
@ -118,13 +117,15 @@ exports[`render channel 1`] = `
ellipsizeMode="tail" ellipsizeMode="tail"
numberOfLines={1} numberOfLines={1}
style={ style={
Object { Array [
"color": "#444", Object {
"flex": 1, "color": "#444",
"fontSize": 18, "flex": 1,
"fontWeight": "bold", "fontSize": 18,
"marginRight": 8, "marginRight": 8,
} },
undefined,
]
} }
> >
general general
@ -149,10 +150,10 @@ exports[`render channel 1`] = `
<View <View
style={ style={
Object { Object {
"alignItems": "center", "alignItems": "flex-end",
"flex": 1, "flex": 1,
"flexDirection": "row", "flexDirection": "row",
"justifyContent": "center", "justifyContent": "flex-end",
"width": "100%", "width": "100%",
} }
} }
@ -196,7 +197,7 @@ exports[`render no icon 1`] = `
style={ style={
Array [ Array [
Object { Object {
"alignItems": "flex-start", "alignItems": "center",
"borderBottomColor": "#ddd", "borderBottomColor": "#ddd",
"borderBottomWidth": 0.5, "borderBottomWidth": 0.5,
"flexDirection": "row", "flexDirection": "row",
@ -213,13 +214,12 @@ exports[`render no icon 1`] = `
Object { Object {
"alignItems": "center", "alignItems": "center",
"justifyContent": "center", "justifyContent": "center",
"overflow": "hidden",
}, },
Object { Object {
"backgroundColor": "#3F51B5", "backgroundColor": "#3F51B5",
"borderRadius": 4, "borderRadius": 4,
"height": 56, "height": 46,
"width": 56, "width": 46,
}, },
undefined, undefined,
] ]
@ -240,7 +240,7 @@ exports[`render no icon 1`] = `
"color": "#ffffff", "color": "#ffffff",
}, },
Object { Object {
"fontSize": 28, "fontSize": 23,
}, },
], ],
Object { Object {
@ -281,13 +281,15 @@ exports[`render no icon 1`] = `
ellipsizeMode="tail" ellipsizeMode="tail"
numberOfLines={1} numberOfLines={1}
style={ style={
Object { Array [
"color": "#444", Object {
"flex": 1, "color": "#444",
"fontSize": 18, "flex": 1,
"fontWeight": "bold", "fontSize": 18,
"marginRight": 8, "marginRight": 8,
} },
undefined,
]
} }
> >
name name
@ -312,10 +314,10 @@ exports[`render no icon 1`] = `
<View <View
style={ style={
Object { Object {
"alignItems": "center", "alignItems": "flex-end",
"flex": 1, "flex": 1,
"flexDirection": "row", "flexDirection": "row",
"justifyContent": "center", "justifyContent": "flex-end",
"width": "100%", "width": "100%",
} }
} }
@ -359,7 +361,7 @@ exports[`render private group 1`] = `
style={ style={
Array [ Array [
Object { Object {
"alignItems": "flex-start", "alignItems": "center",
"borderBottomColor": "#ddd", "borderBottomColor": "#ddd",
"borderBottomWidth": 0.5, "borderBottomWidth": 0.5,
"flexDirection": "row", "flexDirection": "row",
@ -376,13 +378,12 @@ exports[`render private group 1`] = `
Object { Object {
"alignItems": "center", "alignItems": "center",
"justifyContent": "center", "justifyContent": "center",
"overflow": "hidden",
}, },
Object { Object {
"backgroundColor": "#FF9800", "backgroundColor": "#FF9800",
"borderRadius": 4, "borderRadius": 4,
"height": 56, "height": 46,
"width": 56, "width": 46,
}, },
undefined, undefined,
] ]
@ -403,7 +404,7 @@ exports[`render private group 1`] = `
"color": "#ffffff", "color": "#ffffff",
}, },
Object { Object {
"fontSize": 28, "fontSize": 23,
}, },
], ],
Object { Object {
@ -444,13 +445,15 @@ exports[`render private group 1`] = `
ellipsizeMode="tail" ellipsizeMode="tail"
numberOfLines={1} numberOfLines={1}
style={ style={
Object { Array [
"color": "#444", Object {
"flex": 1, "color": "#444",
"fontSize": 18, "flex": 1,
"fontWeight": "bold", "fontSize": 18,
"marginRight": 8, "marginRight": 8,
} },
undefined,
]
} }
> >
private-group private-group
@ -475,10 +478,10 @@ exports[`render private group 1`] = `
<View <View
style={ style={
Object { Object {
"alignItems": "center", "alignItems": "flex-end",
"flex": 1, "flex": 1,
"flexDirection": "row", "flexDirection": "row",
"justifyContent": "center", "justifyContent": "flex-end",
"width": "100%", "width": "100%",
} }
} }
@ -523,7 +526,7 @@ exports[`render unread +999 1`] = `
style={ style={
Array [ Array [
Object { Object {
"alignItems": "flex-start", "alignItems": "center",
"borderBottomColor": "#ddd", "borderBottomColor": "#ddd",
"borderBottomWidth": 0.5, "borderBottomWidth": 0.5,
"flexDirection": "row", "flexDirection": "row",
@ -540,13 +543,12 @@ exports[`render unread +999 1`] = `
Object { Object {
"alignItems": "center", "alignItems": "center",
"justifyContent": "center", "justifyContent": "center",
"overflow": "hidden",
}, },
Object { Object {
"backgroundColor": "#3F51B5", "backgroundColor": "#3F51B5",
"borderRadius": 4, "borderRadius": 4,
"height": 56, "height": 46,
"width": 56, "width": 46,
}, },
undefined, undefined,
] ]
@ -562,7 +564,7 @@ exports[`render unread +999 1`] = `
"color": "#ffffff", "color": "#ffffff",
}, },
Object { Object {
"fontSize": 28, "fontSize": 23,
}, },
] ]
} }
@ -570,6 +572,27 @@ exports[`render unread +999 1`] = `
NA NA
</Text> </Text>
<View
style={
Array [
Object {
"borderRadius": 16,
"height": 16,
"width": 16,
},
Object {
"borderColor": "#fff",
"borderWidth": 3,
"bottom": -3,
"position": "absolute",
"right": -3,
},
Object {
"backgroundColor": "#cbced1",
},
]
}
/>
</View> </View>
<View <View
style={ style={
@ -598,13 +621,15 @@ exports[`render unread +999 1`] = `
ellipsizeMode="tail" ellipsizeMode="tail"
numberOfLines={1} numberOfLines={1}
style={ style={
Object { Array [
"color": "#444", Object {
"flex": 1, "color": "#444",
"fontSize": 18, "flex": 1,
"fontWeight": "bold", "fontSize": 18,
"marginRight": 8, "marginRight": 8,
} },
undefined,
]
} }
> >
name name
@ -629,10 +654,10 @@ exports[`render unread +999 1`] = `
<View <View
style={ style={
Object { Object {
"alignItems": "center", "alignItems": "flex-end",
"flex": 1, "flex": 1,
"flexDirection": "row", "flexDirection": "row",
"justifyContent": "center", "justifyContent": "flex-end",
"width": "100%", "width": "100%",
} }
} }
@ -699,7 +724,7 @@ exports[`render unread 1`] = `
style={ style={
Array [ Array [
Object { Object {
"alignItems": "flex-start", "alignItems": "center",
"borderBottomColor": "#ddd", "borderBottomColor": "#ddd",
"borderBottomWidth": 0.5, "borderBottomWidth": 0.5,
"flexDirection": "row", "flexDirection": "row",
@ -716,13 +741,12 @@ exports[`render unread 1`] = `
Object { Object {
"alignItems": "center", "alignItems": "center",
"justifyContent": "center", "justifyContent": "center",
"overflow": "hidden",
}, },
Object { Object {
"backgroundColor": "#3F51B5", "backgroundColor": "#3F51B5",
"borderRadius": 4, "borderRadius": 4,
"height": 56, "height": 46,
"width": 56, "width": 46,
}, },
undefined, undefined,
] ]
@ -738,7 +762,7 @@ exports[`render unread 1`] = `
"color": "#ffffff", "color": "#ffffff",
}, },
Object { Object {
"fontSize": 28, "fontSize": 23,
}, },
] ]
} }
@ -746,6 +770,27 @@ exports[`render unread 1`] = `
NA NA
</Text> </Text>
<View
style={
Array [
Object {
"borderRadius": 16,
"height": 16,
"width": 16,
},
Object {
"borderColor": "#fff",
"borderWidth": 3,
"bottom": -3,
"position": "absolute",
"right": -3,
},
Object {
"backgroundColor": "#cbced1",
},
]
}
/>
</View> </View>
<View <View
style={ style={
@ -774,13 +819,15 @@ exports[`render unread 1`] = `
ellipsizeMode="tail" ellipsizeMode="tail"
numberOfLines={1} numberOfLines={1}
style={ style={
Object { Array [
"color": "#444", Object {
"flex": 1, "color": "#444",
"fontSize": 18, "flex": 1,
"fontWeight": "bold", "fontSize": 18,
"marginRight": 8, "marginRight": 8,
} },
undefined,
]
} }
> >
name name
@ -805,10 +852,10 @@ exports[`render unread 1`] = `
<View <View
style={ style={
Object { Object {
"alignItems": "center", "alignItems": "flex-end",
"flex": 1, "flex": 1,
"flexDirection": "row", "flexDirection": "row",
"justifyContent": "center", "justifyContent": "flex-end",
"width": "100%", "width": "100%",
} }
} }
@ -875,7 +922,7 @@ exports[`renders correctly 1`] = `
style={ style={
Array [ Array [
Object { Object {
"alignItems": "flex-start", "alignItems": "center",
"borderBottomColor": "#ddd", "borderBottomColor": "#ddd",
"borderBottomWidth": 0.5, "borderBottomWidth": 0.5,
"flexDirection": "row", "flexDirection": "row",
@ -892,13 +939,12 @@ exports[`renders correctly 1`] = `
Object { Object {
"alignItems": "center", "alignItems": "center",
"justifyContent": "center", "justifyContent": "center",
"overflow": "hidden",
}, },
Object { Object {
"backgroundColor": "#3F51B5", "backgroundColor": "#3F51B5",
"borderRadius": 4, "borderRadius": 4,
"height": 56, "height": 46,
"width": 56, "width": 46,
}, },
undefined, undefined,
] ]
@ -914,7 +960,7 @@ exports[`renders correctly 1`] = `
"color": "#ffffff", "color": "#ffffff",
}, },
Object { Object {
"fontSize": 28, "fontSize": 23,
}, },
] ]
} }
@ -922,6 +968,27 @@ exports[`renders correctly 1`] = `
NA NA
</Text> </Text>
<View
style={
Array [
Object {
"borderRadius": 16,
"height": 16,
"width": 16,
},
Object {
"borderColor": "#fff",
"borderWidth": 3,
"bottom": -3,
"position": "absolute",
"right": -3,
},
Object {
"backgroundColor": "#cbced1",
},
]
}
/>
</View> </View>
<View <View
style={ style={
@ -950,13 +1017,15 @@ exports[`renders correctly 1`] = `
ellipsizeMode="tail" ellipsizeMode="tail"
numberOfLines={1} numberOfLines={1}
style={ style={
Object { Array [
"color": "#444", Object {
"flex": 1, "color": "#444",
"fontSize": 18, "flex": 1,
"fontWeight": "bold", "fontSize": 18,
"marginRight": 8, "marginRight": 8,
} },
undefined,
]
} }
> >
name name
@ -981,10 +1050,10 @@ exports[`renders correctly 1`] = `
<View <View
style={ style={
Object { Object {
"alignItems": "center", "alignItems": "flex-end",
"flex": 1, "flex": 1,
"flexDirection": "row", "flexDirection": "row",
"justifyContent": "center", "justifyContent": "flex-end",
"width": "100%", "width": "100%",
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@ export default class Status extends React.Component {
get status() { get status() {
const userId = this.props.id; const userId = this.props.id;
return this.props.activeUsers[userId] || 'offline'; return this.props.activeUsers && this.props.activeUsers[userId] || 'offline';
} }
render() { render() {

View File

@ -143,7 +143,7 @@ const renderNumber = (unread, userMentions) => {
}; };
@connect(state => ({ @connect(state => ({
user: state.login.user, user: state.login && state.login.user,
StoreLastMessage: state.settings.Store_Last_Message, StoreLastMessage: state.settings.Store_Last_Message,
customEmojis: state.customEmojis customEmojis: state.customEmojis
})) }))