activating saving tutorial state

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

View File

@ -62,9 +62,6 @@ export class AppComponent implements OnInit, OnDestroy {
}
ngOnInit(): void {
// disable tutorial for future update
//localStorage.setItem('tutorial', JSON.stringify(true));
this.paramsSub = this.activatedRoute.queryParams.subscribe(params => {
const code = params['code'];
if (!code) {
@ -164,11 +161,7 @@ export class AppComponent implements OnInit, OnDestroy {
enhancedTutorialVisible: boolean;
private checkEnhancedTutorial() {
let enhancedTutorialDesactivated = JSON.parse(localStorage.getItem('tutorial'));
console.warn(enhancedTutorialDesactivated);
if (!this.floatingColumnActive && !this.tutorialActive && !enhancedTutorialDesactivated) {
console.warn('load enhanced tutorial');
setTimeout(() => {
this.enhancedTutorialActive = true;
setTimeout(() => {
@ -179,12 +172,12 @@ export class AppComponent implements OnInit, OnDestroy {
}
closeTutorial(){
console.warn('close tutorial');
localStorage.setItem('tutorial', JSON.stringify(true));
this.enhancedTutorialVisible = false;
setTimeout(() => {
this.enhancedTutorialActive = false;
}, 400);
//localStorage.setItem('tutorial', JSON.stringify(true));
}
ngOnDestroy(): void {