better tutorial navigation

This commit is contained in:
Nicolas Constant 2020-09-12 14:07:30 -04:00
parent 63c2385644
commit d46fa0ffca
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
3 changed files with 10 additions and 3 deletions

View File

@ -15,6 +15,6 @@
<a href (click)="next()" <a href (click)="next()"
title="next" title="next"
class="tutorial__footer--button tutorial__footer--button--next" class="tutorial__footer--button tutorial__footer--button--next"
[class.tutorial__footer--button--disabled]="!nextAvailable">next</a> [class.tutorial__footer--button--disabled]="!nextAvailable"><span *ngIf="!tutorialEnded">next</span><span *ngIf="tutorialEnded">close</span></a>
</div> </div>
</div> </div>

View File

@ -47,7 +47,7 @@ $footer-height: 30px;
&--navigate { &--navigate {
&:hover { &:hover {
text-decoration: none; text-decoration: none;
background-color: rgb(0, 74, 109); background-color: rgb(0, 117, 172);
} }
} }

View File

@ -11,7 +11,8 @@ export class TutorialEnhancedComponent implements OnInit {
previousAvailable = false; previousAvailable = false;
nextAvailable = true; nextAvailable = true;
index = 0; index = 0;
private maxIndex = 5; tutorialEnded = false;
private maxIndex = 3;
constructor() { } constructor() { }
@ -38,6 +39,12 @@ export class TutorialEnhancedComponent implements OnInit {
} }
private checkState() { private checkState() {
if(this.index >= this.maxIndex - 1){
this.tutorialEnded = true;
} else {
this.tutorialEnded = false;
}
if (this.index === 0) { if (this.index === 0) {
this.previousAvailable = false; this.previousAvailable = false;
} else { } else {