mirror of
https://github.com/wassname/talk.git
synced 2026-08-20 12:50:41 +08:00
Updates
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
import React from 'react';
|
||||
import styles from './AuthorName.css';
|
||||
|
||||
const AuthorName = ({comment}) =>
|
||||
<span className={styles.authorName}>
|
||||
{comment.user.username}
|
||||
</span>;
|
||||
|
||||
export default AuthorName;
|
||||
@@ -163,6 +163,7 @@
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -171,3 +172,7 @@
|
||||
.footer {
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
.username {
|
||||
margin-right: 5px;
|
||||
}
|
||||
@@ -25,7 +25,7 @@ import {EditableCommentContent} from './EditableCommentContent';
|
||||
import {getActionSummary, iPerformedThisAction, forEachError, isCommentActive, getShallowChanges} from 'coral-framework/utils';
|
||||
import t from 'coral-framework/services/i18n';
|
||||
import CommentContainer from '../containers/Comment';
|
||||
import AuthorName from './AuthorName';
|
||||
import {CommentAuthorName} from 'coral-framework/components';
|
||||
|
||||
const isStaff = (tags) => !tags.every((t) => t.tag.name !== 'STAFF');
|
||||
const hasTag = (tags, lookupTag) => !!tags.filter((t) => t.tag.name === lookupTag).length;
|
||||
@@ -438,9 +438,9 @@ export default class Comment extends React.Component {
|
||||
<div className={cn(styles.header, 'talk-stream-comment-header')}>
|
||||
|
||||
<Slot
|
||||
className={'talk-stream-comment-user-name'}
|
||||
className={cn(styles.username, 'talk-stream-comment-user-name')}
|
||||
fill="commentAuthorName"
|
||||
defaultComponent={AuthorName}
|
||||
defaultComponent={CommentAuthorName}
|
||||
queryData={queryData}
|
||||
{...slotProps}
|
||||
/>
|
||||
|
||||
@@ -238,10 +238,6 @@ body {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.talk-stream-comment-header {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
/* Tag Labels */
|
||||
|
||||
.talk-plugin-tag-label {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
.authorName {
|
||||
margin-right: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import styles from './CommentAuthorName.css';
|
||||
|
||||
const CommentAuthorName = ({comment}) =>
|
||||
<span className={styles.authorName}>
|
||||
{comment.user.username}
|
||||
</span>;
|
||||
|
||||
export default CommentAuthorName;
|
||||
@@ -1 +1,2 @@
|
||||
export {default as Slot} from './Slot';
|
||||
export {default as CommentAuthorName} from './CommentAuthorName';
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export {Slot} from 'coral-framework/components';
|
||||
export {default as ClickOutside} from 'coral-framework/components/ClickOutside';
|
||||
export {default as CommentAuthorName} from 'coral-framework/components/CommentAuthorName';
|
||||
|
||||
@@ -64,4 +64,4 @@
|
||||
|
||||
.actionsContainer {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import cn from 'classnames';
|
||||
import styles from './Comment.css';
|
||||
import {t, timeago} from 'plugin-api/beta/client/services';
|
||||
import {Slot} from 'plugin-api/beta/client/components';
|
||||
import {Slot, CommentAuthorName} from 'plugin-api/beta/client/components';
|
||||
import {Icon} from 'plugin-api/beta/client/components/ui';
|
||||
import {pluginName} from '../../package.json';
|
||||
|
||||
@@ -26,7 +26,9 @@ class Comment extends React.Component {
|
||||
<Slot
|
||||
className={cn(styles.username, `${pluginName}-comment-username`)}
|
||||
fill="commentAuthorName"
|
||||
comment={comment}
|
||||
defaultComponent={CommentAuthorName}
|
||||
queryData={{comment, asset, root}}
|
||||
data={data}
|
||||
inline
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user