This commit is contained in:
orangesurf 2026-08-11 06:23:32 -07:00 committed by GitHub
commit 0569099449
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -223,6 +223,7 @@ export function sleep$(ms: number): Promise<void> {
}
export function handleDemoRedirect(route: ActivatedRoute, router: Router) {
let demoRedirectTimer: ReturnType<typeof setTimeout>;
route.queryParams
.subscribe(params => {
if (params.next) {
@ -230,7 +231,10 @@ export function handleDemoRedirect(route: ActivatedRoute, router: Router) {
const index = path.indexOf(params.next);
if (index >= 0) {
const nextPath = path[(index + 1) % path.length];
setTimeout(() => { window.location.replace(`${params.next}?next=${nextPath}`); }, 15000);
clearTimeout(demoRedirectTimer);
demoRedirectTimer = setTimeout(() => {
window.location.replace(`${path[index]}?next=${nextPath}`);
}, 300000);
}
}
}