summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/admin_console/admin_sidebar.jsx27
-rw-r--r--webapp/components/admin_console/ldap_settings.jsx2
-rw-r--r--webapp/components/admin_console/multiselect_settings.jsx1
-rw-r--r--webapp/components/admin_console/storage_settings.jsx41
-rw-r--r--webapp/components/analytics/doughnut_chart.jsx12
-rw-r--r--webapp/components/analytics/line_chart.jsx12
-rw-r--r--webapp/components/create_comment.jsx2
-rw-r--r--webapp/components/create_post.jsx2
-rw-r--r--webapp/components/edit_post_modal.jsx1
-rw-r--r--webapp/components/login/login_controller.jsx8
-rw-r--r--webapp/components/rhs_root_post.jsx1
-rw-r--r--webapp/components/signup_user_complete.jsx34
12 files changed, 88 insertions, 55 deletions
diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx
index d760e3db9..c947be5cb 100644
--- a/webapp/components/admin_console/admin_sidebar.jsx
+++ b/webapp/components/admin_console/admin_sidebar.jsx
@@ -239,6 +239,22 @@ export default class AdminSidebar extends React.Component {
);
}
+ let customBranding = null;
+
+ if (window.mm_license.IsLicensed === 'true') {
+ customBranding = (
+ <AdminSidebarSection
+ name='custom_brand'
+ title={
+ <FormattedMessage
+ id='admin.sidebar.customBrand'
+ defaultMessage='Custom Branding'
+ />
+ }
+ />
+ );
+ }
+
return (
<div className='admin-sidebar'>
<AdminSidebarHeader/>
@@ -515,16 +531,7 @@ export default class AdminSidebar extends React.Component {
/>
}
>
- <AdminSidebarSection
- name='custom_brand'
- title={
- <FormattedMessage
- id='admin.sidebar.customBrand'
- defaultMessage='Custom Branding'
- />
-
- }
- />
+ {customBranding}
<AdminSidebarSection
name='legal_and_support'
title={
diff --git a/webapp/components/admin_console/ldap_settings.jsx b/webapp/components/admin_console/ldap_settings.jsx
index acda672d8..01d4b0a67 100644
--- a/webapp/components/admin_console/ldap_settings.jsx
+++ b/webapp/components/admin_console/ldap_settings.jsx
@@ -343,7 +343,7 @@ export default class LdapSettings extends AdminSettings {
helpText={
<FormattedMessage
id='admin.ldap.syncIntervalHelpText'
- defaultMessage='LDAP Synchronization is the process by which Mattermost updates its users to reflect any updated data on the LDAP server. For example if a name for a user is updated on the LDAP server, the change will be reflected in Mattermost when the synchronization is performed. Accounts that have been removed from the LDAP server will have their active sessions cleared and no longer be able to login to Mattermost. Mattermost will perform this synchronization regularly according to the interval supplied here. For example, if 60 is supplied, Mattermost will update the users every hour.'
+ defaultMessage='LDAP Synchronization is the process by which Mattermost updates its users to reflect any updated data on the LDAP server. For example if a name for a user is updated on the LDAP server, the change will be reflected in Mattermost when the synchronization is performed. Accounts that have been removed from the LDAP server will have their active sessions cleared and no longer be able to login to Mattermost. Mattermost will perform this synchronization regularly according to the interval supplied here. For example, if 60 is supplied, Mattermost will update the users every hour. Changing this will require a server restart before taking effect.'
/>
}
value={this.state.syncIntervalMinutes}
diff --git a/webapp/components/admin_console/multiselect_settings.jsx b/webapp/components/admin_console/multiselect_settings.jsx
index deba983de..ca0bdc9aa 100644
--- a/webapp/components/admin_console/multiselect_settings.jsx
+++ b/webapp/components/admin_console/multiselect_settings.jsx
@@ -50,6 +50,7 @@ export default class MultiSelectSetting extends React.Component {
labelKey='text'
options={this.props.values}
joinValues={true}
+ clearable={false}
disabled={this.props.disabled}
noResultsText={this.props.noResultText}
onChange={this.handleChange}
diff --git a/webapp/components/admin_console/storage_settings.jsx b/webapp/components/admin_console/storage_settings.jsx
index 60eedc2d2..077d75c73 100644
--- a/webapp/components/admin_console/storage_settings.jsx
+++ b/webapp/components/admin_console/storage_settings.jsx
@@ -22,8 +22,8 @@ export default class StorageSettings extends AdminSettings {
this.renderSettings = this.renderSettings.bind(this);
+ //maxFileSize: props.config.FileSettings.MaxFileSize,
this.state = Object.assign(this.state, {
- maxFileSize: props.config.FileSettings.MaxFileSize,
driverName: props.config.FileSettings.DriverName,
directory: props.config.FileSettings.Directory,
amazonS3AccessKeyId: props.config.FileSettings.AmazonS3AccessKeyId,
@@ -34,7 +34,7 @@ export default class StorageSettings extends AdminSettings {
}
getConfigFromState(config) {
- config.FileSettings.MaxFileSize = this.parseInt(this.state.maxFileSize);
+ //config.FileSettings.MaxFileSize = this.parseInt(this.state.maxFileSize);
config.FileSettings.DriverName = this.state.driverName;
config.FileSettings.Directory = this.state.directory;
config.FileSettings.AmazonS3AccessKeyId = this.state.amazonS3AccessKeyId;
@@ -57,26 +57,27 @@ export default class StorageSettings extends AdminSettings {
}
renderSettings() {
+ /*<TextSetting
+ id='maxFileSize'
+ label={
+ <FormattedMessage
+ id='admin.image.maxFileSizeTitle'
+ defaultMessage='Max File Size:'
+ />
+ }
+ placeholder={Utils.localizeMessage('admin.image.maxFileSizeExample', 'Ex "52428800"')}
+ helpText={
+ <FormattedMessage
+ id='admin.image.maxFileSizeDescription'
+ defaultMessage='Max File Size in bytes. If blank, will be set to 52428800 (50MB).'
+ />
+ }
+ value={this.state.maxFileSize}
+ onChange={this.handleChange}
+ />*/
+
return (
<SettingsGroup>
- <TextSetting
- id='maxFileSize'
- label={
- <FormattedMessage
- id='admin.image.maxFileSizeTitle'
- defaultMessage='Max File Size:'
- />
- }
- placeholder={Utils.localizeMessage('admin.image.maxFileSizeExample', 'Ex "52428800"')}
- helpText={
- <FormattedMessage
- id='admin.image.maxFileSizeDescription'
- defaultMessage='Max File Size in bytes. If blank, will be set to 52428800 (50MB).'
- />
- }
- value={this.state.maxFileSize}
- onChange={this.handleChange}
- />
<DropdownSetting
id='driverName'
values={[
diff --git a/webapp/components/analytics/doughnut_chart.jsx b/webapp/components/analytics/doughnut_chart.jsx
index b946ad8bb..5834e290a 100644
--- a/webapp/components/analytics/doughnut_chart.jsx
+++ b/webapp/components/analytics/doughnut_chart.jsx
@@ -23,26 +23,26 @@ export default class DoughnutChart extends React.Component {
componentDidUpdate(prevProps) {
if (!Utils.areObjectsEqual(prevProps.data, this.props.data) || !Utils.areObjectsEqual(prevProps.options, this.props.options)) {
- if (this.chart) {
- this.chart.destroy();
- }
- this.initChart();
+ this.initChart(true);
}
}
componentWillUnmount() {
- if (this.chart) {
+ if (this.chart && this.refs.canvas) {
this.chart.destroy();
}
}
- initChart() {
+ initChart(update) {
if (!this.refs.canvas) {
return;
}
var el = ReactDOM.findDOMNode(this.refs.canvas);
var ctx = el.getContext('2d');
this.chart = new Chart(ctx, {type: 'doughnut', data: this.props.data, options: this.props.options || {}}); //eslint-disable-line new-cap
+ if (update) {
+ this.chart.update();
+ }
}
render() {
diff --git a/webapp/components/analytics/line_chart.jsx b/webapp/components/analytics/line_chart.jsx
index bebeb0223..aa603d819 100644
--- a/webapp/components/analytics/line_chart.jsx
+++ b/webapp/components/analytics/line_chart.jsx
@@ -23,26 +23,26 @@ export default class LineChart extends React.Component {
componentDidUpdate(prevProps) {
if (!Utils.areObjectsEqual(prevProps.data, this.props.data) || !Utils.areObjectsEqual(prevProps.options, this.props.options)) {
- if (this.chart) {
- this.chart.destroy();
- }
- this.initChart();
+ this.initChart(true);
}
}
componentWillUnmount() {
- if (this.chart) {
+ if (this.chart && this.refs.canvas) {
this.chart.destroy();
}
}
- initChart() {
+ initChart(update) {
if (!this.refs.canvas) {
return;
}
var el = ReactDOM.findDOMNode(this.refs.canvas);
var ctx = el.getContext('2d');
this.chart = new Chart(ctx, {type: 'line', data: this.props.data, options: this.props.options || {}}); //eslint-disable-line new-cap
+ if (update) {
+ this.chart.update();
+ }
}
render() {
diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx
index 454d8bf43..85f8ac864 100644
--- a/webapp/components/create_comment.jsx
+++ b/webapp/components/create_comment.jsx
@@ -147,7 +147,7 @@ class CreateComment extends React.Component {
Client.createPost(
post,
() => {
- // DO nothing. Websockets will handle this.
+ PostStore.removePendingPost(post.channel_id, post.pending_post_id);
},
(err) => {
if (err.id === 'api.post.create_post.root_id.app_error') {
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx
index 7aa0a586b..caf58c744 100644
--- a/webapp/components/create_post.jsx
+++ b/webapp/components/create_post.jsx
@@ -180,7 +180,7 @@ class CreatePost extends React.Component {
Client.createPost(post,
() => {
- // DO nothing. Websockets will handle this.
+ PostStore.removePendingPost(post.pending_post_id);
},
(err) => {
if (err.id === 'api.post.create_post.root_id.app_error') {
diff --git a/webapp/components/edit_post_modal.jsx b/webapp/components/edit_post_modal.jsx
index bdd540b09..4bd23a26d 100644
--- a/webapp/components/edit_post_modal.jsx
+++ b/webapp/components/edit_post_modal.jsx
@@ -67,6 +67,7 @@ class EditPostModal extends React.Component {
Client.updatePost(
updatedPost,
() => {
+ AsyncClient.getPosts(updatedPost.channel_id);
window.scrollTo(0, 0);
},
(err) => {
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index dd4a92f92..ab8b49392 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -69,13 +69,13 @@ export default class LoginController extends React.Component {
this.setState({loginId});
}
- let password = this.refs.password.value;
+ const password = this.refs.password.value;
if (password !== this.state.password) {
this.setState({password});
}
+ // don't trim the password since we support spaces in passwords
loginId = loginId.trim();
- password = password.trim();
if (!loginId) {
// it's slightly weird to be constructing the message ID, but it's a bit nicer than triply nested if statements
@@ -444,7 +444,7 @@ export default class LoginController extends React.Component {
<a
className='btn btn-custom-login gitlab'
key='gitlab'
- href={Client.getOAuthRoute() + '/gitlab/login'}
+ href={Client.getOAuthRoute() + '/gitlab/login' + this.props.location.search}
>
<span className='icon'/>
<span>
@@ -529,4 +529,4 @@ export default class LoginController extends React.Component {
</div>
);
}
-} \ No newline at end of file
+}
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx
index 8996381ba..ff6452035 100644
--- a/webapp/components/rhs_root_post.jsx
+++ b/webapp/components/rhs_root_post.jsx
@@ -175,6 +175,7 @@ export default class RhsRootPost extends React.Component {
filenames={post.filenames}
channelId={post.channel_id}
userId={post.user_id}
+ compactDisplay={this.props.compactDisplay}
/>
);
}
diff --git a/webapp/components/signup_user_complete.jsx b/webapp/components/signup_user_complete.jsx
index b3825f72f..a9d96e320 100644
--- a/webapp/components/signup_user_complete.jsx
+++ b/webapp/components/signup_user_complete.jsx
@@ -173,11 +173,24 @@ export default class SignupUserComplete extends React.Component {
this.state.ldapPassword,
null,
() => {
- GlobalActions.emitInitialLoad(
- () => {
- browserHistory.push('/select_team');
- }
- );
+ if (this.props.location.query.id || this.props.location.query.h) {
+ Client.addUserToTeamFromInvite(
+ this.props.location.query.d,
+ this.props.location.query.h,
+ this.props.location.query.id,
+ () => {
+ this.finishSignup();
+ },
+ () => {
+ // there's not really a good way to deal with this, so just let the user log in like normal
+ this.finishSignup();
+ }
+ );
+
+ return;
+ }
+
+ this.finishSignup();
},
(err) => {
if (err.id === 'ent.ldap.do_login.user_not_registered.app_error' || err.id === 'ent.ldap.do_login.user_filtered.app_error') {
@@ -205,6 +218,15 @@ export default class SignupUserComplete extends React.Component {
);
}
+ finishSignup() {
+ GlobalActions.emitInitialLoad(
+ () => {
+ GlobalActions.loadDefaultLocale();
+ browserHistory.push('/select_team');
+ }
+ );
+ }
+
handleUserCreated(user, data) {
track('signup', 'signup_user_02_complete');
Client.loginById(
@@ -761,4 +783,4 @@ export default class SignupUserComplete extends React.Component {
</div>
);
}
-} \ No newline at end of file
+}