Set initial_device_display_name on login and register

Let Vector pass in a default device name, and thread it through everywhere to
set it on login and register calls
This commit is contained in:
Richard van der Hoff 2016-08-11 16:15:42 +01:00
parent cb905dbaef
commit a29325cc46
5 changed files with 47 additions and 15 deletions

View file

@ -44,6 +44,8 @@ module.exports = React.createClass({
// different home server without confusing users.
fallbackHsUrl: React.PropTypes.string,
defaultDeviceDisplayName: React.PropTypes.string,
// login shouldn't know or care how registration is done.
onRegisterClick: React.PropTypes.func.isRequired,
@ -136,7 +138,9 @@ module.exports = React.createClass({
var fallbackHsUrl = hsUrl == this.props.defaultHsUrl ? this.props.fallbackHsUrl : null;
var loginLogic = new Signup.Login(hsUrl, isUrl, fallbackHsUrl);
var loginLogic = new Signup.Login(hsUrl, isUrl, fallbackHsUrl, {
defaultDeviceDisplayName: this.props.defaultDeviceDisplayName,
});
this._loginLogic = loginLogic;
loginLogic.getFlows().then(function(flows) {