Prefer icons from modrinth/assets (#3394)

Replaced all icon usages of `apps/frontend/src/assets/image/utils` for `@modrinth/assets`.

The only icon which has been changed is the `WorldIcon`, which has been replaced by the `GlobeIcon`.
This commit is contained in:
Erb3
2025-03-19 02:28:23 +01:00
committed by GitHub
parent a19bf3dc0e
commit c4b60f1720
142 changed files with 373 additions and 661 deletions

View File

@@ -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();