Merge remote-tracking branch 'origin/develop' into rav/timeline_window
This commit is contained in:
commit
2479c81cf6
7 changed files with 66 additions and 14 deletions
|
@ -96,6 +96,14 @@ module.exports = React.createClass({
|
|||
if (!this.props.config || !this.props.config.default_hs_url) {
|
||||
console.error("Cannot enable guest access: No supplied config prop for HS/IS URLs");
|
||||
}
|
||||
else if (this.props.startingQueryParams.email) {
|
||||
console.log("Not registering as guest; email invite.");
|
||||
this._autoRegisterAsGuest = false;
|
||||
}
|
||||
else if (this.props.startingQueryParams.client_secret && this.props.startingQueryParams.sid) {
|
||||
console.log("Not registering as guest; registration.");
|
||||
this._autoRegisterAsGuest = false;
|
||||
}
|
||||
else {
|
||||
this._autoRegisterAsGuest = true;
|
||||
}
|
||||
|
@ -200,7 +208,6 @@ module.exports = React.createClass({
|
|||
});
|
||||
break;
|
||||
case 'start_registration':
|
||||
if (this.state.logged_in) return;
|
||||
var newState = payload.params || {};
|
||||
newState.screen = 'register';
|
||||
if (
|
||||
|
@ -635,6 +642,14 @@ module.exports = React.createClass({
|
|||
action: 'start_post_registration',
|
||||
});
|
||||
} else if (screen.indexOf('room/') == 0) {
|
||||
|
||||
if (!this.state.logged_in && this.props.startingQueryParams.email) {
|
||||
console.log("Redirecting to email registration");
|
||||
this.showScreen("register");
|
||||
this.notifyNewScreen('register'); // this doesn't call showScreen, just updates the hash
|
||||
return;
|
||||
}
|
||||
|
||||
var roomString = screen.split('/')[1];
|
||||
if (roomString[0] == '#') {
|
||||
if (this.state.logged_in) {
|
||||
|
@ -656,7 +671,7 @@ module.exports = React.createClass({
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (screen) console.error("Unknown screen : %s", screen);
|
||||
console.error("Unknown screen : %s", screen);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -809,6 +824,7 @@ module.exports = React.createClass({
|
|||
var CreateRoom = sdk.getComponent('structures.CreateRoom');
|
||||
var RoomDirectory = sdk.getComponent('structures.RoomDirectory');
|
||||
var MatrixToolbar = sdk.getComponent('globals.MatrixToolbar');
|
||||
var GuestWarningBar = sdk.getComponent('globals.GuestWarningBar');
|
||||
var ForgotPassword = sdk.getComponent('structures.login.ForgotPassword');
|
||||
|
||||
// needs to be before normal PageTypes as you are logged in technically
|
||||
|
@ -849,7 +865,20 @@ module.exports = React.createClass({
|
|||
}
|
||||
|
||||
// TODO: Fix duplication here and do conditionals like we do above
|
||||
if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
|
||||
if (MatrixClientPeg.get().isGuest()) {
|
||||
return (
|
||||
<div className="mx_MatrixChat_wrapper">
|
||||
<GuestWarningBar />
|
||||
<div className="mx_MatrixChat mx_MatrixChat_toolbarShowing">
|
||||
<LeftPanel selectedRoom={this.state.currentRoom} collapsed={this.state.collapse_lhs} />
|
||||
<main className="mx_MatrixChat_middlePanel">
|
||||
{page_element}
|
||||
</main>
|
||||
{right_panel}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
} else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
|
||||
return (
|
||||
<div className="mx_MatrixChat_wrapper">
|
||||
<MatrixToolbar />
|
||||
|
|
|
@ -933,7 +933,7 @@ module.exports = React.createClass({
|
|||
var hr;
|
||||
hr = (<hr className="mx_RoomView_myReadMarker" style={{opacity: 1, width: '99%'}} ref={function(n) {
|
||||
Velocity(n, {opacity: '0', width: '10%'}, {duration: 400, easing: 'easeInSine', delay: 1000, complete: function() {
|
||||
self.setState({readMarkerGhostEventId: undefined});
|
||||
if (!self.unmounted) self.setState({readMarkerGhostEventId: undefined});
|
||||
}});
|
||||
}} />);
|
||||
ret.splice(ghostIndex, 0, (
|
||||
|
|
|
@ -160,8 +160,8 @@ module.exports = React.createClass({
|
|||
// content. So don't call it in render() cycles.
|
||||
isAtBottom: function() {
|
||||
var sn = this._getScrollNode();
|
||||
// + 1 here to avoid fractional pixel rounding errors
|
||||
return sn.scrollHeight - sn.scrollTop <= sn.clientHeight + 1;
|
||||
// + 2 here to avoid fractional pixel rounding errors
|
||||
return sn.scrollHeight - sn.scrollTop <= sn.clientHeight + 2;
|
||||
},
|
||||
|
||||
// check the scroll state and send out backfill requests if necessary.
|
||||
|
|
|
@ -148,7 +148,8 @@ module.exports = React.createClass({
|
|||
|
||||
onUpgradeClicked: function() {
|
||||
dis.dispatch({
|
||||
action: "start_upgrade_registration"
|
||||
//action: "start_upgrade_registration"
|
||||
action: "start_registration" // temporary (https://github.com/vector-im/vector-web/issues/818)
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue