Skip to content

Commit

Permalink
chore: Use a hash to open the modal, and make the filter queries inde…
Browse files Browse the repository at this point in the history
…pendent of the modal
  • Loading branch information
Awakened-Redstone committed Jan 9, 2025
1 parent 4b08482 commit 073476b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions apps/frontend/src/pages/[type]/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -1247,17 +1247,21 @@ 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;
const {version, loader} = route.query;
if (!version && !loader) return;
if (version && !project.value.game_versions.includes(version)) return;
if (loader && !project.value.loaders.includes(loader)) return;
if (version) userSelectedGameVersion.value = version;
if (loader) userSelectedPlatform.value = loader;
modal.show();
// 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() {
Expand Down

0 comments on commit 073476b

Please sign in to comment.