HOTFIX: Fix title disapearring in navbar, add error handling notification for bad xml files
This commit is contained in:
parent
3eac35ad05
commit
c24376e70f
@ -114,6 +114,11 @@ export class AvailableForumsEffect {
|
|||||||
icon: 'alert-circle',
|
icon: 'alert-circle',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
case 406: {
|
||||||
|
this.toastService.danger('', 'Nieprawidłowy format pliku', {
|
||||||
|
icon: 'alert-circle',
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.store$.dispatch(
|
this.store$.dispatch(
|
||||||
AvailableForumActions.setLoadingFile({ status: false })
|
AvailableForumActions.setLoadingFile({ status: false })
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
<nb-layout>
|
<nb-layout>
|
||||||
<nb-layout-header fixed>
|
<nb-layout-header fixed>
|
||||||
<div class="actions-container">
|
<div class="actions-container">
|
||||||
<h6 *ngIf="router.url === '/my-profile'">Mój profil</h6>
|
<h6>{{ currentPage() }}</h6>
|
||||||
<h6 *ngIf="regex.test(router.url)">Wybór dyskusji</h6>
|
|
||||||
<h6 *ngIf="router.url.includes('/dimension')">Przegląd wymiaru</h6>
|
|
||||||
<h6 *ngIf="router.url.includes('/topic')">Przegląd dyskusji</h6>
|
|
||||||
<h6 *ngIf="router.url.includes('/graph')">Wizualizacja dyskusji</h6>
|
|
||||||
<nb-actions>
|
<nb-actions>
|
||||||
<nb-action
|
<nb-action
|
||||||
icon="power"
|
icon="power"
|
||||||
|
@ -12,12 +12,25 @@ export class MyProfileComponent implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
private authService: NbAuthService,
|
private authService: NbAuthService,
|
||||||
private tokenService: NbTokenService,
|
private tokenService: NbTokenService,
|
||||||
public router: Router
|
private router: Router
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
|
||||||
public regex = /^\/my-profile\/discussions\/\d+$/g;
|
public currentPage() {
|
||||||
|
const regex = /^\/my-profile\/discussions\/\d+$/g;
|
||||||
|
const url = this.router.url;
|
||||||
|
console.log('Testing');
|
||||||
|
if (url === '/my-profile') {
|
||||||
|
return 'Mój profil';
|
||||||
|
} else if (url.includes('/my-profile/discussions/')) {
|
||||||
|
return 'Przegląd dyskusji';
|
||||||
|
} else if (url.includes('/dimension')) {
|
||||||
|
return 'Przegląd wymiaru';
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
this.tokenService.clear();
|
this.tokenService.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user