diff options
Diffstat (limited to 'client/src/app/+signup/+register/register.component.html')
-rw-r--r-- | client/src/app/+signup/+register/register.component.html | 131 |
1 files changed, 94 insertions, 37 deletions
diff --git a/client/src/app/+signup/+register/register.component.html b/client/src/app/+signup/+register/register.component.html index 5c4fe5f0b..76b145604 100644 --- a/client/src/app/+signup/+register/register.component.html +++ b/client/src/app/+signup/+register/register.component.html | |||
@@ -1,64 +1,121 @@ | |||
1 | <div class="margin-content"> | 1 | <div> |
2 | 2 | ||
3 | <div class="signup-disabled" *ngIf="signupDisabled"> | 3 | <div class="signup-disabled" *ngIf="signupDisabled"> |
4 | <div class="alert alert-warning" i18n>Signup is not enabled on this instance.</div> | 4 | <div class="alert alert-warning" i18n>Signup is not enabled on this instance.</div> |
5 | </div> | 5 | </div> |
6 | 6 | ||
7 | <ng-container *ngIf="!signupDisabled"> | 7 | <ng-container *ngIf="!signupDisabled"> |
8 | <div i18n class="title-page title-page-single"> | 8 | <h1 i18n class="header-title"> |
9 | <strong class="underline-orange">{{ instanceName }}</strong> | ||
10 | > | ||
9 | Create an account | 11 | Create an account |
10 | </div> | 12 | </h1> |
11 | 13 | ||
12 | <my-signup-success *ngIf="signupDone" [message]="success"></my-signup-success> | 14 | <div class="register-content"> |
13 | <div *ngIf="info" class="alert alert-info">{{ info }}</div> | 15 | <my-custom-stepper linear> |
14 | 16 | ||
15 | <div class="wrapper" [hidden]="signupDone"> | 17 | <cdk-step i18n-label label="About" [editable]="!signupSuccess"> |
16 | <div class="register-form"> | 18 | <my-signup-step-title mascotImageName="about" i18n> |
17 | <my-custom-stepper linear *ngIf="!signupDone"> | 19 | <strong>Create an account</strong> |
18 | <cdk-step [stepControl]="formStepTerms" i18n-label="Stepper label for the registration page describing terms of service" label="Terms"> | 20 | <div>on {{ instanceName }}</div> |
19 | <div class="instance-information"> | 21 | </my-signup-step-title> |
20 | <my-instance-about-accordion | 22 | |
21 | (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels" | 23 | <my-register-step-about [videoUploadDisabled]="videoUploadDisabled"></my-register-step-about> |
22 | pluginScope="signup" pluginHook="filter:signup.instance-about-plugin-panels.create.result" | 24 | |
23 | ></my-instance-about-accordion> | 25 | <div class="step-buttons"> |
24 | </div> | 26 | <a i18n class="skip-step underline-orange" routerLink="/login"> |
27 | <strong>I already have an account</strong>, I log in | ||
28 | </a> | ||
25 | 29 | ||
26 | <my-register-step-terms | 30 | <button i18n cdkStepperNext>I create an account</button> |
27 | [hasCodeOfConduct]="!!aboutHtml.codeOfConduct" | 31 | </div> |
28 | [minimumAge]="minimumAge" | 32 | </cdk-step> |
29 | (formBuilt)="onTermsFormBuilt($event)" (termsClick)="onTermsClick()" (codeOfConductClick)="onCodeOfConductClick()" | ||
30 | ></my-register-step-terms> | ||
31 | 33 | ||
34 | <cdk-step [stepControl]="formStepTerms" i18n-label label="Terms" [editable]="!signupSuccess"> | ||
35 | <my-signup-step-title mascotImageName="terms" i18n> | ||
36 | <strong>Terms</strong> | ||
37 | <div>of {{ instanceName }}</div> | ||
38 | </my-signup-step-title> | ||
39 | |||
40 | <my-instance-about-accordion | ||
41 | [displayInstanceName]="false" | ||
42 | (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels" | ||
43 | pluginScope="signup" pluginHook="filter:signup.instance-about-plugin-panels.create.result" | ||
44 | ></my-instance-about-accordion> | ||
45 | |||
46 | <my-register-step-terms | ||
47 | [hasCodeOfConduct]="!!aboutHtml.codeOfConduct" | ||
48 | [minimumAge]="minimumAge" | ||
49 | (formBuilt)="onTermsFormBuilt($event)" (termsClick)="onTermsClick()" (codeOfConductClick)="onCodeOfConductClick()" | ||
50 | ></my-register-step-terms> | ||
51 | |||
52 | <div class="step-buttons"> | ||
53 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> | ||
32 | <button cdkStepperNext [disabled]="!formStepTerms || !formStepTerms.valid">{{ defaultNextStepButtonLabel }}</button> | 54 | <button cdkStepperNext [disabled]="!formStepTerms || !formStepTerms.valid">{{ defaultNextStepButtonLabel }}</button> |
33 | </cdk-step> | 55 | </div> |
56 | </cdk-step> | ||
57 | |||
58 | <cdk-step [stepControl]="formStepUser" label="My account" [editable]="!signupSuccess"> | ||
59 | <my-signup-step-title mascotImageName="account" i18n> | ||
60 | <strong>Setup</strong> | ||
61 | <div>your account</div> | ||
62 | </my-signup-step-title> | ||
34 | 63 | ||
35 | <cdk-step [stepControl]="formStepUser" i18n-label="Stepper label for the registration page asking user information" label="User"> | 64 | <my-register-step-user |
36 | <my-register-step-user (formBuilt)="onUserFormBuilt($event)" [videoUploadDisabled]="videoUploadDisabled"></my-register-step-user> | 65 | (formBuilt)="onUserFormBuilt($event)" |
66 | [videoUploadDisabled]="videoUploadDisabled" [requiresEmailVerification]="requiresEmailVerification" | ||
67 | ></my-register-step-user> | ||
37 | 68 | ||
69 | <div class="step-buttons"> | ||
38 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> | 70 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> |
39 | <button cdkStepperNext [disabled]="!formStepUser || !formStepUser.valid" (click)="videoUploadDisabled && signup()">{{ stepUserButtonLabel }}</button> | 71 | <button cdkStepperNext [disabled]="!formStepUser || !formStepUser.valid" (click)="videoUploadDisabled && signup()">{{ stepUserButtonLabel }}</button> |
40 | </cdk-step> | 72 | </div> |
73 | </cdk-step> | ||
41 | 74 | ||
42 | <cdk-step [stepControl]="formStepChannel" i18n-label="Stepper label for the registration page asking information about the default channel" label="Channel" *ngIf="!videoUploadDisabled"> | 75 | <cdk-step *ngIf="!videoUploadDisabled" [optional]="true" [stepControl]="formStepChannel" i18n-label label="My channel" [editable]="!signupSuccess"> |
43 | <my-register-step-channel (formBuilt)="onChannelFormBuilt($event)" [username]="getUsername()"></my-register-step-channel> | 76 | <my-signup-step-title mascotImageName="channel" i18n> |
77 | <div>Create</div> | ||
78 | <strong>your first channel</strong> | ||
79 | </my-signup-step-title> | ||
44 | 80 | ||
81 | <my-register-step-channel | ||
82 | (formBuilt)="onChannelFormBuilt($event)" | ||
83 | [videoQuota]="videoQuota" [instanceName]="instanceName" [username]="getUsername()" | ||
84 | ></my-register-step-channel> | ||
85 | |||
86 | <div class="step-buttons"> | ||
45 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> | 87 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> |
88 | |||
89 | <div class="skip-step"> | ||
90 | <span class="underline-orange" role="button" (click)="skipChannelCreation()"> | ||
91 | <strong i18n>I don't want to create a channel</strong> | ||
92 | </span> | ||
93 | |||
94 | <div class="skip-step-description" i18n>You will be able to create a channel later</div> | ||
95 | </div> | ||
96 | |||
46 | <button cdkStepperNext [disabled]="!formStepChannel || !formStepChannel.valid || hasSameChannelAndAccountNames()" (click)="signup()" i18n> | 97 | <button cdkStepperNext [disabled]="!formStepChannel || !formStepChannel.valid || hasSameChannelAndAccountNames()" (click)="signup()" i18n> |
47 | Create my account | 98 | Create my account |
48 | </button> | 99 | </button> |
49 | </cdk-step> | 100 | </div> |
101 | </cdk-step> | ||
50 | 102 | ||
51 | <cdk-step i18n-label label="Done" editable="false"> | 103 | <cdk-step #lastStep i18n-label label="Done!" [editable]="false"> |
52 | <div *ngIf="!signupDone && !error" class="done-loader"> | 104 | <div *ngIf="!signupSuccess && !signupError" class="done-loader"> |
53 | <my-loader [loading]="true"></my-loader> | 105 | <my-loader [loading]="true"></my-loader> |
54 | 106 | ||
55 | <div i18n>PeerTube is creating your account...</div> | 107 | <div i18n>PeerTube is creating your account...</div> |
56 | </div> | 108 | </div> |
109 | |||
110 | <div *ngIf="signupError" class="alert alert-danger">{{ signupError }}</div> | ||
57 | 111 | ||
58 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> | 112 | <my-signup-success *ngIf="signupSuccess" [requiresEmailVerification]="requiresEmailVerification"></my-signup-success> |
59 | </cdk-step> | 113 | |
60 | </my-custom-stepper> | 114 | <div *ngIf="signupError" class="steps-button"> |
61 | </div> | 115 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> |
116 | </div> | ||
117 | </cdk-step> | ||
118 | </my-custom-stepper> | ||
62 | </div> | 119 | </div> |
63 | </ng-container> | 120 | </ng-container> |
64 | 121 | ||