From 6a1755d2e32c3f3bcaa67c33f32cb5eb5ab76ea2 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 16 Oct 2015 09:10:54 -0700 Subject: Inital support for multi-tab loging --- web/react/components/about_build_modal.jsx | 2 +- web/react/components/channel_loader.jsx | 1 - web/react/components/email_verify.jsx | 4 ++-- web/react/components/invite_member_modal.jsx | 2 +- web/react/components/login.jsx | 15 ++++++------- web/react/components/navbar_dropdown.jsx | 2 +- web/react/components/password_reset_form.jsx | 2 +- web/react/components/post.jsx | 2 +- web/react/components/post_body.jsx | 4 ++-- web/react/components/post_header.jsx | 2 +- web/react/components/rhs_root_post.jsx | 4 ++-- web/react/components/setting_picture.jsx | 2 +- web/react/components/sidebar.jsx | 4 ++-- web/react/components/sidebar_header.jsx | 2 +- web/react/components/sidebar_right_menu.jsx | 4 ++-- web/react/components/signup_team.jsx | 8 +++---- web/react/components/signup_user_complete.jsx | 25 +++++++++++----------- web/react/components/team_signup_choose_auth.jsx | 4 ++-- web/react/components/team_signup_password_page.jsx | 19 ++++++++-------- .../components/team_signup_send_invites_page.jsx | 2 +- web/react/components/team_signup_welcome_page.jsx | 2 +- web/react/components/user_profile.jsx | 2 +- .../user_settings/user_settings_general.jsx | 6 +++--- .../user_settings/user_settings_modal.jsx | 4 ++-- .../user_settings/user_settings_notifications.jsx | 2 +- web/react/components/view_image_popover_bar.jsx | 2 +- 26 files changed, 62 insertions(+), 66 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/about_build_modal.jsx b/web/react/components/about_build_modal.jsx index e8a46086a..6962876d4 100644 --- a/web/react/components/about_build_modal.jsx +++ b/web/react/components/about_build_modal.jsx @@ -14,7 +14,7 @@ export default class AboutBuildModal extends React.Component { } render() { - const config = global.window.config; + const config = global.window.mm_config; return ( Your email has been verified! Click Please verify your email address. Check your inbox for an email.

; resend = (
-

By proceeding to create your account and use {global.window.config.SiteName}, you agree to our Terms of Service and Privacy Policy. If you do not agree, you cannot use {global.window.config.SiteName}.

+

By proceeding to create your account and use {global.window.mm_config.SiteName}, you agree to our Terms of Service and Privacy Policy. If you do not agree, you cannot use {global.window.mm_config.SiteName}.

Welcome to:

-

{global.window.config.SiteName}

+

{global.window.mm_config.SiteName}

Let's set up your new team

diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx index 715161b4f..e731fb92c 100644 --- a/web/react/components/user_profile.jsx +++ b/web/react/components/user_profile.jsx @@ -71,7 +71,7 @@ export default class UserProfile extends React.Component { width='128' /> ); - if (!global.window.config.ShowEmailAddress === 'true') { + if (!global.window.mm_config.ShowEmailAddress === 'true') { dataContent.push(

{'Email not shared'}
); } else { dataContent.push( diff --git a/web/react/components/user_settings/user_settings_general.jsx b/web/react/components/user_settings/user_settings_general.jsx index 9c03f77a6..e6430841f 100644 --- a/web/react/components/user_settings/user_settings_general.jsx +++ b/web/react/components/user_settings/user_settings_general.jsx @@ -122,7 +122,7 @@ export default class UserSettingsGeneralTab extends React.Component { () => { this.updateSection(''); AsyncClient.getMe(); - const verificationEnabled = global.window.config.SendEmailNotifications === 'true' && global.window.config.RequireEmailVerification === 'true' && emailUpdated; + const verificationEnabled = global.window.mm_config.SendEmailNotifications === 'true' && global.window.mm_config.RequireEmailVerification === 'true' && emailUpdated; if (verificationEnabled) { ErrorStore.storeLastError({message: 'Check your email at ' + user.email + ' to verify the address.'}); @@ -451,8 +451,8 @@ export default class UserSettingsGeneralTab extends React.Component { } var emailSection; if (this.props.activeSection === 'email') { - const emailEnabled = global.window.config.SendEmailNotifications === 'true'; - const emailVerificationEnabled = global.window.config.RequireEmailVerification === 'true'; + const emailEnabled = global.window.mm_config.SendEmailNotifications === 'true'; + const emailVerificationEnabled = global.window.mm_config.RequireEmailVerification === 'true'; let helpText = 'Email is used for notifications, and requires verification if changed.'; if (!emailEnabled) { diff --git a/web/react/components/user_settings/user_settings_modal.jsx b/web/react/components/user_settings/user_settings_modal.jsx index 19b97fc85..fbb003fd5 100644 --- a/web/react/components/user_settings/user_settings_modal.jsx +++ b/web/react/components/user_settings/user_settings_modal.jsx @@ -35,10 +35,10 @@ export default class UserSettingsModal extends React.Component { tabs.push({name: 'security', uiName: 'Security', icon: 'glyphicon glyphicon-lock'}); tabs.push({name: 'notifications', uiName: 'Notifications', icon: 'glyphicon glyphicon-exclamation-sign'}); tabs.push({name: 'appearance', uiName: 'Appearance', icon: 'glyphicon glyphicon-wrench'}); - if (global.window.config.EnableOAuthServiceProvider === 'true') { + if (global.window.mm_config.EnableOAuthServiceProvider === 'true') { tabs.push({name: 'developer', uiName: 'Developer', icon: 'glyphicon glyphicon-th'}); } - if (global.window.config.EnableIncomingWebhooks === 'true') { + if (global.window.mm_config.EnableIncomingWebhooks === 'true') { tabs.push({name: 'integrations', uiName: 'Integrations', icon: 'glyphicon glyphicon-transfer'}); } diff --git a/web/react/components/user_settings/user_settings_notifications.jsx b/web/react/components/user_settings/user_settings_notifications.jsx index 4dbb9b96f..62738efbd 100644 --- a/web/react/components/user_settings/user_settings_notifications.jsx +++ b/web/react/components/user_settings/user_settings_notifications.jsx @@ -420,7 +420,7 @@ export default class NotificationsTab extends React.Component {
-

{'Email notifications are sent for mentions and direct messages after you’ve been offline for more than 60 seconds or away from ' + global.window.config.SiteName + ' for more than 5 minutes.'}
+

{'Email notifications are sent for mentions and direct messages after you’ve been offline for more than 60 seconds or away from ' + global.window.mm_config.SiteName + ' for more than 5 minutes.'}
); diff --git a/web/react/components/view_image_popover_bar.jsx b/web/react/components/view_image_popover_bar.jsx index 5b3ee540c..1287f4fba 100644 --- a/web/react/components/view_image_popover_bar.jsx +++ b/web/react/components/view_image_popover_bar.jsx @@ -7,7 +7,7 @@ export default class ViewImagePopoverBar extends React.Component { } render() { var publicLink = ''; - if (global.window.config.EnablePublicLink === 'true') { + if (global.window.mm_config.EnablePublicLink === 'true') { publicLink = (
Date: Tue, 20 Oct 2015 14:49:42 -0700 Subject: Multi-session login --- web/react/components/admin_console/admin_sidebar_header.jsx | 2 +- web/react/components/admin_console/user_item.jsx | 2 +- web/react/components/file_attachment.jsx | 4 ++-- web/react/components/file_preview.jsx | 2 +- web/react/components/member_list_item.jsx | 2 +- web/react/components/member_list_team_item.jsx | 2 +- web/react/components/mention.jsx | 2 +- web/react/components/more_direct_channels.jsx | 2 +- web/react/components/post.jsx | 2 +- web/react/components/post_list.jsx | 2 +- web/react/components/rhs_comment.jsx | 2 +- web/react/components/rhs_root_post.jsx | 2 +- web/react/components/search_results_item.jsx | 2 +- web/react/components/sidebar_header.jsx | 2 +- web/react/components/user_profile.jsx | 2 +- web/react/components/user_settings/user_settings_general.jsx | 2 +- web/react/components/view_image.jsx | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/admin_console/admin_sidebar_header.jsx b/web/react/components/admin_console/admin_sidebar_header.jsx index c80811bcd..e66beaf35 100644 --- a/web/react/components/admin_console/admin_sidebar_header.jsx +++ b/web/react/components/admin_console/admin_sidebar_header.jsx @@ -36,7 +36,7 @@ export default class SidebarHeader extends React.Component { profilePicture = ( ); } diff --git a/web/react/components/admin_console/user_item.jsx b/web/react/components/admin_console/user_item.jsx index 395e22e6c..f7e92672d 100644 --- a/web/react/components/admin_console/user_item.jsx +++ b/web/react/components/admin_console/user_item.jsx @@ -215,7 +215,7 @@ export default class UserItem extends React.Component {
diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx index c6dff6550..307c543a2 100644 --- a/web/react/components/file_attachment.jsx +++ b/web/react/components/file_attachment.jsx @@ -39,7 +39,7 @@ export default class FileAttachment extends React.Component { if (type === 'image') { var self = this; // Need this reference since we use the given "this" - $('').attr('src', fileInfo.path + '_thumb.jpg').load(function loadWrapper(path, name) { + $('').attr('src', fileInfo.path + '_thumb.jpg?' + utils.getSessionIndex()).load(function loadWrapper(path, name) { return function loader() { $(this).remove(); if (name in self.refs) { @@ -62,7 +62,7 @@ export default class FileAttachment extends React.Component { var re2 = new RegExp('\\(', 'g'); var re3 = new RegExp('\\)', 'g'); var url = path.replace(re1, '%20').replace(re2, '%28').replace(re3, '%29'); - $(imgDiv).css('background-image', 'url(' + url + '_thumb.jpg)'); + $(imgDiv).css('background-image', 'url(' + url + '_thumb.jpg?' + utils.getSessionIndex() + ')'); } }; }(fileInfo.path, filename)); diff --git a/web/react/components/file_preview.jsx b/web/react/components/file_preview.jsx index a40ed1dcf..df5deb8bc 100644 --- a/web/react/components/file_preview.jsx +++ b/web/react/components/file_preview.jsx @@ -34,7 +34,7 @@ export default class FilePreview extends React.Component { if (filename.indexOf('/api/v1/files/get') !== -1) { filename = filename.split('/api/v1/files/get')[1]; } - filename = Utils.getWindowLocationOrigin() + '/api/v1/files/get' + filename; + filename = Utils.getWindowLocationOrigin() + '/api/v1/files/get' + filename + '?' + Utils.getSessionIndex(); if (type === 'image') { previews.push( diff --git a/web/react/components/member_list_item.jsx b/web/react/components/member_list_item.jsx index 5c3695ad4..8ed94680e 100644 --- a/web/react/components/member_list_item.jsx +++ b/web/react/components/member_list_item.jsx @@ -105,7 +105,7 @@ export default class MemberListItem extends React.Component {
diff --git a/web/react/components/member_list_team_item.jsx b/web/react/components/member_list_team_item.jsx index 3af1d3800..14db05cdb 100644 --- a/web/react/components/member_list_team_item.jsx +++ b/web/react/components/member_list_team_item.jsx @@ -169,7 +169,7 @@ export default class MemberListTeamItem extends React.Component {
diff --git a/web/react/components/mention.jsx b/web/react/components/mention.jsx index aeed724a8..09035523a 100644 --- a/web/react/components/mention.jsx +++ b/web/react/components/mention.jsx @@ -25,7 +25,7 @@ export default class Mention extends React.Component { ); diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index 105199035..21f9a53a0 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -179,7 +179,7 @@ export default class MoreDirectChannels extends React.Component { className='profile-img pull-left' width='38' height='38' - src={`/api/v1/users/${user.id}/image?time=${user.update_at}`} + src={`/api/v1/users/${user.id}/image?time=${user.update_at}&${Utils.getSessionIndex()}`} />
{user.username} diff --git a/web/react/components/post.jsx b/web/react/components/post.jsx index 3b3b0383c..bc3144dbc 100644 --- a/web/react/components/post.jsx +++ b/web/react/components/post.jsx @@ -158,7 +158,7 @@ export default class Post extends React.Component { var profilePic = null; if (!this.props.hideProfilePic) { - let src = '/api/v1/users/' + post.user_id + '/image?time=' + timestamp; + let src = '/api/v1/users/' + post.user_id + '/image?time=' + timestamp + '&' + utils.getSessionIndex(); 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; diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 4402745e1..29cd22c44 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -323,7 +323,7 @@ export default class PostList extends React.Component {
diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index d3a4cfaeb..cfff04fa2 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -199,7 +199,7 @@ export default class RhsComment extends React.Component {
diff --git a/web/react/components/rhs_root_post.jsx b/web/react/components/rhs_root_post.jsx index 979c56036..deef389e2 100644 --- a/web/react/components/rhs_root_post.jsx +++ b/web/react/components/rhs_root_post.jsx @@ -134,7 +134,7 @@ export default class RhsRootPost extends React.Component { botIndicator =
  • {'BOT'}
  • ; } - let src = '/api/v1/users/' + post.user_id + '/image?time=' + timestamp; + let src = '/api/v1/users/' + post.user_id + '/image?time=' + timestamp + '&' + utils.getSessionIndex(); 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; diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx index 75d2e7a45..a7d4bb229 100644 --- a/web/react/components/search_results_item.jsx +++ b/web/react/components/search_results_item.jsx @@ -77,7 +77,7 @@ export default class SearchResultsItem extends React.Component {
    diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx index 6b29da622..f5d2ed3b4 100644 --- a/web/react/components/sidebar_header.jsx +++ b/web/react/components/sidebar_header.jsx @@ -32,7 +32,7 @@ export default class SidebarHeader extends React.Component { profilePicture = ( ); } diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx index 4a759bb21..38d15b7f8 100644 --- a/web/react/components/user_profile.jsx +++ b/web/react/components/user_profile.jsx @@ -67,7 +67,7 @@ export default class UserProfile extends React.Component { dataContent.push( - + ); } else { -- cgit v1.2.3-1-g7c22 From 636db0d2f2f46aa4232bcc6b297d0b3b584679f3 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 20 Oct 2015 15:02:15 -0700 Subject: fixing eslint errors --- web/react/components/mention.jsx | 1 + web/react/components/search_results_item.jsx | 2 +- web/react/components/sidebar_header.jsx | 1 + web/react/components/user_profile.jsx | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/mention.jsx b/web/react/components/mention.jsx index 09035523a..050887c6f 100644 --- a/web/react/components/mention.jsx +++ b/web/react/components/mention.jsx @@ -1,6 +1,7 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. var UserStore = require('../stores/user_store.jsx'); +const Utils = require('../utils/utils.jsx'); export default class Mention extends React.Component { constructor(props) { diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx index a7d4bb229..d212e47a3 100644 --- a/web/react/components/search_results_item.jsx +++ b/web/react/components/search_results_item.jsx @@ -77,7 +77,7 @@ export default class SearchResultsItem extends React.Component {
    diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx index f5d2ed3b4..de28a8374 100644 --- a/web/react/components/sidebar_header.jsx +++ b/web/react/components/sidebar_header.jsx @@ -3,6 +3,7 @@ var NavbarDropdown = require('./navbar_dropdown.jsx'); var UserStore = require('../stores/user_store.jsx'); +const Utils = require('../utils/utils.jsx'); export default class SidebarHeader extends React.Component { constructor(props) { diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx index 38d15b7f8..c4402ae23 100644 --- a/web/react/components/user_profile.jsx +++ b/web/react/components/user_profile.jsx @@ -73,7 +73,7 @@ export default class UserProfile extends React.Component { key='user-popover-image' /> ); - + if (!global.window.mm_config.ShowEmailAddress === 'true') { dataContent.push(
    Date: Tue, 20 Oct 2015 16:19:41 -0700 Subject: Fixing admin console --- web/react/components/navbar_dropdown.jsx | 2 +- web/react/components/sidebar_right_menu.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx index 2b2cc2f95..2b68645e5 100644 --- a/web/react/components/navbar_dropdown.jsx +++ b/web/react/components/navbar_dropdown.jsx @@ -152,7 +152,7 @@ export default class NavbarDropdown extends React.Component { sysAdminLink = (
  • {'System Console'} diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx index 870fe77e5..fddc98c9d 100644 --- a/web/react/components/sidebar_right_menu.jsx +++ b/web/react/components/sidebar_right_menu.jsx @@ -84,7 +84,7 @@ export default class SidebarRightMenu extends React.Component { consoleLink = (
  • System Console
  • -- cgit v1.2.3-1-g7c22 From 7384b0791e54b0fd980ce8c321566c2c42289c02 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 22 Oct 2015 20:52:31 -0700 Subject: Fixing merge --- web/react/components/post_list.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/react/components') diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index 2839325fe..fd29a303c 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -334,7 +334,7 @@ export default class PostList extends React.Component {
    -- cgit v1.2.3-1-g7c22