mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 23:31:28 +03:00
Merge pull request #689 from matrix-org/luke/rts-set-team-token-view-home
View /home on registered /w team
This commit is contained in:
commit
18cba1fe45
2 changed files with 8 additions and 0 deletions
|
@ -991,6 +991,11 @@ module.exports = React.createClass({
|
||||||
this._setPage(PageTypes.UserSettings);
|
this._setPage(PageTypes.UserSettings);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onTeamMemberRegistered: function(teamToken) {
|
||||||
|
this._teamToken = teamToken;
|
||||||
|
this._setPage(PageTypes.HomePage);
|
||||||
|
},
|
||||||
|
|
||||||
onFinishPostRegistration: function() {
|
onFinishPostRegistration: function() {
|
||||||
// Don't confuse this with "PageType" which is the middle window to show
|
// Don't confuse this with "PageType" which is the middle window to show
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -1119,6 +1124,7 @@ module.exports = React.createClass({
|
||||||
customIsUrl={this.getCurrentIsUrl()}
|
customIsUrl={this.getCurrentIsUrl()}
|
||||||
registrationUrl={this.props.registrationUrl}
|
registrationUrl={this.props.registrationUrl}
|
||||||
defaultDeviceDisplayName={this.props.defaultDeviceDisplayName}
|
defaultDeviceDisplayName={this.props.defaultDeviceDisplayName}
|
||||||
|
onTeamMemberRegistered={this.onTeamMemberRegistered}
|
||||||
onLoggedIn={this.onRegistered}
|
onLoggedIn={this.onRegistered}
|
||||||
onLoginClick={this.onLoginClick}
|
onLoginClick={this.onLoginClick}
|
||||||
onRegisterClick={this.onRegisterClick}
|
onRegisterClick={this.onRegisterClick}
|
||||||
|
|
|
@ -58,6 +58,7 @@ module.exports = React.createClass({
|
||||||
teamServerURL: React.PropTypes.string.isRequired,
|
teamServerURL: React.PropTypes.string.isRequired,
|
||||||
}),
|
}),
|
||||||
teamSelected: React.PropTypes.object,
|
teamSelected: React.PropTypes.object,
|
||||||
|
onTeamMemberRegistered: React.PropTypes.func.isRequired,
|
||||||
|
|
||||||
defaultDeviceDisplayName: React.PropTypes.string,
|
defaultDeviceDisplayName: React.PropTypes.string,
|
||||||
|
|
||||||
|
@ -230,6 +231,7 @@ module.exports = React.createClass({
|
||||||
const teamToken = data.team_token;
|
const teamToken = data.team_token;
|
||||||
// Store for use /w welcome pages
|
// Store for use /w welcome pages
|
||||||
window.localStorage.setItem('mx_team_token', teamToken);
|
window.localStorage.setItem('mx_team_token', teamToken);
|
||||||
|
self.props.onTeamMemberRegistered(teamToken);
|
||||||
|
|
||||||
self._rtsClient.getTeam(teamToken).then((team) => {
|
self._rtsClient.getTeam(teamToken).then((team) => {
|
||||||
console.log(
|
console.log(
|
||||||
|
|
Loading…
Reference in a new issue