]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
add username information in profile settings
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-settings / my-account-profile / my-account-profile.component.ts
index 000a2c0ac73b4b84f6ab7399d0399c9abe24eaa6..957abe5555b6b5029cd63adcb0cf452a47fd2a5a 100644 (file)
@@ -25,18 +25,25 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit {
 
   ngOnInit () {
     this.buildForm({
+      'user-name': null,
       'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
       description: USER_DESCRIPTION_VALIDATOR
     })
+    this.form.controls['user-name'].disable()
 
     this.userInformationLoaded.subscribe(() => {
       this.form.patchValue({
+        'user-name': this.user.username,
         'display-name': this.user.account.displayName,
         description: this.user.account.description
       })
     })
   }
 
+  get instanceHost () {
+    return window.location.host
+  }
+
   updateMyProfile () {
     const displayName = this.form.value['display-name']
     const description = this.form.value['description'] || null