more debugging of hash navigation

This commit is contained in:
or-else
2018-04-24 20:32:43 -07:00
parent 9449606adc
commit cd4388d574
+9 -2
View File
@@ -1466,8 +1466,9 @@
view === 'cred' ? view === 'cred' ?
<ValidationView <ValidationView
onSubmit={this.props.onValidateCredentials} credCode={this.props.credCode}
credMethod={this.props.credMethod} credMethod={this.props.credMethod}
onSubmit={this.props.onValidateCredentials}
onCancel={this.props.onCancel} onCancel={this.props.onCancel}
onError={this.props.onError} /> : onError={this.props.onError} /> :
@@ -2417,9 +2418,12 @@
var ValidationView = React.createClass({ var ValidationView = React.createClass({
getInitialState: function() { getInitialState: function() {
return { return {
code: this.props.credCode || '', code: this.props.credCode
}; };
}, },
componentWillReceiveProps: function(nextProps) {
this.setState({code: nextProps.credCode});
},
handleChange: function(e) { handleChange: function(e) {
this.setState({code: e.target.value}); this.setState({code: e.target.value});
}, },
@@ -4158,6 +4162,8 @@
var parsed = parseUrlHash(window.location.hash); var parsed = parseUrlHash(window.location.hash);
parsed.path[0] = this.state.myUserId ? 'contacts' : ''; parsed.path[0] = this.state.myUserId ? 'contacts' : '';
if (parsed.params) { if (parsed.params) {
delete parsed.params.code;
delete parsed.params.method;
delete parsed.params.tab; delete parsed.params.tab;
} }
window.location.hash = composeUrlHash(parsed.path, parsed.params); window.location.hash = composeUrlHash(parsed.path, parsed.params);
@@ -4370,6 +4376,7 @@
errorLevel={this.state.errorLevel} errorLevel={this.state.errorLevel}
topicSelected={this.state.topicSelected} topicSelected={this.state.topicSelected}
credMethod={this.state.credMethod} credMethod={this.state.credMethod}
credCode={this.state.credCode}
serverAddress={this.state.serverAddress} serverAddress={this.state.serverAddress}
onConnectionSettings={this.handleConnectionSettings} onConnectionSettings={this.handleConnectionSettings}