Improve registration

* Add ability to set the user display name
 * Use display name to guess the username/channel name
 * Add explanations about what is the purpose of a username/channel name
 * Add a loader at the "done" step
This commit is contained in:
Chocobozzz
2019-06-07 16:59:53 +02:00
parent 1a03bea0c4
commit 1f20622f2b
23 changed files with 253 additions and 76 deletions

View File

@@ -73,7 +73,7 @@ function registerUser (url: string, username: string, password: string, specialS
function registerUserWithChannel (options: {
url: string,
user: { username: string, password: string },
user: { username: string, password: string, displayName?: string },
channel: { name: string, displayName: string }
}) {
const path = '/api/v1/users/register'
@@ -84,6 +84,10 @@ function registerUserWithChannel (options: {
channel: options.channel
}
if (options.user.displayName) {
Object.assign(body, { displayName: options.user.displayName })
}
return makePostBodyRequest({
url: options.url,
path,