added jitsi api + improvements
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import { Location } from '@angular/common'
|
||||
import {Location} from '@angular/common'
|
||||
import {Router, ActivatedRoute} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-unavailable',
|
||||
@@ -7,14 +8,29 @@ import { Location } from '@angular/common'
|
||||
})
|
||||
export class UnavailableComponent implements OnInit {
|
||||
|
||||
targetRoute = '';
|
||||
|
||||
constructor(
|
||||
private location: Location) {}
|
||||
private location: Location,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.queryParams.subscribe(params => {
|
||||
if(params['target']) {
|
||||
this.targetRoute = params['target'];
|
||||
this.router.navigate([], {queryParams: {target: null}, queryParamsHandling: 'merge'});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
retry() {
|
||||
this.location.back();
|
||||
if(!this.targetRoute || this.targetRoute === "unavailable" || this.targetRoute === "/unavailable") {
|
||||
this.location.back;
|
||||
} else {
|
||||
this.router.navigate([this.targetRoute]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user