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

feat(frontend): Automatically open download modal when filter queries are present (on the main mod page) #3133

Merged
17 changes: 17 additions & 0 deletions apps/frontend/src/pages/[type]/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,23 @@

const onUserCollectProject = useClientTry(userCollectProject);

const {version, loader} = route.query;

Check failure on line 1250 in apps/frontend/src/pages/[type]/[id].vue

View workflow job for this annotation

GitHub Actions / Build, Test, and Lint

Replace `version,·loader` with `·version,·loader·`
if (version !== undefined && project.value.game_versions.includes(version)) {
userSelectedGameVersion.value = version;
}
if (loader !== undefined && project.value.loaders.includes(loader)) {
userSelectedPlatform.value = loader;
}

watch(downloadModal, (modal) => {
if (!modal) return;

// route.hash returns everything in the hash string, including the # itself
if (route.hash === "#download") {
modal.show();
}
})

Check failure on line 1265 in apps/frontend/src/pages/[type]/[id].vue

View workflow job for this annotation

GitHub Actions / Build, Test, and Lint

Insert `;`

async function setProcessing() {
startLoading();

Expand Down
Loading