You've already forked AstralRinth
forked from didirus/AstralRinth
Merge commit 'b9d90aa6356c88c8d661c04ab84194cf08ea0198' into feature-clean
This commit is contained in:
@@ -34,7 +34,8 @@
|
||||
</nuxt-link>
|
||||
<ButtonStyled>
|
||||
<nuxt-link :to="`/servers/manage/${server.serverId}/content`">
|
||||
<LeftArrowIcon /> Back to server
|
||||
<LeftArrowIcon />
|
||||
Back to server
|
||||
</nuxt-link>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
@@ -139,7 +140,7 @@
|
||||
<template #locked-mod_loader>
|
||||
{{ formatMessage(messages.modLoaderProvidedByServer) }}
|
||||
</template>
|
||||
<template #sync-button> {{ formatMessage(messages.syncFilterButton) }} </template>
|
||||
<template #sync-button> {{ formatMessage(messages.syncFilterButton) }}</template>
|
||||
</SearchSidebarFilter>
|
||||
</div>
|
||||
</aside>
|
||||
@@ -188,7 +189,10 @@
|
||||
</DropdownSelect>
|
||||
<div class="lg:hidden">
|
||||
<ButtonStyled>
|
||||
<button @click="filtersMenuOpen = true"><FilterIcon /> Filter results...</button>
|
||||
<button @click="filtersMenuOpen = true">
|
||||
<FilterIcon />
|
||||
Filter results...
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
<ButtonStyled circular>
|
||||
@@ -286,7 +290,7 @@
|
||||
:to="`/${projectType.id}/${result.slug ? result.slug : result.project_id}`"
|
||||
>
|
||||
<NewProjectCard :project="result" :categories="result.display_categories">
|
||||
<template v-if="false" #actions> </template>
|
||||
<template v-if="false" #actions></template>
|
||||
</NewProjectCard>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
@@ -317,16 +321,21 @@ import {
|
||||
NewProjectCard,
|
||||
SearchFilterControl,
|
||||
} from "@modrinth/ui";
|
||||
import { CheckIcon, DownloadIcon, GameIcon, LeftArrowIcon, XIcon } from "@modrinth/assets";
|
||||
import {
|
||||
CheckIcon,
|
||||
DownloadIcon,
|
||||
GameIcon,
|
||||
LeftArrowIcon,
|
||||
XIcon,
|
||||
SearchIcon,
|
||||
FilterIcon,
|
||||
GridIcon,
|
||||
ListIcon,
|
||||
ImageIcon,
|
||||
} from "@modrinth/assets";
|
||||
import { computed } from "vue";
|
||||
import ProjectCard from "~/components/ui/ProjectCard.vue";
|
||||
import LogoAnimated from "~/components/brand/LogoAnimated.vue";
|
||||
|
||||
import SearchIcon from "~/assets/images/utils/search.svg?component";
|
||||
import FilterIcon from "~/assets/images/utils/filter.svg?component";
|
||||
import GridIcon from "~/assets/images/utils/grid.svg?component";
|
||||
import ListIcon from "~/assets/images/utils/list.svg?component";
|
||||
import ImageIcon from "~/assets/images/utils/image.svg?component";
|
||||
// import AdPlaceholder from "~/components/ui/AdPlaceholder.vue";
|
||||
import NavTabs from "~/components/ui/NavTabs.vue";
|
||||
|
||||
@@ -344,6 +353,7 @@ const flags = useFeatureFlags();
|
||||
const auth = await useAuth();
|
||||
|
||||
const projectType = ref();
|
||||
|
||||
function setProjectType() {
|
||||
const projType = tags.value.projectTypes.find(
|
||||
(x) => x.id === route.path.replaceAll(/^\/|s\/?$/g, ""), // Removes prefix `/` and suffixes `s` and `s/`
|
||||
@@ -353,6 +363,7 @@ function setProjectType() {
|
||||
projectType.value = projType;
|
||||
}
|
||||
}
|
||||
|
||||
setProjectType();
|
||||
router.afterEach(() => {
|
||||
setProjectType();
|
||||
@@ -398,7 +409,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 +429,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)
|
||||
|
||||
Reference in New Issue
Block a user