mirror of https://github.com/Chocobozzz/PeerTube
username field consistency
parent
a8a63b1ffe
commit
9dfaa38c9a
|
@ -3,13 +3,13 @@
|
||||||
<form role="form" (ngSubmit)="updateMyProfile()" [formGroup]="form">
|
<form role="form" (ngSubmit)="updateMyProfile()" [formGroup]="form">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label i18n for="user-name">User name</label>
|
<label i18n for="username">Username</label>
|
||||||
<input
|
<input
|
||||||
type="text" id="user-name" class="form-control"
|
type="text" id="username" class="form-control"
|
||||||
formControlName="user-name"
|
formControlName="username" readonly
|
||||||
>
|
>
|
||||||
<div class="text-muted" i18n>
|
<div class="text-muted" i18n>
|
||||||
People can find you @{{ user.username }}@{{ instanceHost }}
|
People can find you using @{{ user.username }}@{{ instanceHost }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -10,20 +10,16 @@ label {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input#username + .text-muted {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
input[type=text] {
|
input[type=text] {
|
||||||
@include peertube-input-text(340px);
|
@include peertube-input-text(340px);
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
input#user-name {
|
|
||||||
border: none;
|
|
||||||
|
|
||||||
& + div {
|
|
||||||
padding-left: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=submit] {
|
input[type=submit] {
|
||||||
@include peertube-button;
|
@include peertube-button;
|
||||||
@include orange-button;
|
@include orange-button;
|
||||||
|
|
|
@ -25,15 +25,15 @@ export class MyAccountProfileComponent extends FormReactive implements OnInit {
|
||||||
|
|
||||||
ngOnInit () {
|
ngOnInit () {
|
||||||
this.buildForm({
|
this.buildForm({
|
||||||
'user-name': null,
|
username: null,
|
||||||
'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
|
'display-name': USER_DISPLAY_NAME_REQUIRED_VALIDATOR,
|
||||||
description: USER_DESCRIPTION_VALIDATOR
|
description: USER_DESCRIPTION_VALIDATOR
|
||||||
})
|
})
|
||||||
this.form.controls['user-name'].disable()
|
this.form.controls['username'].disable()
|
||||||
|
|
||||||
this.userInformationLoaded.subscribe(() => {
|
this.userInformationLoaded.subscribe(() => {
|
||||||
this.form.patchValue({
|
this.form.patchValue({
|
||||||
'user-name': this.user.username,
|
username: this.user.username,
|
||||||
'display-name': this.user.account.displayName,
|
'display-name': this.user.account.displayName,
|
||||||
description: this.user.account.description
|
description: this.user.account.description
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue