]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
username field consistency
authorChocobozzz <me@florianbigard.com>
Mon, 18 Jan 2021 10:45:00 +0000 (11:45 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 18 Jan 2021 10:53:27 +0000 (11:53 +0100)
client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html
client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.scss
client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts

index 7e6b45386aa8ca684a5e14497502bc99d5ddf9cd..eb2a48e154d9b97aa0dd333a472dc424f88e6343 100644 (file)
@@ -3,13 +3,13 @@
 <form role="form" (ngSubmit)="updateMyProfile()" [formGroup]="form">
 
   <div class="form-group">
-    <label i18n for="user-name">User name</label>
+    <label i18n for="username">Username</label>
     <input
-      type="text" id="user-name" class="form-control"
-      formControlName="user-name"
+      type="text" id="username" class="form-control"
+      formControlName="username" readonly
     >
     <div class="text-muted" i18n>
-      People can find you @{{ user.username }}@{{ instanceHost }}
+      People can find you using @{{ user.username }}@{{ instanceHost }}
     </div>
   </div>
 
index 58402a27297fde6687cbc124f89de67cb069ffbd..2d24417a1120c51fb5aef48f025fcca25a69729b 100644 (file)
@@ -10,20 +10,16 @@ label {
   margin-bottom: 15px;
 }
 
+input#username + .text-muted {
+  margin-top: 5px;
+}
+
 input[type=text] {
   @include peertube-input-text(340px);
 
   display: block;
 }
 
-input#user-name {
-  border: none;
-
-  & + div {
-    padding-left: 15px;
-  }
-}
-
 input[type=submit] {
   @include peertube-button;
   @include orange-button;
index 957abe5555b6b5029cd63adcb0cf452a47fd2a5a..80e4446c883b78b101e9bde157d172abdef58814 100644 (file)
@@ -25,15 +25,15 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit {
 
   ngOnInit () {
     this.buildForm({
-      'user-name': null,
+      username: null,
       'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
       description: USER_DESCRIPTION_VALIDATOR
     })
-    this.form.controls['user-name'].disable()
+    this.form.controls['username'].disable()
 
     this.userInformationLoaded.subscribe(() => {
       this.form.patchValue({
-        'user-name': this.user.username,
+        username: this.user.username,
         'display-name': this.user.account.displayName,
         description: this.user.account.description
       })