diff options
Diffstat (limited to 'web/react/pages')
-rw-r--r-- | web/react/pages/channel.jsx | 28 | ||||
-rw-r--r-- | web/react/pages/home.jsx | 6 | ||||
-rw-r--r-- | web/react/pages/login.jsx | 8 | ||||
-rw-r--r-- | web/react/pages/password_reset.jsx | 12 | ||||
-rw-r--r-- | web/react/pages/signup_team.jsx | 8 | ||||
-rw-r--r-- | web/react/pages/signup_team_complete.jsx | 8 | ||||
-rw-r--r-- | web/react/pages/signup_user_complete.jsx | 16 | ||||
-rw-r--r-- | web/react/pages/verify.jsx | 8 |
8 files changed, 43 insertions, 51 deletions
diff --git a/web/react/pages/channel.jsx b/web/react/pages/channel.jsx index e70b51865..fa5710d6b 100644 --- a/web/react/pages/channel.jsx +++ b/web/react/pages/channel.jsx @@ -34,23 +34,19 @@ var ActivityLogModal = require('../components/activity_log_modal.jsx'); var RemovedFromChannelModal = require('../components/removed_from_channel_modal.jsx'); var FileUploadOverlay = require('../components/file_upload_overlay.jsx'); -var AsyncClient = require('../utils/async_client.jsx'); - var Constants = require('../utils/constants.jsx'); var ActionTypes = Constants.ActionTypes; -function setupChannelPage(teamName, teamType, teamId, channelName, channelId) { - AsyncClient.getConfig(); - +function setupChannelPage(props) { AppDispatcher.handleViewAction({ type: ActionTypes.CLICK_CHANNEL, - name: channelName, - id: channelId + name: props.ChannelName, + id: props.ChannelId }); AppDispatcher.handleViewAction({ type: ActionTypes.CLICK_TEAM, - id: teamId + id: props.TeamId }); // ChannelLoader must be rendered first @@ -65,14 +61,14 @@ function setupChannelPage(teamName, teamType, teamId, channelName, channelId) { ); React.render( - <Navbar teamDisplayName={teamName} />, + <Navbar teamDisplayName={props.TeamDisplayName} />, document.getElementById('navbar') ); React.render( <Sidebar - teamDisplayName={teamName} - teamType={teamType} + teamDisplayName={props.TeamDisplayName} + teamType={props.TeamType} />, document.getElementById('sidebar-left') ); @@ -88,17 +84,17 @@ function setupChannelPage(teamName, teamType, teamId, channelName, channelId) { ); React.render( - <TeamSettingsModal teamDisplayName={teamName} />, + <TeamSettingsModal teamDisplayName={props.TeamDisplayName} />, document.getElementById('team_settings_modal') ); React.render( - <TeamMembersModal teamDisplayName={teamName} />, + <TeamMembersModal teamDisplayName={props.TeamDisplayName} />, document.getElementById('team_members_modal') ); React.render( - <MemberInviteModal teamType={teamType} />, + <MemberInviteModal teamType={props.TeamType} />, document.getElementById('invite_member_modal') ); @@ -184,8 +180,8 @@ function setupChannelPage(teamName, teamType, teamId, channelName, channelId) { React.render( <SidebarRightMenu - teamDisplayName={teamName} - teamType={teamType} + teamDisplayName={props.TeamDisplayName} + teamType={props.TeamType} />, document.getElementById('sidebar-menu') ); diff --git a/web/react/pages/home.jsx b/web/react/pages/home.jsx index 18553542c..2299c306e 100644 --- a/web/react/pages/home.jsx +++ b/web/react/pages/home.jsx @@ -4,12 +4,12 @@ var ChannelStore = require('../stores/channel_store.jsx'); var Constants = require('../utils/constants.jsx'); -function setupHomePage(teamURL) { +function setupHomePage(props) { var last = ChannelStore.getLastVisitedName(); if (last == null || last.length === 0) { - window.location = teamURL + '/channels/' + Constants.DEFAULT_CHANNEL; + window.location = props.TeamURL + '/channels/' + Constants.DEFAULT_CHANNEL; } else { - window.location = teamURL + '/channels/' + last; + window.location = props.TeamURL + '/channels/' + last; } } diff --git a/web/react/pages/login.jsx b/web/react/pages/login.jsx index 424ae0e84..830f622fa 100644 --- a/web/react/pages/login.jsx +++ b/web/react/pages/login.jsx @@ -3,12 +3,12 @@ var Login = require('../components/login.jsx'); -function setupLoginPage(teamDisplayName, teamName, authServices) { +function setupLoginPage(props) { React.render( <Login - teamDisplayName={teamDisplayName} - teamName={teamName} - authServices={authServices} + teamDisplayName={props.TeamDisplayName} + teamName={props.TeamName} + authServices={props.AuthServices} />, document.getElementById('login') ); diff --git a/web/react/pages/password_reset.jsx b/web/react/pages/password_reset.jsx index 2ca468bea..b7bfdcd5e 100644 --- a/web/react/pages/password_reset.jsx +++ b/web/react/pages/password_reset.jsx @@ -3,14 +3,14 @@ var PasswordReset = require('../components/password_reset.jsx'); -function setupPasswordResetPage(isReset, teamDisplayName, teamName, hash, data) { +function setupPasswordResetPage(props) { React.render( <PasswordReset - isReset={isReset} - teamDisplayName={teamDisplayName} - teamName={teamName} - hash={hash} - data={data} + isReset={props.IsReset} + teamDisplayName={props.TeamDisplayName} + teamName={props.TeamName} + hash={props.Hash} + data={props.Data} />, document.getElementById('reset') ); diff --git a/web/react/pages/signup_team.jsx b/web/react/pages/signup_team.jsx index e9e803aa4..427daf577 100644 --- a/web/react/pages/signup_team.jsx +++ b/web/react/pages/signup_team.jsx @@ -3,12 +3,8 @@ var SignupTeam = require('../components/signup_team.jsx'); -var AsyncClient = require('../utils/async_client.jsx'); - -function setupSignupTeamPage(authServices) { - AsyncClient.getConfig(); - - var services = JSON.parse(authServices); +function setupSignupTeamPage(props) { + var services = JSON.parse(props.AuthServices); React.render( <SignupTeam services={services} />, diff --git a/web/react/pages/signup_team_complete.jsx b/web/react/pages/signup_team_complete.jsx index 72f9992a8..ec77e6602 100644 --- a/web/react/pages/signup_team_complete.jsx +++ b/web/react/pages/signup_team_complete.jsx @@ -3,12 +3,12 @@ var SignupTeamComplete = require('../components/signup_team_complete.jsx'); -function setupSignupTeamCompletePage(email, data, hash) { +function setupSignupTeamCompletePage(props) { React.render( <SignupTeamComplete - email={email} - hash={hash} - data={data} + email={props.Email} + hash={props.Hash} + data={props.Data} />, document.getElementById('signup-team-complete') ); diff --git a/web/react/pages/signup_user_complete.jsx b/web/react/pages/signup_user_complete.jsx index eaf93a61c..112aaa3f2 100644 --- a/web/react/pages/signup_user_complete.jsx +++ b/web/react/pages/signup_user_complete.jsx @@ -3,16 +3,16 @@ var SignupUserComplete = require('../components/signup_user_complete.jsx'); -function setupSignupUserCompletePage(email, name, uiName, id, data, hash, authServices) { +function setupSignupUserCompletePage(props) { React.render( <SignupUserComplete - teamId={id} - teamName={name} - teamDisplayName={uiName} - email={email} - hash={hash} - data={data} - authServices={authServices} + teamId={props.TeamId} + teamName={props.TeamName} + teamDisplayName={props.TeamDisplayName} + email={props.Email} + hash={props.Hash} + data={props.Data} + authServices={props.AuthServices} />, document.getElementById('signup-user-complete') ); diff --git a/web/react/pages/verify.jsx b/web/react/pages/verify.jsx index 7077b40b8..e48471bbd 100644 --- a/web/react/pages/verify.jsx +++ b/web/react/pages/verify.jsx @@ -3,12 +3,12 @@ var EmailVerify = require('../components/email_verify.jsx'); -global.window.setupVerifyPage = function setupVerifyPage(isVerified, teamURL, userEmail) { +global.window.setupVerifyPage = function setupVerifyPage(props) { React.render( <EmailVerify - isVerified={isVerified} - teamURL={teamURL} - userEmail={userEmail} + isVerified={props.IsVerified} + teamURL={props.TeamURL} + userEmail={props.UserEmail} />, document.getElementById('verify') ); |