diff --git a/.all-contributorsrc b/.all-contributorsrc index bd08220c3..ce926fd0d 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -554,6 +554,13 @@ "contributions": [ "code" ] + }, + { + "login": "MrLoh", + "name": "Tobias Lohse", + "avatar_url": "https://avatars0.githubusercontent.com/u/1285032?v=4", + "profile": "http://MrLoh.se", + "contributions": [] } ] } diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 7c37ca584..23476dc84 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -13,5 +13,5 @@ Thank you to all the people who have already contributed to GitPoint! | [
Vitaliy Kanev](https://github.com/vitalkanev)
[πŸ“–](https://github.com/gitpoint/git-point/commits?author=vitalkanev "Documentation") | [
Peter Dave Hello](https://www.peterdavehello.org/)
[πŸ“–](https://github.com/gitpoint/git-point/commits?author=PeterDaveHello "Documentation") [πŸ”§](#tool-PeterDaveHello "Tools") | [
Ernoff](https://github.com/Ernoff)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=Ernoff "Code") [πŸ›](https://github.com/gitpoint/git-point/issues?q=author%3AErnoff "Bug reports") | [
Matthew Brandly](http://words.brandly.me/about/)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=brandly "Code") | [
JoΓ£o Fonseca](https://github.com/Jpfonseca)
[🌍](#translation-Jpfonseca "Translation") | [
Arjun Curat](https://github.com/acurat)
[πŸ“–](https://github.com/gitpoint/git-point/commits?author=acurat "Documentation") | | [
siderio2](https://github.com/siderio2)
[🌍](#translation-siderio2 "Translation") | [
Kodo Verkisto](https://github.com/kodisto)
[🌍](#translation-kodisto "Translation") | [
Sarah Vessels](http://sarahvessels.com/)
[πŸ“–](https://github.com/gitpoint/git-point/commits?author=cheshire137 "Documentation") | [
Thales Sousa](https://github.com/tminussi)
[🌍](#translation-tminussi "Translation") | [
Aseem Sood](https://github.com/asood123)
[πŸ“–](https://github.com/gitpoint/git-point/commits?author=asood123 "Documentation") | [
Eliott hauteclair](https://eliott.be)
[🌍](#translation-Eliottiosdevs "Translation") | | [
Peter Blazejewicz](http://www.linkedin.com/in/peterblazejewicz)
[🌍](#translation-peterblazejewicz "Translation") | [
Eric Adamski](https://github.com/ericadamski)
[πŸ›](https://github.com/gitpoint/git-point/issues?q=author%3Aericadamski "Bug reports") | [
Jouderian Nobre Junior](https://github.com/jouderianjr)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=jouderianjr "Code") | [
Phi Dong](http://www.phidong.com)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=pdong "Code") | [
John Patrick Salcedo](https://github.com/jpls93)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=jpls93 "Code") | [
Γ“scar Carretero](https://github.com/ocarreterom)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=ocarreterom "Code") | -| [
Dyesse YUMBA](https://github.com/dyesseyumba)
[πŸ”§](#tool-dyesseyumba "Tools") | [
Bink](https://binkpitch.me/)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=binkpitch "Code") | [
khvilaboa](https://github.com/khvilaboa)
[🌍](#translation-khvilaboa "Translation") | [
James Glover](http://jamesmglover.com)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=jglover "Code") | +| [
Dyesse YUMBA](https://github.com/dyesseyumba)
[πŸ”§](#tool-dyesseyumba "Tools") | [
Bink](https://binkpitch.me/)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=binkpitch "Code") | [
khvilaboa](https://github.com/khvilaboa)
[🌍](#translation-khvilaboa "Translation") | [
James Glover](http://jamesmglover.com)
[πŸ’»](https://github.com/gitpoint/git-point/commits?author=jglover "Code") | [
Tobias Lohse](http://MrLoh.se)
| diff --git a/README.md b/README.md index e33cd78e3..f8b2bdc2f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ ## Introduction [![Build Status](https://img.shields.io/travis/gitpoint/git-point.svg?style=flat-square)](https://travis-ci.org/gitpoint/git-point) -[![All Contributors](https://img.shields.io/badge/all_contributors-58-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-59-orange.svg?style=flat-square)](#contributors) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/) [![Gitter chat](https://img.shields.io/badge/chat-on_gitter-008080.svg?style=flat-square)](https://gitter.im/git-point) diff --git a/src/components/comment-list-item.component.js b/src/components/comment-list-item.component.js index 86aef9d0c..db09efcda 100644 --- a/src/components/comment-list-item.component.js +++ b/src/components/comment-list-item.component.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { StyleSheet, View, Text, TouchableOpacity, Image } from 'react-native'; +import styled from 'styled-components/native'; import { GithubHtmlView } from 'components'; import { Icon } from 'react-native-elements'; import ActionSheet from 'react-native-actionsheet'; @@ -13,71 +13,71 @@ import moment from 'moment/min/moment-with-locales.min'; import { translate } from 'utils'; import { colors, fonts, normalize } from 'config'; -const styles = StyleSheet.create({ - container: { - paddingRight: 10, - paddingTop: 10, - backgroundColor: 'transparent', - }, - header: { - flexDirection: 'row', - marginLeft: 10, - alignItems: 'center', - }, - avatarContainer: { - backgroundColor: colors.greyLight, - borderRadius: 17, - width: 34, - height: 34, - }, - avatar: { - width: 34, - height: 34, - borderRadius: 17, - }, - titleSubtitleContainer: { - justifyContent: 'center', - flex: 1, - marginLeft: 10, - }, - dateContainer: { - flex: 0.15, - alignItems: 'flex-end', - justifyContent: 'center', - }, - linkDescription: { - ...fonts.fontPrimaryBold, - fontSize: normalize(13), - color: colors.primaryDark, - }, - date: { - color: colors.greyDark, - }, - commentContainer: { - paddingTop: 5, - marginLeft: 54, - borderBottomColor: colors.greyLight, - borderBottomWidth: 1, - }, - commentBottomPadding: { - paddingBottom: 15, - }, - commentText: { - fontSize: normalize(12), - color: colors.primaryDark, - }, - commentTextNone: { - ...fonts.fontPrimary, - color: colors.primaryDark, - fontStyle: 'italic', - }, - actionButtonIconContainer: { - paddingTop: 5, - paddingBottom: 10, - alignItems: 'flex-end', - justifyContent: 'center', - }, -}); +const Container = styled.View` + padding: 10px 10px 0 0; + background-color: transparent; +`; + +const Header = styled.View` + flex-direction: row; + margin-left: 10px; + align-items: center; +`; + +const AvatarContainer = styled.TouchableOpacity` + background-color: ${colors.greyLight}; + border-radius: 17px; + width: 34px; + height: 34px; +`; + +const Avatar = styled.Image` + border-radius: 17px; + width: 34px; + height: 34px; +`; + +const TitleSubtitleContainer = styled.View` + justify-content: center; + flex: 1; + margin-left: 10px; +`; + +const DateContainer = styled.View` + flex: 0.1; + align-items: flex-end; + justify-content: center; +`; + +const LinkDescription = styled.Text` + ${{ ...fonts.fontPrimaryBold }}; + font-size: ${normalize(13)}; + color: ${colors.primaryDark}; +`; + +const DateLabel = styled.Text` + color: ${colors.greyDark}; +`; + +const CommentContainer = styled.View` + padding-top: 5px; + margin-left: 54px; + border-bottom-color: ${colors.greyLight}; + border-bottom-width: 1px; + padding-bottom: ${props => (props.bottomPadding ? 15 : 0)}px; +`; + +const CommentTextNone = styled.Text` + ${{ ...fonts.fontPrimary }}; + color: ${colors.primaryDark}; + font-style: italic; +`; + +const ActionButtonIconContainer = styled.View` + padding: 5px 0; + align-items: flex-end; + justify-content: center; +`; const mapStateToProps = state => ({ authUser: state.auth.user, @@ -133,11 +133,10 @@ class CommentListItemComponent extends Component { comment.user && authUser.login === comment.user.login; return ( - - + +
{comment.user && ( - navigation.navigate( authUser.login === comment.user.login @@ -148,19 +147,17 @@ class CommentListItemComponent extends Component { } )} > - - + )} {comment.user && ( - - + navigation.navigate( authUser.login === comment.user.login @@ -172,36 +169,29 @@ class CommentListItemComponent extends Component { )} > {comment.user.login} - - + + )} - - - {moment(comment.created_at).fromNow()} - - - - - + + {moment(comment.created_at).fromNow()} + +
+ + {commentPresent ? ( ) : ( - + {translate('issue.main.noDescription', locale)} - + )} {isActionMenuEnabled && ( - + - + )} -
+ { @@ -225,7 +215,7 @@ class CommentListItemComponent extends Component { cancelButtonIndex={this.commentActionSheetOptions(comment).length} onPress={this.handlePress} /> -
+ ); } }