aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-01-17 18:13:05 +0100
committerRigel Kent <sendmemail@rigelk.eu>2021-01-17 18:13:05 +0100
commit52a3f561f5357d076ddc36897d5e1d0fc60a8730 (patch)
tree318450ec74b2d1ccfb872617d23d152042dd86de /client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
parent111e6c1807dac4230014bd295118c6b3a51be8f5 (diff)
downloadPeerTube-52a3f561f5357d076ddc36897d5e1d0fc60a8730.tar.gz
PeerTube-52a3f561f5357d076ddc36897d5e1d0fc60a8730.tar.zst
PeerTube-52a3f561f5357d076ddc36897d5e1d0fc60a8730.zip
add username information in profile settings
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts')
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
index 000a2c0ac..957abe555 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts
@@ -25,18 +25,25 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit {
25 25
26 ngOnInit () { 26 ngOnInit () {
27 this.buildForm({ 27 this.buildForm({
28 'user-name': null,
28 'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR, 29 'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
29 description: USER_DESCRIPTION_VALIDATOR 30 description: USER_DESCRIPTION_VALIDATOR
30 }) 31 })
32 this.form.controls['user-name'].disable()
31 33
32 this.userInformationLoaded.subscribe(() => { 34 this.userInformationLoaded.subscribe(() => {
33 this.form.patchValue({ 35 this.form.patchValue({
36 'user-name': this.user.username,
34 'display-name': this.user.account.displayName, 37 'display-name': this.user.account.displayName,
35 description: this.user.account.description 38 description: this.user.account.description
36 }) 39 })
37 }) 40 })
38 } 41 }
39 42
43 get instanceHost () {
44 return window.location.host
45 }
46
40 updateMyProfile () { 47 updateMyProfile () {
41 const displayName = this.form.value['display-name'] 48 const displayName = this.form.value['display-name']
42 const description = this.form.value['description'] || null 49 const description = this.form.value['description'] || null