-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from CaptainFact/staging
Release 0.8.14
- Loading branch information
Showing
105 changed files
with
2,971 additions
and
2,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import ApolloClient from 'apollo-boost' | ||
import { GRAPHQL_API_URL } from '../config' | ||
|
||
|
||
const GraphQLClient = new ApolloClient({ | ||
uri: GRAPHQL_API_URL | ||
}) | ||
|
||
export default GraphQLClient |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
import classNames from 'classnames' | ||
import Button from '../Utils/Button' | ||
import { Icon } from '../Utils/Icon' | ||
|
||
|
||
const CommentAction = ({className, onClick, title, iconName}) => ( | ||
<Button | ||
className={classNames('is-inverted is-primary', className)} | ||
onClick={onClick} | ||
> | ||
<Icon name={iconName}/> | ||
<span>{title}</span> | ||
</Button> | ||
) | ||
|
||
export default CommentAction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react' | ||
import { translate } from 'react-i18next' | ||
|
||
import OwnCommentActions from './OwnCommentActions' | ||
import OtherCommentActions from './OtherCommentActions' | ||
import CommentAction from './CommentAction' | ||
|
||
const CommentActions = ({ | ||
t, | ||
isOwnComment, | ||
nbReplies, | ||
repliesCollapsed, | ||
handleReply, | ||
handleDelete, | ||
handleFlag, | ||
handleToggleShowReplies | ||
}) => ( | ||
<nav className="comment-actions"> | ||
{ isOwnComment | ||
? ( | ||
<OwnCommentActions | ||
handleAddToThread={handleReply} | ||
handleDelete={handleDelete} | ||
/> | ||
) : ( | ||
<OtherCommentActions | ||
handleReply={handleReply} | ||
handleFlag={handleFlag} | ||
/> | ||
) | ||
} | ||
{nbReplies !== 0 && ( | ||
<CommentAction | ||
title={t('comment.replies', { | ||
context: repliesCollapsed ? 'show' : 'hide', | ||
count: nbReplies | ||
})} | ||
iconName={repliesCollapsed ? 'eye' : 'eye-slash'} | ||
onClick={handleToggleShowReplies} | ||
/> | ||
)} | ||
</nav> | ||
) | ||
|
||
export default translate('videoDebate')(CommentActions) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react' | ||
import Tag from '../Utils/Tag' | ||
import { Source } from './Source' | ||
|
||
const COLLAPSE_CONTENT_ABOVE_NESTING = 6 | ||
|
||
const CommentContent = ({ | ||
comment: {source, text}, | ||
nesting, | ||
replyingTo, | ||
richMedias | ||
}) => { | ||
const isCollapsed = replyingTo && nesting > COLLAPSE_CONTENT_ABOVE_NESTING | ||
const shouldRenderTextBlock = text || isCollapsed | ||
|
||
return ( | ||
<div> | ||
{shouldRenderTextBlock && ( | ||
<div className="comment-text"> | ||
{isCollapsed && ( | ||
<Tag style={{marginRight: 5}}>@{replyingTo.username}</Tag> | ||
)} | ||
{ text } | ||
</div> | ||
)} | ||
{source && <Source withoutPlayer={!richMedias} source={source}/>} | ||
</div> | ||
) | ||
} | ||
|
||
export default CommentContent |
Oops, something went wrong.