diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-29 11:03:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-29 11:19:54 +0200 |
commit | 1d5342abc43df02cf0bd69b1e865c0f179182eef (patch) | |
tree | f008b43ca8189ee5856e39e5b9d4800bf37f9575 /client/src/app/signup/custom-stepper.component.ts | |
parent | e590b4a512617bbf63595b684386f68abea7d8b8 (diff) | |
download | PeerTube-1d5342abc43df02cf0bd69b1e865c0f179182eef.tar.gz PeerTube-1d5342abc43df02cf0bd69b1e865c0f179182eef.tar.zst PeerTube-1d5342abc43df02cf0bd69b1e865c0f179182eef.zip |
Multi step registration
Diffstat (limited to 'client/src/app/signup/custom-stepper.component.ts')
-rw-r--r-- | client/src/app/signup/custom-stepper.component.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/client/src/app/signup/custom-stepper.component.ts b/client/src/app/signup/custom-stepper.component.ts new file mode 100644 index 000000000..2ae40f3a9 --- /dev/null +++ b/client/src/app/signup/custom-stepper.component.ts | |||
@@ -0,0 +1,19 @@ | |||
1 | import { Component } from '@angular/core' | ||
2 | import { CdkStep, CdkStepper } from '@angular/cdk/stepper' | ||
3 | |||
4 | @Component({ | ||
5 | selector: 'my-custom-stepper', | ||
6 | templateUrl: './custom-stepper.component.html', | ||
7 | styleUrls: [ './custom-stepper.component.scss' ], | ||
8 | providers: [ { provide: CdkStepper, useExisting: CustomStepperComponent } ] | ||
9 | }) | ||
10 | export class CustomStepperComponent extends CdkStepper { | ||
11 | |||
12 | onClick (index: number): void { | ||
13 | this.selectedIndex = index | ||
14 | } | ||
15 | |||
16 | isCompleted (step: CdkStep) { | ||
17 | return step.stepControl && step.stepControl.dirty && step.stepControl.valid | ||
18 | } | ||
19 | } | ||