mirror of
https://github.com/wassname/talk.git
synced 2026-07-11 22:18:12 +08:00
Brings some of the components into FakeComment
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import React from 'react';
|
||||
import styles from 'coral-embed-stream/src/Comment.css';
|
||||
|
||||
import PermalinkButton from 'coral-plugin-permalinks/PermalinkButton';
|
||||
import AuthorName from 'coral-plugin-author-name/AuthorName';
|
||||
import Content from 'coral-plugin-commentcontent/CommentContent';
|
||||
import PubDate from 'coral-plugin-pubdate/PubDate';
|
||||
import {ReplyButton} from 'coral-plugin-replies';
|
||||
import FlagComment from 'coral-plugin-flags/FlagComment';
|
||||
import LikeButton from 'coral-plugin-likes/LikeButton';
|
||||
|
||||
import I18n from 'coral-framework/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
|
||||
const lang = new I18n(translations);
|
||||
|
||||
class FakeComment extends React.Component {
|
||||
constructor (props) {
|
||||
@@ -27,14 +29,13 @@ class FakeComment extends React.Component {
|
||||
<PubDate created_at={created_at} />
|
||||
<Content body={body} />
|
||||
<div className="commentActionsLeft">
|
||||
<LikeButton
|
||||
like={{}}
|
||||
id="commentID"
|
||||
postLike={()=>{return;}}
|
||||
deleteAction={()=>{return;}}
|
||||
showSignInDialog={()=>{return;}}
|
||||
currentUser={{}}
|
||||
/>
|
||||
<div className={`${'coral-plugin-likes'}-container`}>
|
||||
<button className={`${'coral-plugin-likes'}-button`}>
|
||||
<span className={`${'coral-plugin-likes'}-button-text`}>{lang.t('like')}</span>
|
||||
<i className={`${'coral-plugin-likes'}-icon material-icons`}
|
||||
aria-hidden={true}>thumb_up</i>
|
||||
</button>
|
||||
</div>;
|
||||
<ReplyButton
|
||||
onClick={() => {}}
|
||||
parentCommentId={'commentID'}
|
||||
@@ -43,8 +44,19 @@ class FakeComment extends React.Component {
|
||||
/>
|
||||
</div>
|
||||
<div className="commentActionsRight">
|
||||
<PermalinkButton articleURL={''} commentId={'commentId'} />
|
||||
<FlagComment />
|
||||
<div className="coral-plugin-permalinks-container">
|
||||
<button className="coral-plugin-permalinks-button">
|
||||
<i className="coral-plugin-permalinks-icon material-icons" aria-hidden={true}>link</i>
|
||||
{lang.t('permalink.permalink')}
|
||||
</button>
|
||||
</div>
|
||||
<div className={`${'coral-plugin-flags'}-container`}>
|
||||
<button className={`${'coral-plugin-flags'}-button`}>
|
||||
<span className={`${'coral-plugin-flags'}-button-text`}>{lang.t('report')}</span>
|
||||
<i className={`${'coral-plugin-flags'}-icon material-icons`}
|
||||
aria-hidden={true}>flag</i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -42,7 +42,12 @@ export default {
|
||||
errorCreate: 'Error when changing username',
|
||||
checkTheForm: 'Invalid Form. Please, check the fields',
|
||||
specialCharacters: 'Usernames can contain letters, numbers and _ only'
|
||||
}
|
||||
},
|
||||
'permalink': {
|
||||
permalink: 'Link'
|
||||
},
|
||||
'report': 'Report',
|
||||
'like': 'Like',
|
||||
},
|
||||
es: {
|
||||
'signIn': {
|
||||
@@ -88,5 +93,10 @@ export default {
|
||||
checkTheForm: 'Formulario Invalido. Por favor, verifica los campos',
|
||||
specialCharacters: 'Sólo pueden contener letras, números y _'
|
||||
},
|
||||
'permalink': {
|
||||
permalink: 'Enlace'
|
||||
},
|
||||
'report': 'Informe',
|
||||
'like': 'Me gusta',
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user