summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/about_build_modal.jsx2
-rw-r--r--webapp/components/admin_console/service_settings.jsx5
-rw-r--r--webapp/components/channel_header.jsx2
-rw-r--r--webapp/components/logged_in.jsx5
-rw-r--r--webapp/components/msg_typing.jsx12
-rw-r--r--webapp/components/popover_list_members.jsx9
-rw-r--r--webapp/components/post.jsx2
-rw-r--r--webapp/components/posts_view.jsx22
-rw-r--r--webapp/components/rhs_root_post.jsx2
-rw-r--r--webapp/components/search_results_item.jsx3
-rw-r--r--webapp/sass/components/_modal.scss32
-rw-r--r--webapp/sass/layout/_post.scss1
-rw-r--r--webapp/sass/routes/_settings.scss32
-rw-r--r--webapp/stores/post_store.jsx2
-rw-r--r--webapp/utils/constants.jsx4
15 files changed, 68 insertions, 67 deletions
diff --git a/webapp/components/about_build_modal.jsx b/webapp/components/about_build_modal.jsx
index e73d842d0..a47225f7e 100644
--- a/webapp/components/about_build_modal.jsx
+++ b/webapp/components/about_build_modal.jsx
@@ -71,7 +71,7 @@ export default class AboutBuildModal extends React.Component {
</Modal.Title>
</Modal.Header>
<Modal.Body>
- <h4>{'Mattermost'} {title}</h4>
+ <h4 className='padding-bottom x2'>{'Mattermost'} {title}</h4>
{licensee}
<div className='row form-group'>
<div className='col-sm-3 info__label'>
diff --git a/webapp/components/admin_console/service_settings.jsx b/webapp/components/admin_console/service_settings.jsx
index 41ea5ea34..c72c97326 100644
--- a/webapp/components/admin_console/service_settings.jsx
+++ b/webapp/components/admin_console/service_settings.jsx
@@ -84,10 +84,13 @@ class ServiceSettings extends React.Component {
config.ServiceSettings.EnableDeveloper = ReactDOM.findDOMNode(this.refs.EnableDeveloper).checked;
config.ServiceSettings.EnableSecurityFixAlert = ReactDOM.findDOMNode(this.refs.EnableSecurityFixAlert).checked;
config.ServiceSettings.EnableInsecureOutgoingConnections = ReactDOM.findDOMNode(this.refs.EnableInsecureOutgoingConnections).checked;
- config.ServiceSettings.EnableMultifactorAuthentication = ReactDOM.findDOMNode(this.refs.EnableMultifactorAuthentication).checked;
config.ServiceSettings.EnableCommands = ReactDOM.findDOMNode(this.refs.EnableCommands).checked;
config.ServiceSettings.EnableOnlyAdminIntegrations = ReactDOM.findDOMNode(this.refs.EnableOnlyAdminIntegrations).checked;
+ if (this.refs.EnablMultifactorAuthentication) {
+ config.ServiceSettings.EnableMultifactorAuthentication = ReactDOM.findDOMNode(this.refs.EnableMultifactorAuthentication).checked;
+ }
+
//config.ServiceSettings.EnableOAuthServiceProvider = ReactDOM.findDOMNode(this.refs.EnableOAuthServiceProvider).checked;
var MaximumLoginAttempts = DefaultMaximumLoginAttempts;
diff --git a/webapp/components/channel_header.jsx b/webapp/components/channel_header.jsx
index 6bb466c3e..482aabc01 100644
--- a/webapp/components/channel_header.jsx
+++ b/webapp/components/channel_header.jsx
@@ -216,9 +216,9 @@ export default class ChannelHeader extends React.Component {
if (!isDirect) {
popoverListMembers = (
<PopoverListMembers
+ channel={channel}
members={this.state.users}
memberCount={this.state.userCount}
- channelId={channel.id}
/>
);
}
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx
index a4fd3a9ce..0c4571083 100644
--- a/webapp/components/logged_in.jsx
+++ b/webapp/components/logged_in.jsx
@@ -276,7 +276,10 @@ LoggedIn.defaultProps = {
};
LoggedIn.propTypes = {
- children: React.PropTypes.arrayOf(React.PropTypes.element),
+ children: React.PropTypes.oneOfType([
+ React.PropTypes.arrayOf(React.PropTypes.element),
+ React.PropTypes.element
+ ]),
navbar: React.PropTypes.element,
sidebar: React.PropTypes.element,
center: React.PropTypes.element,
diff --git a/webapp/components/msg_typing.jsx b/webapp/components/msg_typing.jsx
index b2d414287..631eea78d 100644
--- a/webapp/components/msg_typing.jsx
+++ b/webapp/components/msg_typing.jsx
@@ -40,13 +40,15 @@ class MsgTyping extends React.Component {
}
updateTypingText(typingUsers) {
- if (!typingUsers) {
- return;
+ let text = '';
+ let users = {};
+ let numUsers = 0;
+ if (typingUsers) {
+ users = Object.keys(typingUsers);
+ numUsers = users.length;
}
- const users = Object.keys(typingUsers);
- let text = '';
- switch (users.length) {
+ switch (numUsers) {
case 0:
text = '';
break;
diff --git a/webapp/components/popover_list_members.jsx b/webapp/components/popover_list_members.jsx
index cd583e4c3..226a1889c 100644
--- a/webapp/components/popover_list_members.jsx
+++ b/webapp/components/popover_list_members.jsx
@@ -9,8 +9,6 @@ import * as Utils from 'utils/utils.jsx';
import * as GlobalActions from 'action_creators/global_actions.jsx';
import Constants from 'utils/constants.jsx';
-import ChannelStore from 'stores/channel_store.jsx';
-
import {FormattedMessage} from 'react-intl';
import React from 'react';
@@ -57,7 +55,6 @@ export default class PopoverListMembers extends React.Component {
const members = this.props.members;
const teamMembers = UserStore.getProfilesUsernameMap();
const currentUserId = UserStore.getCurrentId();
- const ch = ChannelStore.getCurrent();
if (members && teamMembers) {
members.sort((a, b) => {
@@ -69,7 +66,7 @@ export default class PopoverListMembers extends React.Component {
members.forEach((m, i) => {
let button = '';
- if (currentUserId !== m.id && ch.type !== 'D') {
+ if (currentUserId !== m.id && this.props.channel.type !== 'D') {
button = (
<a
href='#'
@@ -177,7 +174,7 @@ export default class PopoverListMembers extends React.Component {
}
PopoverListMembers.propTypes = {
+ channel: React.PropTypes.object.isRequired,
members: React.PropTypes.array.isRequired,
- memberCount: React.PropTypes.number,
- channelId: React.PropTypes.string.isRequired
+ memberCount: React.PropTypes.number
};
diff --git a/webapp/components/post.jsx b/webapp/components/post.jsx
index f2818188a..30c47ee22 100644
--- a/webapp/components/post.jsx
+++ b/webapp/components/post.jsx
@@ -188,6 +188,8 @@ export default class Post extends React.Component {
if (post.props && post.props.from_webhook && global.window.mm_config.EnablePostIconOverride === 'true') {
if (post.props.override_icon_url) {
src = post.props.override_icon_url;
+ } else {
+ src = Constants.DEFAULT_WEBHOOK_LOGO;
}
} else if (Utils.isSystemMessage(post)) {
src = Constants.SYSTEM_MESSAGE_PROFILE_IMAGE;
diff --git a/webapp/components/posts_view.jsx b/webapp/components/posts_view.jsx
index 647c7f086..917411549 100644
--- a/webapp/components/posts_view.jsx
+++ b/webapp/components/posts_view.jsx
@@ -173,24 +173,15 @@ export default class PostsView extends React.Component {
const postFromWebhook = Boolean(post.props && post.props.from_webhook);
const prevPostFromWebhook = Boolean(prevPost.props && prevPost.props.from_webhook);
const prevPostUserId = Utils.isSystemMessage(prevPost) ? '' : prevPost.user_id;
- let prevWebhookName = '';
- if (prevPost.props && prevPost.props.override_username) {
- prevWebhookName = prevPost.props.override_username;
- }
- let curWebhookName = '';
- if (post.props && post.props.override_username) {
- curWebhookName = post.props.override_username;
- }
// consider posts from the same user if:
// the previous post was made by the same user as the current post,
// the previous post was made within 5 minutes of the current post,
- // the previous post and current post are both from webhooks or both not,
- // the previous post and current post have the same webhook usernames
+ // the current post is not from a webhook
+ // the previous post is not from a webhook
if (prevPostUserId === postUserId &&
post.create_at - prevPost.create_at <= 1000 * 60 * 5 &&
- postFromWebhook === prevPostFromWebhook &&
- prevWebhookName === curWebhookName) {
+ !postFromWebhook && !prevPostFromWebhook) {
sameUser = true;
}
@@ -213,13 +204,11 @@ export default class PostsView extends React.Component {
// the previous post was made by the same user as the current post,
// the previous post is not a comment,
// the current post is not a comment,
- // the previous post and current post are both from webhooks or both not,
- // the previous post and current post have the same webhook usernames
+ // the current post is not from a webhook
if (prevPostUserId === postUserId &&
!prevPostIsComment &&
!postIsComment &&
- postFromWebhook === prevPostFromWebhook &&
- prevWebhookName === curWebhookName) {
+ !postFromWebhook) {
hideProfilePic = true;
}
}
@@ -385,6 +374,7 @@ export default class PostsView extends React.Component {
componentWillUnmount() {
window.removeEventListener('resize', this.handleResize);
this.scrollStopAction.cancel();
+ PreferenceStore.removeChangeListener(this.updateState);
}
componentDidUpdate() {
if (this.props.postList != null) {
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx
index 26b392aa1..7a7c5f692 100644
--- a/webapp/components/rhs_root_post.jsx
+++ b/webapp/components/rhs_root_post.jsx
@@ -217,6 +217,8 @@ export default class RhsRootPost extends React.Component {
if (post.props && post.props.from_webhook && global.window.mm_config.EnablePostIconOverride === 'true') {
if (post.props.override_icon_url) {
src = post.props.override_icon_url;
+ } else {
+ src = Constants.DEFAULT_WEBHOOK_LOGO;
}
} else if (Utils.isSystemMessage(post)) {
src = Constants.SYSTEM_MESSAGE_PROFILE_IMAGE;
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index 219aa7093..75cbcb2a0 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -5,7 +5,6 @@ import UserStore from 'stores/user_store.jsx';
import UserProfile from './user_profile.jsx';
import * as GlobalActions from 'action_creators/global_actions.jsx';
import * as TextFormatting from 'utils/text_formatting.jsx';
-import * as Utils from 'utils/utils.jsx';
import Constants from 'utils/constants.jsx';
@@ -88,7 +87,7 @@ export default class SearchResultsItem extends React.Component {
</li>
<li>
<Link
- to={Utils.getTeamURLFromAddressBar() + '/pl/' + this.props.post.id}
+ to={'/' + window.location.pathname.split('/')[1] + '/pl/' + this.props.post.id}
className='search-item__jump'
>
<FormattedMessage
diff --git a/webapp/sass/components/_modal.scss b/webapp/sass/components/_modal.scss
index 4e2049857..2348788f4 100644
--- a/webapp/sass/components/_modal.scss
+++ b/webapp/sass/components/_modal.scss
@@ -39,6 +39,38 @@
}
}
+ .padding-top {
+ padding-top: 7px;
+
+ &.x2 {
+ padding-top: 14px;
+ }
+
+ &.x3 {
+ padding-top: 21px;
+ }
+ }
+
+ .padding-bottom {
+ padding-bottom: 7px;
+
+ &.x2 {
+ padding-bottom: 14px;
+ }
+
+ &.x3 {
+ padding-bottom: 21px;
+ }
+
+ .control-label {
+ font-weight: 600;
+
+ &.text-left {
+ text-align: left;
+ }
+ }
+ }
+
.custom-textarea {
border-color: $light-gray;
color: inherit;
diff --git a/webapp/sass/layout/_post.scss b/webapp/sass/layout/_post.scss
index f29448bde..e2bce5562 100644
--- a/webapp/sass/layout/_post.scss
+++ b/webapp/sass/layout/_post.scss
@@ -377,6 +377,7 @@ body.ios {
}
.custom-textarea {
+ bottom: 0;
line-height: 1.5;
max-height: 162px !important;
padding-right: 28px;
diff --git a/webapp/sass/routes/_settings.scss b/webapp/sass/routes/_settings.scss
index 1c3f2e308..1551e5f4d 100644
--- a/webapp/sass/routes/_settings.scss
+++ b/webapp/sass/routes/_settings.scss
@@ -51,38 +51,6 @@
padding-left: 0;
}
- .padding-top {
- padding-top: 7px;
-
- &.x2 {
- padding-top: 14px;
- }
-
- &.x3 {
- padding-top: 21px;
- }
- }
-
- .padding-bottom {
- padding-bottom: 7px;
-
- &.x2 {
- padding-bottom: 14px;
- }
-
- &.x3 {
- padding-bottom: 21px;
- }
-
- .control-label {
- font-weight: 600;
-
- &.text-left {
- text-align: left;
- }
- }
- }
-
.profile-img {
height: 128px;
width: 128px;
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx
index 36393f5cd..f328ca306 100644
--- a/webapp/stores/post_store.jsx
+++ b/webapp/stores/post_store.jsx
@@ -531,8 +531,8 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
switch (action.type) {
case ActionTypes.RECEIVED_POSTS: {
const id = PostStore.currentFocusedPostId == null ? action.id : PostStore.currentFocusedPostId;
- PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
PostStore.storePosts(id, makePostListNonNull(action.post_list));
+ PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
PostStore.emitChange();
break;
}
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index 421a46860..68df771f9 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -14,6 +14,7 @@ import patchIcon from 'images/icons/patch.png';
import genericIcon from 'images/icons/generic.png';
import logoImage from 'images/logo_compact.png';
+import logoWebhook from 'images/webhook_icon.jpg';
import solarizedDarkCSS from '!!file?name=files/code_themes/[hash].[ext]!highlight.js/styles/solarized-dark.css';
import solarizedDarkIcon from 'images/themes/code_themes/solarized-dark.png';
@@ -617,5 +618,6 @@ export default {
MAX_PASSWORD_LENGTH: 50,
TIME_SINCE_UPDATE_INTERVAL: 30000,
MIN_HASHTAG_LINK_LENGTH: 3,
- EMOJI_PATH: '/static/emoji'
+ EMOJI_PATH: '/static/emoji',
+ DEFAULT_WEBHOOK_LOGO: logoWebhook
};