From 99952f01525644ebc7333b32f28b035995c6dbdb Mon Sep 17 00:00:00 2001 From: Eric Sethna Date: Thu, 6 Apr 2017 11:10:55 -0600 Subject: remove beta on high availability --- webapp/components/admin_console/cluster_settings.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webapp/components') diff --git a/webapp/components/admin_console/cluster_settings.jsx b/webapp/components/admin_console/cluster_settings.jsx index 31634d0bd..d3768ec25 100644 --- a/webapp/components/admin_console/cluster_settings.jsx +++ b/webapp/components/admin_console/cluster_settings.jsx @@ -53,7 +53,7 @@ export default class ClusterSettings extends AdminSettings { return ( ); } -- cgit v1.2.3-1-g7c22 From 1901adffa5f84bb818935bd737f1341c9eb725d3 Mon Sep 17 00:00:00 2001 From: Eric Sethna Date: Fri, 7 Apr 2017 04:26:35 -0400 Subject: [PLT-6232] Remove "(Beta)" tag from HA in System Console (#6008) --- webapp/components/admin_console/admin_sidebar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webapp/components') diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx index a27891eb3..aa7b970e0 100644 --- a/webapp/components/admin_console/admin_sidebar.jsx +++ b/webapp/components/admin_console/admin_sidebar.jsx @@ -96,7 +96,7 @@ export default class AdminSidebar extends React.Component { title={ } /> -- cgit v1.2.3-1-g7c22 From a56310ba8f4fb7d8de7bed2a6f10c8c603558311 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 7 Apr 2017 14:18:46 -0400 Subject: PLT-6200 Fixed file upload button not working on iOS (#6013) --- webapp/components/file_upload.jsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/file_upload.jsx b/webapp/components/file_upload.jsx index d97b1ed3b..a0e7f5296 100644 --- a/webapp/components/file_upload.jsx +++ b/webapp/components/file_upload.jsx @@ -350,11 +350,16 @@ class FileUpload extends React.Component { const channelId = this.props.channelId || ChannelStore.getCurrentId(); const uploadsRemaining = Constants.MAX_UPLOAD_FILES - this.props.getFileCount(channelId); - const emojiSpan = (); - const filestyle = {visibility: 'hidden'}; + + let emojiSpan; + if (this.props.emojiEnabled) { + emojiSpan = ( + + ); + } return (
this.refs.fileInput.click()} /> 0 ? this.props.onClick : this.handleMaxUploadReached} multiple={multiple} accept={accept} />
- {this.props.emojiEnabled ? emojiSpan : ''} + {emojiSpan}
); } -- cgit v1.2.3-1-g7c22 From 9318ffcdf3caf77d66e0b9fc7967d9de9ea99b4b Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 7 Apr 2017 14:19:37 -0400 Subject: PLT-6263 Updated timing and text of Site URL warning bar (#6016) --- webapp/components/error_bar.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/error_bar.jsx b/webapp/components/error_bar.jsx index 146b4955e..341f0efb4 100644 --- a/webapp/components/error_bar.jsx +++ b/webapp/components/error_bar.jsx @@ -49,12 +49,12 @@ export default class ErrorBar extends React.Component { const errorIgnored = ErrorStore.getIgnoreNotification(); if (!errorIgnored) { - if (global.mm_config.SendEmailNotifications === 'false') { - ErrorStore.storeLastError({notification: true, message: Utils.localizeMessage('error_bar.preview_mode', 'Preview Mode: Email notifications have not been configured')}); - return; - } else if (isSystemAdmin && global.mm_config.SiteURL === '') { + if (isSystemAdmin && global.mm_config.SiteURL === '') { ErrorStore.storeLastError({notification: true, message: SITE_URL_ERROR}); return; + } else if (global.mm_config.SendEmailNotifications === 'false') { + ErrorStore.storeLastError({notification: true, message: Utils.localizeMessage('error_bar.preview_mode', 'Preview Mode: Email notifications have not been configured')}); + return; } } @@ -178,10 +178,10 @@ export default class ErrorBar extends React.Component { let defaultMessage; if (global.mm_config.EnableSignUpWithGitLab === 'true') { id = 'error_bar.site_url_gitlab'; - defaultMessage = '{docsLink} is now a required setting. Please configure it in the System Console or in gitlab.rb if you\'re using GitLab Mattermost.'; + defaultMessage = 'Please configure your {docsLink} in the System Console or in gitlab.rb if you\'re using GitLab Mattermost.'; } else { id = 'error_bar.site_url'; - defaultMessage = '{docsLink} is now a required setting. Please configure it in {link}.'; + defaultMessage = 'Please configure your {docsLink} in the System Console.'; } message = ( -- cgit v1.2.3-1-g7c22 From 63c122bc028198704485e00cc47c7ba2218e9708 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 7 Apr 2017 14:21:58 -0400 Subject: PLT-6201/PLT-6220 Don't show pin or reaction options for system messages (#6010) * PLT-6220 Removed ability to react to system messages * PLT-6201 Removed ability to pin system messages --- .../post_view/components/post_header.jsx | 1 - .../components/post_view/components/post_info.jsx | 167 ++++++++++----------- webapp/components/rhs_comment.jsx | 105 +++++++------ webapp/components/rhs_root_post.jsx | 97 ++++++------ 4 files changed, 181 insertions(+), 189 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/post_view/components/post_header.jsx b/webapp/components/post_view/components/post_header.jsx index 5e0a8a5a4..3b5df47d5 100644 --- a/webapp/components/post_view/components/post_header.jsx +++ b/webapp/components/post_view/components/post_header.jsx @@ -82,7 +82,6 @@ export default class PostHeader extends React.Component { commentCount={this.props.commentCount} handleCommentClick={this.props.handleCommentClick} handleDropdownOpened={this.props.handleDropdownOpened} - allowReply={!isSystemMessage} isLastComment={this.props.isLastComment} sameUser={this.props.sameUser} currentUser={this.props.currentUser} diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index 1da3ecd24..509809c8c 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -63,13 +63,8 @@ export default class PostInfo extends React.Component { $('#post_dropdown' + this.props.post.id).on('hidden.bs.dropdown', () => this.props.handleDropdownOpened(false)); } - createDropdown() { + createDropdown(isSystemMessage) { const post = this.props.post; - const isSystemMessage = PostUtils.isSystemMessage(post); - - if (post.state === Constants.POST_FAILED || post.state === Constants.POST_LOADING) { - return ''; - } var type = 'Post'; if (post.root_id && post.root_id.length > 0) { @@ -82,7 +77,7 @@ export default class PostInfo extends React.Component { dataComments = this.props.commentCount; } - if (this.props.allowReply) { + if (!isSystemMessage) { dropdownContents.push(
  • ); - } - if (this.props.post.is_pinned) { - dropdownContents.push( -
  • - - - -
  • - ); - } else { - dropdownContents.push( -
  • - + + +
  • + ); + } else { + dropdownContents.push( +
  • - - -
  • - ); + + + + + ); + } } if (this.canDelete) { @@ -331,21 +326,28 @@ export default class PostInfo extends React.Component { render() { var post = this.props.post; - var comments = ''; - var showCommentClass = ''; - var commentCountText = this.props.commentCount; const flagIcon = Constants.FLAG_ICON_SVG; this.canDelete = PostUtils.canDeletePost(post); this.canEdit = PostUtils.canEditPost(post, this.editDisableAction); - if (this.props.commentCount >= 1) { - showCommentClass = ' icon--show'; - } else { - commentCountText = ''; - } + const isEphemeral = Utils.isPostEphemeral(post); + const isPending = post.state === Constants.POST_FAILED || post.state === Constants.POST_LOADING; + const isSystemMessage = PostUtils.isSystemMessage(post); + + let comments = null; + let react = null; + if (!isEphemeral && !isPending && !isSystemMessage) { + let showCommentClass; + let commentCountText; + if (this.props.commentCount >= 1) { + showCommentClass = ' icon--show'; + commentCountText = this.props.commentCount; + } else { + showCommentClass = ''; + commentCountText = ''; + } - if (post.state !== Constants.POST_FAILED && post.state !== Constants.POST_LOADING && !Utils.isPostEphemeral(post) && this.props.allowReply) { comments = ( ); - } - let react; - if (post.state !== Constants.POST_FAILED && - post.state !== Constants.POST_LOADING && - !Utils.isPostEphemeral(post) && - Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMOJI_PICKER_PREVIEW)) { - react = ( - - this.setState({showEmojiPicker: false})} - target={() => ReactDOM.findDOMNode(this.refs['reactIcon_' + post.id])} + if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMOJI_PICKER_PREVIEW)) { + react = ( + + this.setState({showEmojiPicker: false})} + target={() => ReactDOM.findDOMNode(this.refs['reactIcon_' + post.id])} - > - + - - - - + /> + + + + - ); + ); + } } let options; - if (Utils.isPostEphemeral(post)) { + if (isEphemeral) { options = (
  • {this.createRemovePostButton()}
  • ); - } else { - const dropdown = this.createDropdown(); + } else if (!isPending) { + const dropdown = this.createDropdown(isSystemMessage); + if (dropdown) { options = (
  • @@ -461,7 +460,7 @@ export default class PostInfo extends React.Component { } let flagTrigger; - if (!Utils.isPostEphemeral(post)) { + if (isEphemeral) { flagTrigger = ( - - - -
  • - ); - - if (post.is_pinned) { + if (!isSystemMessage) { dropdownContents.push(
  • ); - } else { - dropdownContents.push( -
  • - - - -
  • - ); + + + + + ); + } else { + dropdownContents.push( +
  • + + + +
  • + ); + } } if (this.canDelete) { @@ -362,15 +364,10 @@ export default class RhsComment extends React.Component { const post = this.props.post; const flagIcon = Constants.FLAG_ICON_SVG; const mattermostLogo = Constants.MATTERMOST_ICON_SVG; - const isSystemMessage = PostUtils.isSystemMessage(post); - let canReact = false; - 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; - } + const isEphemeral = Utils.isPostEphemeral(post); + const isPending = post.state === Constants.POST_FAILED || post.state === Constants.POST_LOADING; + const isSystemMessage = PostUtils.isSystemMessage(post); var currentUserCss = ''; if (this.props.currentUser.id === post.user_id) { @@ -412,7 +409,7 @@ export default class RhsComment extends React.Component { } botIndicator =
  • {'BOT'}
  • ; - } else if (PostUtils.isSystemMessage(post)) { + } else if (isSystemMessage) { userProfile = ( {this.createRemovePostButton()} ); - } else if (!PostUtils.isSystemMessage(post)) { + } else if (!isSystemMessage) { options = (
  • {reactOverlay} - {this.createDropdown()} + {this.createDropdown(isSystemMessage)} {react}
  • ); diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index b298853d8..9a9f83f0c 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -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 = (
    - - - - - ); - - if (post.is_pinned) { + if (!isSystemMessage) { dropdownContents.push(
  • ); - } else { - dropdownContents.push( -
  • - - - -
  • - ); + + + + + ); + } else { + dropdownContents.push( +
  • + + + +
  • + ); + } } if (this.canDelete) { @@ -443,7 +442,7 @@ export default class RhsRootPost extends React.Component { } botIndicator =
  • {'BOT'}
  • ; - } else if (PostUtils.isSystemMessage(post)) { + } else if (isSystemMessage) { userProfile = ( Date: Mon, 10 Apr 2017 17:21:54 +0100 Subject: PLT-6253: Handle demote self from Team Admin. (#6056) --- webapp/components/team_members_dropdown.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'webapp/components') diff --git a/webapp/components/team_members_dropdown.jsx b/webapp/components/team_members_dropdown.jsx index f2f7727a3..7d0b645cd 100644 --- a/webapp/components/team_members_dropdown.jsx +++ b/webapp/components/team_members_dropdown.jsx @@ -8,7 +8,7 @@ import UserStore from 'stores/user_store.jsx'; import ChannelStore from 'stores/channel_store.jsx'; import {removeUserFromTeam, updateTeamMemberRoles} from 'actions/team_actions.jsx'; -import {updateActive} from 'actions/user_actions.jsx'; +import {loadMyTeamMembers, updateActive} from 'actions/user_actions.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; import * as Utils from 'utils/utils.jsx'; @@ -49,6 +49,10 @@ export default class TeamMembersDropdown extends React.Component { 'team_user', () => { AsyncClient.getUser(this.props.user.id); + + if (this.props.user.id === me.id) { + loadMyTeamMembers(); + } }, (err) => { this.setState({serverError: err.message}); -- cgit v1.2.3-1-g7c22 From b3305d82eb92c2b9d7cf57f6c61ea79b18248228 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 12 Apr 2017 05:39:49 -0400 Subject: PLT-6300 Fixed flag icons not appearing (#6078) --- webapp/components/post_view/components/post_info.jsx | 2 +- webapp/components/rhs_comment.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index 509809c8c..b76e3aed0 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -460,7 +460,7 @@ export default class PostInfo extends React.Component { } let flagTrigger; - if (isEphemeral) { + if (!isEphemeral) { flagTrigger = ( Date: Wed, 12 Apr 2017 05:40:21 -0400 Subject: PLT-6294 Fixed iOS not scrolling to bottom of post list (#6077) --- webapp/components/post_view/components/post_list.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx index a5369454d..496f39334 100644 --- a/webapp/components/post_view/components/post_list.jsx +++ b/webapp/components/post_view/components/post_list.jsx @@ -489,8 +489,14 @@ export default class PostList extends React.Component { } scrollToBottomAnimated() { - var postList = $(this.refs.postlist); - postList.animate({scrollTop: this.refs.postlist.scrollHeight}, '500'); + if (UserAgent.isIos()) { + // JQuery animation doesn't work on iOS + this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; + } else { + var postList = $(this.refs.postlist); + + postList.animate({scrollTop: this.refs.postlist.scrollHeight}, '500'); + } } getArchivesIntroMessage() { -- cgit v1.2.3-1-g7c22