forked from EVOgeek/Vmeda.Online
commit
b755823b68
|
@ -108,7 +108,7 @@
|
||||||
<p class="item-heading">{{ recording.playbackLabel }}</p>
|
<p class="item-heading">{{ recording.playbackLabel }}</p>
|
||||||
</ion-label>
|
</ion-label>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item *ngFor="let playback of recording.playbacks" button (click)="openPlayback($event, playback)"
|
<ion-item *ngFor="let playback of recording.playbacks" button (click)="openPlayback($event, playback)" detail="false"
|
||||||
class="ion-text-wrap addon-mod_bbb-recording-playback-item">
|
class="ion-text-wrap addon-mod_bbb-recording-playback-item">
|
||||||
<ion-label>
|
<ion-label>
|
||||||
<p>{{ playback.name }}</p>
|
<p>{{ playback.name }}</p>
|
||||||
|
|
|
@ -54,7 +54,7 @@ export class CoreMainMenuAuthGuard implements CanLoad, CanActivate {
|
||||||
|
|
||||||
// Pass redirect data (if any and belongs to same site).
|
// Pass redirect data (if any and belongs to same site).
|
||||||
let redirect = CoreApp.consumeMemoryRedirect();
|
let redirect = CoreApp.consumeMemoryRedirect();
|
||||||
if (!redirect?.timemodified || Date.now() - redirect.timemodified > 20000 || redirect.siteId !== siteId) {
|
if (redirect?.siteId !== siteId) {
|
||||||
redirect = null;
|
redirect = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,16 +44,10 @@ export class CoreRedirectGuard implements CanLoad, CanActivate {
|
||||||
*/
|
*/
|
||||||
private async guard(): Promise<true | UrlTree> {
|
private async guard(): Promise<true | UrlTree> {
|
||||||
const redirect = CoreApp.consumeMemoryRedirect();
|
const redirect = CoreApp.consumeMemoryRedirect();
|
||||||
|
|
||||||
if (!redirect) {
|
if (!redirect) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only accept the redirect if it was stored less than 20 seconds ago.
|
|
||||||
if (!redirect.timemodified || Date.now() - redirect.timemodified > 20000) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Redirect to site path.
|
// Redirect to site path.
|
||||||
if (redirect.siteId && redirect.siteId !== CoreConstants.NO_SITE_ID) {
|
if (redirect.siteId && redirect.siteId !== CoreConstants.NO_SITE_ID) {
|
||||||
const redirectData: CoreRedirectPayload = {
|
const redirectData: CoreRedirectPayload = {
|
||||||
|
|
|
@ -488,6 +488,11 @@ export class CoreAppProvider {
|
||||||
|
|
||||||
this.forgetRedirect();
|
this.forgetRedirect();
|
||||||
|
|
||||||
|
if (redirect && (!redirect.timemodified || Date.now() - redirect.timemodified > 300000)) {
|
||||||
|
// Redirect data is only valid for 5 minutes, discard it.
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return redirect;
|
return redirect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue