Revision 58281
Added by Stefania Martziou about 4 years ago
join.component.ts | ||
---|---|---|
13 | 13 |
|
14 | 14 |
repositoriesOfUser: RepositorySnippet[]; |
15 | 15 |
|
16 |
loadingMessage: string; |
|
17 |
|
|
16 | 18 |
constructor(private repositoryService: RepositoryService, |
17 | 19 |
private sharedService: SharedService, |
18 | 20 |
private router: Router) { |
... | ... | |
20 | 22 |
|
21 | 23 |
ngOnInit() { |
22 | 24 |
|
25 |
this.loadingMessage = ' '; |
|
26 |
|
|
23 | 27 |
let body = document.getElementsByTagName('body')[0]; |
24 | 28 |
body.classList.remove("landing"); |
25 | 29 |
body.classList.add("dashboard"); |
... | ... | |
28 | 32 |
this.repositoriesOfUser = this.sharedService.getRepositoriesOfUser(); |
29 | 33 |
if(this.repositoriesOfUser.length>0) |
30 | 34 |
this.router.navigate([`/repository/${this.repositoriesOfUser[0].id}/dashboard`]); |
35 |
else |
|
36 |
this.loadingMessage = null; |
|
31 | 37 |
} else { |
32 | 38 |
this.getReposOfUser(); |
33 | 39 |
} |
... | ... | |
41 | 47 |
this.repositoriesOfUser = repos; |
42 | 48 |
if(this.repositoriesOfUser.length>0) |
43 | 49 |
this.router.navigate([`/repository/${this.repositoriesOfUser[0].id}/dashboard`]); |
50 |
else |
|
51 |
this.loadingMessage = null; |
|
44 | 52 |
}, |
45 | 53 |
error => { console.log(error); } |
46 | 54 |
); |
Also available in: Unified diff
Almost final commit for the new UI