mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user