feat(frontend): Automatically open download modal when filter queries 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
This commit is contained in:
parent
6266f29b99
commit
316fe72ea5
@ -1247,6 +1247,23 @@ if (!route.name.startsWith("type-id-settings")) {
|
|||||||
|
|
||||||
const onUserCollectProject = useClientTry(userCollectProject);
|
const onUserCollectProject = useClientTry(userCollectProject);
|
||||||
|
|
||||||
|
const {version, loader} = route.query;
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
async function setProcessing() {
|
async function setProcessing() {
|
||||||
startLoading();
|
startLoading();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user