Merge branch 'release-3.8'
Этот коммит содержится в:
@@ -182,18 +182,15 @@ export default class RhsRootPost extends React.Component {
|
||||
const mattermostLogo = Constants.MATTERMOST_ICON_SVG;
|
||||
var timestamp = user ? user.last_picture_update : 0;
|
||||
var channel = ChannelStore.get(post.channel_id);
|
||||
let canReact = false;
|
||||
const flagIcon = Constants.FLAG_ICON_SVG;
|
||||
if (post.state !== Constants.POST_FAILED &&
|
||||
post.state !== Constants.POST_LOADING &&
|
||||
!Utils.isPostEphemeral(post) &&
|
||||
Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMOJI_PICKER_PREVIEW)) {
|
||||
canReact = true;
|
||||
}
|
||||
|
||||
this.canDelete = PostUtils.canDeletePost(post);
|
||||
this.canEdit = PostUtils.canEditPost(post, this.editDisableAction);
|
||||
|
||||
const isEphemeral = Utils.isPostEphemeral(post);
|
||||
const isPending = post.state === Constants.POST_FAILED || post.state === Constants.POST_LOADING;
|
||||
const isSystemMessage = PostUtils.isSystemMessage(post);
|
||||
|
||||
var type = 'Post';
|
||||
if (post.root_id.length > 0) {
|
||||
type = 'Comment';
|
||||
@@ -205,7 +202,7 @@ export default class RhsRootPost extends React.Component {
|
||||
}
|
||||
|
||||
var systemMessageClass = '';
|
||||
if (PostUtils.isSystemMessage(post)) {
|
||||
if (isSystemMessage) {
|
||||
systemMessageClass = 'post--system';
|
||||
}
|
||||
|
||||
@@ -226,7 +223,7 @@ export default class RhsRootPost extends React.Component {
|
||||
let react;
|
||||
let reactOverlay;
|
||||
|
||||
if (canReact) {
|
||||
if (!isEphemeral && !isPending && !isSystemMessage && Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMOJI_PICKER_PREVIEW)) {
|
||||
react = (
|
||||
<span>
|
||||
<a
|
||||
@@ -298,57 +295,59 @@ export default class RhsRootPost extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='rhs-root-permalink'
|
||||
role='presentation'
|
||||
>
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.handlePermalink}
|
||||
if (!isSystemMessage) {
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='rhs-root-permalink'
|
||||
role='presentation'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='rhs_root.permalink'
|
||||
defaultMessage='Permalink'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.handlePermalink}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='rhs_root.permalink'
|
||||
defaultMessage='Permalink'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
|
||||
if (post.is_pinned) {
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='rhs-root-unpin'
|
||||
role='presentation'
|
||||
>
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.unpinPost}
|
||||
if (post.is_pinned) {
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='rhs-root-unpin'
|
||||
role='presentation'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='rhs_root.unpin'
|
||||
defaultMessage='Un-pin from channel'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
} else {
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='rhs-root-pin'
|
||||
role='presentation'
|
||||
>
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.pinPost}
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.unpinPost}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='rhs_root.unpin'
|
||||
defaultMessage='Un-pin from channel'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
} else {
|
||||
dropdownContents.push(
|
||||
<li
|
||||
key='rhs-root-pin'
|
||||
role='presentation'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='rhs_root.pin'
|
||||
defaultMessage='Pin to channel'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.pinPost}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='rhs_root.pin'
|
||||
defaultMessage='Pin to channel'
|
||||
/>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.canDelete) {
|
||||
@@ -443,7 +442,7 @@ export default class RhsRootPost extends React.Component {
|
||||
}
|
||||
|
||||
botIndicator = <li className='col col__name bot-indicator'>{'BOT'}</li>;
|
||||
} else if (PostUtils.isSystemMessage(post)) {
|
||||
} else if (isSystemMessage) {
|
||||
userProfile = (
|
||||
<UserProfile
|
||||
user={{}}
|
||||
@@ -485,7 +484,7 @@ export default class RhsRootPost extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
if (PostUtils.isSystemMessage(post)) {
|
||||
if (isSystemMessage) {
|
||||
profilePic = (
|
||||
<span
|
||||
className='icon'
|
||||
|
||||
Ссылка в новой задаче
Block a user