]>
Commit | Line | Data |
---|---|---|
1 | <div> | |
2 | ||
3 | <div class="margin-content signup-disabled" *ngIf="signupDisabled"> | |
4 | <div class="alert alert-warning" i18n>Signup is not enabled on this instance.</div> | |
5 | </div> | |
6 | ||
7 | <ng-container *ngIf="!signupDisabled"> | |
8 | <h1 class="title-page-v2"> | |
9 | <strong class="underline-orange">{{ instanceName }}</strong> | |
10 | > | |
11 | <my-signup-label [requiresApproval]="requiresApproval"></my-signup-label> | |
12 | </h1> | |
13 | ||
14 | <div class="register-content"> | |
15 | <my-custom-stepper linear> | |
16 | ||
17 | <cdk-step i18n-label label="About" [editable]="!signupSuccess"> | |
18 | <my-signup-step-title mascotImageName="about"> | |
19 | <strong> | |
20 | <my-signup-label [requiresApproval]="requiresApproval"></my-signup-label> | |
21 | </strong> | |
22 | ||
23 | <div i18n>on {{ instanceName }}</div> | |
24 | </my-signup-step-title> | |
25 | ||
26 | <my-register-step-about [requiresApproval]="requiresApproval" [videoUploadDisabled]="videoUploadDisabled"></my-register-step-about> | |
27 | ||
28 | <div class="step-buttons"> | |
29 | <a i18n class="skip-step underline-orange" routerLink="/login"> | |
30 | <strong>I already have an account</strong>, I log in | |
31 | </a> | |
32 | ||
33 | <button cdkStepperNext> | |
34 | <my-signup-label [requiresApproval]="requiresApproval"></my-signup-label> | |
35 | </button> | |
36 | </div> | |
37 | </cdk-step> | |
38 | ||
39 | <cdk-step [stepControl]="formStepTerms" i18n-label label="Terms" [editable]="!signupSuccess"> | |
40 | <my-signup-step-title mascotImageName="terms" i18n> | |
41 | <strong>Terms</strong> | |
42 | <div>of {{ instanceName }}</div> | |
43 | </my-signup-step-title> | |
44 | ||
45 | <my-instance-about-accordion | |
46 | #instanceAboutAccordion | |
47 | [displayInstanceName]="false" | |
48 | (init)="onInstanceAboutAccordionInit($event)" [panels]="instanceInformationPanels" | |
49 | pluginScope="signup" pluginHook="filter:signup.instance-about-plugin-panels.create.result" | |
50 | ></my-instance-about-accordion> | |
51 | ||
52 | <my-register-step-terms | |
53 | [hasCodeOfConduct]="!!aboutHtml.codeOfConduct" [minimumAge]="minimumAge" [instanceName]="instanceName" | |
54 | [requiresApproval]="requiresApproval" | |
55 | (formBuilt)="onTermsFormBuilt($event)" (termsClick)="onTermsClick()" (codeOfConductClick)="onCodeOfConductClick()" | |
56 | ></my-register-step-terms> | |
57 | ||
58 | <div class="step-buttons"> | |
59 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> | |
60 | <button cdkStepperNext [disabled]="!formStepTerms || !formStepTerms.valid">{{ defaultNextStepButtonLabel }}</button> | |
61 | </div> | |
62 | </cdk-step> | |
63 | ||
64 | <cdk-step [stepControl]="formStepUser" i18n-label label="My account" [editable]="!signupSuccess"> | |
65 | <my-signup-step-title mascotImageName="account" i18n> | |
66 | <strong>Setup</strong> | |
67 | <div>your account</div> | |
68 | </my-signup-step-title> | |
69 | ||
70 | <my-register-step-user | |
71 | (formBuilt)="onUserFormBuilt($event)" | |
72 | [videoUploadDisabled]="videoUploadDisabled" [requiresEmailVerification]="requiresEmailVerification" | |
73 | ></my-register-step-user> | |
74 | ||
75 | <div class="step-buttons"> | |
76 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> | |
77 | <button cdkStepperNext [disabled]="!formStepUser || !formStepUser.valid" (click)="videoUploadDisabled && signup()">{{ stepUserButtonLabel }}</button> | |
78 | </div> | |
79 | </cdk-step> | |
80 | ||
81 | <cdk-step *ngIf="!videoUploadDisabled" [optional]="true" [stepControl]="formStepChannel" i18n-label label="My channel" [editable]="!signupSuccess"> | |
82 | <my-signup-step-title mascotImageName="channel" i18n> | |
83 | <div>Create</div> | |
84 | <strong>your first channel</strong> | |
85 | </my-signup-step-title> | |
86 | ||
87 | <my-register-step-channel | |
88 | (formBuilt)="onChannelFormBuilt($event)" | |
89 | [videoQuota]="videoQuota" [instanceName]="instanceName" [username]="getUsername()" | |
90 | ></my-register-step-channel> | |
91 | ||
92 | <div class="step-buttons"> | |
93 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> | |
94 | ||
95 | <div class="skip-step"> | |
96 | <button class="underline-orange button-unstyle" (click)="skipChannelCreation()"> | |
97 | <strong i18n>I don't want to create a channel</strong> | |
98 | </button> | |
99 | ||
100 | <div class="skip-step-description" i18n>You will be able to create a channel later</div> | |
101 | </div> | |
102 | ||
103 | <button cdkStepperNext [disabled]="!formStepChannel || !formStepChannel.valid || hasSameChannelAndAccountNames()" (click)="signup()"> | |
104 | <my-signup-label [requiresApproval]="requiresApproval"></my-signup-label> | |
105 | </button> | |
106 | </div> | |
107 | </cdk-step> | |
108 | ||
109 | <cdk-step #lastStep i18n-label label="Done!" [editable]="false"> | |
110 | <!-- Account creation can be a little bit long so display a loader --> | |
111 | <div *ngIf="!requiresApproval && !signupSuccess && !signupError" class="done-loader"> | |
112 | <my-loader [loading]="true"></my-loader> | |
113 | ||
114 | <div i18n>PeerTube is creating your account...</div> | |
115 | </div> | |
116 | ||
117 | <div *ngIf="signupError" class="alert alert-danger">{{ signupError }}</div> | |
118 | ||
119 | <my-signup-success-before-email | |
120 | *ngIf="signupSuccess" | |
121 | [requiresEmailVerification]="requiresEmailVerification" [requiresApproval]="requiresApproval" [instanceName]="instanceName" | |
122 | ></my-signup-success-before-email> | |
123 | ||
124 | <div *ngIf="signupError" class="step-buttons"> | |
125 | <button cdkStepperPrevious>{{ defaultPreviousStepButtonLabel }}</button> | |
126 | </div> | |
127 | </cdk-step> | |
128 | </my-custom-stepper> | |
129 | </div> | |
130 | </ng-container> | |
131 | ||
132 | </div> |