Skip to content

Commit

Permalink
feat(frontend): Automatically open download modal when filter queries…
Browse files Browse the repository at this point in the history
… are present (on the main mod page) (#3133)

* feat: Automatically open download modal when filter queries are present

* chore: Use a hash to open the modal, and make the filter queries independent of the modal
  • Loading branch information
Awakened-Redstone authored Jan 10, 2025
1 parent 6266f29 commit 316fe72
Showing 1 changed file with 17 additions and 0 deletions.
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 @@ if (!route.name.startsWith("type-id-settings")) {
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

0 comments on commit 316fe72

Please sign in to comment.