diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-17 15:45:42 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | 8a19bee1a1ee39f973bb37429e4f73c3f2873cdb (patch) | |
tree | 33c93ef19451d7e46d4be74ce0681359d2dcc70e /client/src/app/signup | |
parent | 965c4b22d0e4d2f853501e844e6ebbb861bd389d (diff) | |
download | PeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.tar.gz PeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.tar.zst PeerTube-8a19bee1a1ee39f973bb37429e4f73c3f2873cdb.zip |
Add ability to set a name to a channel
Diffstat (limited to 'client/src/app/signup')
-rw-r--r-- | client/src/app/signup/signup.component.html | 15 | ||||
-rw-r--r-- | client/src/app/signup/signup.component.scss | 9 | ||||
-rw-r--r-- | client/src/app/signup/signup.component.ts | 4 |
3 files changed, 24 insertions, 4 deletions
diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html index 565b695d9..5fd630b09 100644 --- a/client/src/app/signup/signup.component.html +++ b/client/src/app/signup/signup.component.html | |||
@@ -23,10 +23,17 @@ | |||
23 | <form role="form" (ngSubmit)="signup()" [formGroup]="form"> | 23 | <form role="form" (ngSubmit)="signup()" [formGroup]="form"> |
24 | <div class="form-group"> | 24 | <div class="form-group"> |
25 | <label for="username" i18n>Username</label> | 25 | <label for="username" i18n>Username</label> |
26 | <input | 26 | |
27 | type="text" id="username" i18n-placeholder placeholder="Username" | 27 | <div class="input-group"> |
28 | formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" | 28 | <input |
29 | > | 29 | type="text" id="username" i18n-placeholder placeholder="Example: neil_amstrong" |
30 | formControlName="username" [ngClass]="{ 'input-error': formErrors['username'] }" | ||
31 | > | ||
32 | <div class="input-group-append"> | ||
33 | <span class="input-group-text">@{{ instanceHost }}</span> | ||
34 | </div> | ||
35 | </div> | ||
36 | |||
30 | <div *ngIf="formErrors.username" class="form-error"> | 37 | <div *ngIf="formErrors.username" class="form-error"> |
31 | {{ formErrors.username }} | 38 | {{ formErrors.username }} |
32 | </div> | 39 | </div> |
diff --git a/client/src/app/signup/signup.component.scss b/client/src/app/signup/signup.component.scss index e6d484297..1c992faf5 100644 --- a/client/src/app/signup/signup.component.scss +++ b/client/src/app/signup/signup.component.scss | |||
@@ -14,9 +14,18 @@ | |||
14 | margin: 30px 0; | 14 | margin: 30px 0; |
15 | } | 15 | } |
16 | 16 | ||
17 | .input-group { | ||
18 | @include peertube-input-group(340px); | ||
19 | } | ||
20 | |||
17 | input:not([type=submit]) { | 21 | input:not([type=submit]) { |
18 | @include peertube-input-text(340px); | 22 | @include peertube-input-text(340px); |
19 | display: block; | 23 | display: block; |
24 | |||
25 | &#username { | ||
26 | width: auto; | ||
27 | flex-grow: 1; | ||
28 | } | ||
20 | } | 29 | } |
21 | 30 | ||
22 | input[type=submit] { | 31 | input[type=submit] { |
diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts index 076dac454..ed68487ae 100644 --- a/client/src/app/signup/signup.component.ts +++ b/client/src/app/signup/signup.component.ts | |||
@@ -34,6 +34,10 @@ export class SignupComponent extends FormReactive implements OnInit { | |||
34 | return this.serverService.getConfig().user.videoQuota | 34 | return this.serverService.getConfig().user.videoQuota |
35 | } | 35 | } |
36 | 36 | ||
37 | get instanceHost () { | ||
38 | return window.location.host | ||
39 | } | ||
40 | |||
37 | ngOnInit () { | 41 | ngOnInit () { |
38 | this.buildForm({ | 42 | this.buildForm({ |
39 | username: this.userValidatorsService.USER_USERNAME, | 43 | username: this.userValidatorsService.USER_USERNAME, |