Enhance tutorial management with user-specific features and improve error handling

This commit is contained in:
liosha84
2025-07-08 20:36:37 +03:00
parent ec1581e88a
commit b37f62e59b
13 changed files with 259 additions and 29 deletions
@@ -141,8 +141,10 @@ export class MainComponent implements OnInit{
this.storageService.clean();
//window.location.reload();
this.router.navigate([environment.default_page]);
window.location.reload();
this.router.navigate([environment.default_page]).then(() => {
window.location.reload();
});
//window.location.reload();
},
error: err => {
console.log(err);
@@ -175,7 +177,7 @@ export class MainComponent implements OnInit{
this.authService.login(this.dialogLoginData.username, this.dialogLoginData.password).subscribe(
data => {
//this.storageService.saveToken(data.token);
this.storageService.saveUser(data);
this.isLoggedIn = true;
@@ -191,8 +193,7 @@ export class MainComponent implements OnInit{
}
);
// do something here with the data
dialogSubmitSubscription.unsubscribe();
});
}