Servers: Only apply game version filters when searching for non-modpack projects, auto-populate plugin loaders (#3403)

This commit is contained in:
Prospector 2025-03-18 18:27:15 -07:00 committed by GitHub
parent 77021d2af8
commit a19bf3dc0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,7 +398,7 @@ async function updateServerContext() {
const serverFilters = computed(() => {
const filters = [];
if (server.value) {
if (server.value && projectType.value.id !== "modpack") {
const gameVersion = server.value.general?.mc_version;
if (gameVersion) {
filters.push({
@ -418,6 +418,15 @@ const serverFilters = computed(() => {
});
}
const pluginLoaders = ["paper", "purpur"];
if (platform && pluginLoaders.includes(platform)) {
filters.push({
type: "plugin_loader",
option: platform,
});
}
if (serverHideInstalled.value) {
const installedMods = server.value.content?.data
.filter((x) => x.project_id)