Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 2 second delay until window is opened #265

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/src/components/AppBar/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
user,
} from '@/rest';
import {
dandiAboutUrl, lincDocumentationUrl, lincHelpUrl, lincHubUrl, lincBrainUrl, lincWebKNOSSOSUrl

Check warning on line 148 in web/src/components/AppBar/AppBar.vue

View workflow job for this annotation

GitHub Actions / lint-type-check

'dandiAboutUrl' is defined but never used
} from '@/utils/constants';
import UserMenu from '@/components/AppBar/UserMenu.vue';
import logo from '@/assets/linc-logo.svg';
Expand Down Expand Up @@ -213,7 +213,7 @@
return new Promise(resolve => setTimeout(resolve, ms));
}

function sleep(ms: number) {

Check failure on line 216 in web/src/components/AppBar/AppBar.vue

View workflow job for this annotation

GitHub Actions / lint-type-check

'sleep' is already defined
return new Promise(resolve => setTimeout(resolve, ms));
}

Expand Down Expand Up @@ -250,6 +250,7 @@

if (cookieSet) {
console.log('Cookie confirmed, opening WebKNOSSOS...');
await sleep(2000);
window.open(lincWebKNOSSOSUrl, '_blank');
} else {
console.error('Login to WebKNOSSOS did not populate the cookie within the timeout.');
Expand Down
Loading