aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-09 13:20:58 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-12-09 13:20:58 +0100
commite0fea785bf28966da09cdc16a274c9e750b488f4 (patch)
tree23a9eb2a78c326e647276703fa42ee8625cd89c6 /client
parent23cd3129a9f13691c25c1f0935cc781a9aa882db (diff)
downloadPeerTube-e0fea785bf28966da09cdc16a274c9e750b488f4.tar.gz
PeerTube-e0fea785bf28966da09cdc16a274c9e750b488f4.tar.zst
PeerTube-e0fea785bf28966da09cdc16a274c9e750b488f4.zip
add previous button to registration form, with alignment
Diffstat (limited to 'client')
-rw-r--r--client/src/app/+signup/+register/register.component.html6
-rw-r--r--client/src/app/+signup/+register/register.component.scss11
-rw-r--r--client/src/app/+signup/+register/register.component.ts5
3 files changed, 16 insertions, 6 deletions
diff --git a/client/src/app/+signup/+register/register.component.html b/client/src/app/+signup/+register/register.component.html
index bebc5d926..dc1c7496f 100644
--- a/client/src/app/+signup/+register/register.component.html
+++ b/client/src/app/+signup/+register/register.component.html
@@ -26,15 +26,15 @@
26 <cdk-step [stepControl]="formStepUser" i18n-label="Stepper label for the registration page asking user informations" label="User"> 26 <cdk-step [stepControl]="formStepUser" i18n-label="Stepper label for the registration page asking user informations" label="User">
27 <my-register-step-user (formBuilt)="onUserFormBuilt($event)" [videoUploadDisabled]="videoUploadDisabled"></my-register-step-user> 27 <my-register-step-user (formBuilt)="onUserFormBuilt($event)" [videoUploadDisabled]="videoUploadDisabled"></my-register-step-user>
28 28
29 <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button>
29 <button cdkStepperNext [disabled]="!formStepUser || !formStepUser.valid" (click)="videoUploadDisabled && signup()">{{ stepUserButtonLabel }}</button> 30 <button cdkStepperNext [disabled]="!formStepUser || !formStepUser.valid" (click)="videoUploadDisabled && signup()">{{ stepUserButtonLabel }}</button>
30 </cdk-step> 31 </cdk-step>
31 32
32 <cdk-step [stepControl]="formStepChannel" i18n-label="Stepper label for the registration page asking information about the default channel" label="Channel" *ngIf="!videoUploadDisabled"> 33 <cdk-step [stepControl]="formStepChannel" i18n-label="Stepper label for the registration page asking information about the default channel" label="Channel" *ngIf="!videoUploadDisabled">
33 <my-register-step-channel (formBuilt)="onChannelFormBuilt($event)" [username]="getUsername()"></my-register-step-channel> 34 <my-register-step-channel (formBuilt)="onChannelFormBuilt($event)" [username]="getUsername()"></my-register-step-channel>
34 35
35 <button i18n cdkStepperNext (click)="signup()" 36 <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button>
36 [disabled]="!formStepChannel || !formStepChannel.valid || hasSameChannelAndAccountNames()" 37 <button cdkStepperNext [disabled]="!formStepChannel || !formStepChannel.valid || hasSameChannelAndAccountNames()" (click)="signup()" i18n>
37 >
38 Create my account 38 Create my account
39 </button> 39 </button>
40 </cdk-step> 40 </cdk-step>
diff --git a/client/src/app/+signup/+register/register.component.scss b/client/src/app/+signup/+register/register.component.scss
index d22d58c4a..16ba9e2c0 100644
--- a/client/src/app/+signup/+register/register.component.scss
+++ b/client/src/app/+signup/+register/register.component.scss
@@ -55,7 +55,16 @@ input:not([type=submit]) {
55input[type=submit], 55input[type=submit],
56button { 56button {
57 @include peertube-button; 57 @include peertube-button;
58 @include orange-button; 58
59 &[cdkStepperNext] {
60 @include orange-button;
61 float: inline-end;
62 }
63
64 &[cdkStepperPrevious] {
65 @include grey-button;
66 float: inline-start;
67 }
59} 68}
60 69
61.name-information { 70.name-information {
diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts
index b1f5d8e93..8e89bb01a 100644
--- a/client/src/app/+signup/+register/register.component.ts
+++ b/client/src/app/+signup/+register/register.component.ts
@@ -38,7 +38,8 @@ export class RegisterComponent implements OnInit {
38 moderation: false 38 moderation: false
39 } 39 }
40 40
41 defaultNextStepButtonLabel = $localize`Next` 41 defaultPreviousStepButtonLabel = $localize`:Button on the registration form to go to the previous step:Back`
42 defaultNextStepButtonLabel = $localize`:Button on the registration form to go to the previous step:Next`
42 stepUserButtonLabel = this.defaultNextStepButtonLabel 43 stepUserButtonLabel = this.defaultNextStepButtonLabel
43 44
44 private serverConfig: ServerConfig 45 private serverConfig: ServerConfig
@@ -60,7 +61,7 @@ export class RegisterComponent implements OnInit {
60 61
61 this.videoUploadDisabled = this.serverConfig.user.videoQuota === 0 62 this.videoUploadDisabled = this.serverConfig.user.videoQuota === 0
62 this.stepUserButtonLabel = this.videoUploadDisabled 63 this.stepUserButtonLabel = this.videoUploadDisabled
63 ? $localize`Signup` 64 ? $localize`:Button on the registration form to finalize the account and channel creation:Signup`
64 : this.defaultNextStepButtonLabel 65 : this.defaultNextStepButtonLabel
65 66
66 this.hooks.runAction('action:signup.register.init', 'signup') 67 this.hooks.runAction('action:signup.register.init', 'signup')