mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
Rename PubDate to CommentTimestamp
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import TagLabel from 'talk-plugin-tag-label/TagLabel';
|
||||
import PubDate from 'coral-framework/components/PubDate';
|
||||
import CommentTimestamp from 'coral-framework/components/CommentTimestamp';
|
||||
import {ReplyBox, ReplyButton} from 'talk-plugin-replies';
|
||||
import {FlagComment} from 'talk-plugin-flags';
|
||||
import {can} from 'coral-framework/services/perms';
|
||||
@@ -467,7 +467,7 @@ export default class Comment extends React.Component {
|
||||
<span className={`${styles.bylineSecondary} talk-stream-comment-user-byline`} >
|
||||
<Slot
|
||||
fill="commentTimestamp"
|
||||
defaultComponent={PubDate}
|
||||
defaultComponent={CommentTimestamp}
|
||||
className={'talk-stream-comment-published-date'}
|
||||
created_at={comment.created_at}
|
||||
queryData={queryData}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.pubdate {
|
||||
.timestamp {
|
||||
display: inline-block;
|
||||
color: #696969;
|
||||
font-size: 12px;
|
||||
+5
-5
@@ -2,17 +2,17 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {timeago} from 'coral-framework/services/i18n';
|
||||
import cn from 'classnames';
|
||||
import styles from './PubDate.css';
|
||||
import styles from './CommentTimestamp.css';
|
||||
|
||||
const PubDate = ({className, created_at}) => (
|
||||
<div className={cn(className, styles.pubdate, 'talk-comment-pubdate')}>
|
||||
const CommentTimestamp = ({className, created_at}) => (
|
||||
<div className={cn(className, styles.timestamp, 'talk-comment-timestamp')}>
|
||||
{timeago(created_at)}
|
||||
</div>
|
||||
);
|
||||
|
||||
PubDate.propTypes = {
|
||||
CommentTimestamp.propTypes = {
|
||||
className: PropTypes.string,
|
||||
created_at: PropTypes.string,
|
||||
};
|
||||
|
||||
export default PubDate;
|
||||
export default CommentTimestamp;
|
||||
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import {Icon} from '../coral-ui';
|
||||
import styles from './Comment.css';
|
||||
import Slot from 'coral-framework/components/Slot';
|
||||
import PubDate from 'coral-framework/components/PubDate';
|
||||
import CommentTimestamp from 'coral-framework/components/CommentTimestamp';
|
||||
import CommentContent from '../coral-embed-stream/src/components/CommentContent';
|
||||
import cn from 'classnames';
|
||||
import {getTotalReactionsCount} from 'coral-framework/utils';
|
||||
@@ -62,7 +62,7 @@ class Comment extends React.Component {
|
||||
<Icon name="schedule" className={styles.iconDate} />
|
||||
<Slot
|
||||
fill="historyCommentTimestamp"
|
||||
defaultComponent={PubDate}
|
||||
defaultComponent={CommentTimestamp}
|
||||
className={'talk-history-comment-published-date'}
|
||||
created_at={comment.created_at}
|
||||
data={data}
|
||||
|
||||
@@ -3,4 +3,4 @@ export {default as ClickOutside} from 'coral-framework/components/ClickOutside';
|
||||
export {default as IfSlotIsEmpty} from 'coral-framework/components/IfSlotIsEmpty';
|
||||
export {default as IfSlotIsNotEmpty} from 'coral-framework/components/IfSlotIsNotEmpty';
|
||||
export {default as CommentAuthorName} from 'coral-framework/components/CommentAuthorName';
|
||||
export {default as PubDate} from 'coral-framework/components/PubDate';
|
||||
export {default as CommentTimestamp} from 'coral-framework/components/CommentTimestamp';
|
||||
|
||||
@@ -3,14 +3,14 @@ import t from 'coral-framework/services/i18n';
|
||||
import {ReplyButton} from 'talk-plugin-replies';
|
||||
import styles from './FakeComment.css';
|
||||
import {Icon} from 'plugin-api/beta/client/components/ui';
|
||||
import {PubDate} from 'plugin-api/beta/client/components';
|
||||
import {CommentTimestamp} from 'plugin-api/beta/client/components';
|
||||
|
||||
export const FakeComment = ({username, created_at, body}) => (
|
||||
<div className={styles.root}>
|
||||
<span className={styles.authorName}>
|
||||
{username}
|
||||
</span>
|
||||
<PubDate created_at={created_at} />
|
||||
<CommentTimestamp created_at={created_at} />
|
||||
<div className={styles.body}>
|
||||
{body}
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import cn from 'classnames';
|
||||
import styles from './Comment.css';
|
||||
import {t} from 'plugin-api/beta/client/services';
|
||||
import {Slot, CommentAuthorName, PubDate} from 'plugin-api/beta/client/components';
|
||||
import {Slot, CommentAuthorName, CommentTimestamp} from 'plugin-api/beta/client/components';
|
||||
import {Icon} from 'plugin-api/beta/client/components/ui';
|
||||
import {pluginName} from '../../package.json';
|
||||
import FeaturedButton from '../containers/FeaturedButton';
|
||||
@@ -36,8 +36,8 @@ class Comment extends React.Component {
|
||||
|
||||
<Slot
|
||||
fill="commentTimestamp"
|
||||
defaultComponent={PubDate}
|
||||
className={cn(styles.timestamp, `${pluginName}-comment-timeago`)}
|
||||
defaultComponent={CommentTimestamp}
|
||||
className={cn(styles.timestamp, `${pluginName}-comment-timestamp`)}
|
||||
created_at={comment.created_at}
|
||||
data={data}
|
||||
queryData={queryData}
|
||||
|
||||
Reference in New Issue
Block a user