App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
<template>
|
2025-08-14 21:48:38 +01:00
|
|
|
<div v-if="project.versions.length > 0" class="flex flex-col gap-3">
|
|
|
|
|
<h2 class="text-lg m-0">{{ formatMessage(messages.title) }}</h2>
|
|
|
|
|
<section class="flex flex-col gap-2">
|
|
|
|
|
<h3 class="text-primary text-base m-0">{{ formatMessage(messages.minecraftJava) }}</h3>
|
|
|
|
|
<div class="flex flex-wrap gap-1">
|
|
|
|
|
<TagItem
|
|
|
|
|
v-for="version in getVersionsToDisplay(project, tags.gameVersions)"
|
|
|
|
|
:key="`version-tag-${version}`"
|
|
|
|
|
>
|
|
|
|
|
{{ version }}
|
|
|
|
|
</TagItem>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<section v-if="project.project_type !== 'resourcepack'" class="flex flex-col gap-2">
|
|
|
|
|
<h3 class="text-primary text-base m-0">{{ formatMessage(messages.platforms) }}</h3>
|
|
|
|
|
<div class="flex flex-wrap gap-1">
|
|
|
|
|
<TagItem
|
|
|
|
|
v-for="platform in project.loaders"
|
|
|
|
|
:key="`platform-tag-${platform}`"
|
|
|
|
|
:action="() => router.push(`/${project.project_type}s?g=categories:${platform}`)"
|
|
|
|
|
:style="`--_color: var(--color-platform-${platform})`"
|
|
|
|
|
>
|
2025-12-29 13:58:17 -08:00
|
|
|
<svg v-html="tags.loaders.find((x) => x.name === platform)?.icon"></svg>
|
2025-08-14 21:48:38 +01:00
|
|
|
{{ formatCategory(platform) }}
|
|
|
|
|
</TagItem>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
2025-08-28 15:11:35 -07:00
|
|
|
<section v-if="showEnvironments" class="flex flex-col gap-2">
|
|
|
|
|
<h3 class="text-primary text-base m-0">{{ formatMessage(messages.environments) }}</h3>
|
|
|
|
|
<div class="flex flex-wrap gap-1">
|
2026-01-12 12:41:14 -07:00
|
|
|
<TagItem v-for="(tag, tagIdx) in primaryEnvironmentTags" :key="`environment-tag-${tagIdx}`">
|
2025-08-28 15:11:35 -07:00
|
|
|
<component :is="tag.icon" />
|
2026-01-12 12:41:14 -07:00
|
|
|
{{ formatMessage(tag.label) }}
|
2025-08-28 15:11:35 -07:00
|
|
|
</TagItem>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
2025-08-14 21:48:38 +01:00
|
|
|
<section
|
2025-08-28 15:11:35 -07:00
|
|
|
v-else-if="
|
2025-08-14 21:48:38 +01:00
|
|
|
(project.project_type === 'mod' || project.project_type === 'modpack') &&
|
|
|
|
|
!(project.client_side === 'unsupported' && project.server_side === 'unsupported') &&
|
|
|
|
|
!(project.client_side === 'unknown' && project.server_side === 'unknown')
|
|
|
|
|
"
|
|
|
|
|
class="flex flex-col gap-2"
|
|
|
|
|
>
|
|
|
|
|
<h3 class="text-primary text-base m-0">{{ formatMessage(messages.environments) }}</h3>
|
|
|
|
|
<div class="flex flex-wrap gap-1">
|
|
|
|
|
<TagItem
|
|
|
|
|
v-if="
|
|
|
|
|
(project.client_side === 'required' && project.server_side !== 'required') ||
|
|
|
|
|
(project.client_side === 'optional' && project.server_side === 'optional')
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<ClientIcon aria-hidden="true" />
|
|
|
|
|
Client-side
|
|
|
|
|
</TagItem>
|
|
|
|
|
<TagItem
|
|
|
|
|
v-if="
|
|
|
|
|
(project.server_side === 'required' && project.client_side !== 'required') ||
|
|
|
|
|
(project.client_side === 'optional' && project.server_side === 'optional')
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<ServerIcon aria-hidden="true" />
|
|
|
|
|
Server-side
|
|
|
|
|
</TagItem>
|
|
|
|
|
<TagItem v-if="false">
|
|
|
|
|
<UserIcon aria-hidden="true" />
|
|
|
|
|
Singleplayer
|
|
|
|
|
</TagItem>
|
|
|
|
|
<TagItem
|
|
|
|
|
v-if="
|
2025-12-29 13:58:17 -08:00
|
|
|
// @ts-ignore
|
2025-08-14 21:48:38 +01:00
|
|
|
project.project_type !== 'datapack' &&
|
|
|
|
|
project.client_side !== 'unsupported' &&
|
|
|
|
|
project.server_side !== 'unsupported' &&
|
|
|
|
|
project.client_side !== 'unknown' &&
|
|
|
|
|
project.server_side !== 'unknown'
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<MonitorSmartphoneIcon aria-hidden="true" />
|
|
|
|
|
Client and server
|
|
|
|
|
</TagItem>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ClientIcon, MonitorSmartphoneIcon, ServerIcon, UserIcon } from '@modrinth/assets'
|
2025-08-28 15:11:35 -07:00
|
|
|
import type { EnvironmentV3, GameVersionTag, PlatformTag, ProjectV3Partial } from '@modrinth/utils'
|
2025-08-14 21:48:38 +01:00
|
|
|
import { formatCategory, getVersionsToDisplay } from '@modrinth/utils'
|
2026-01-12 12:41:14 -07:00
|
|
|
import { computed } from 'vue'
|
2025-01-10 17:52:05 +01:00
|
|
|
import { useRouter } from 'vue-router'
|
2025-08-14 21:48:38 +01:00
|
|
|
|
2026-01-12 12:41:14 -07:00
|
|
|
import { defineMessages, useVIntl } from '../../composables/i18n'
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
import TagItem from '../base/TagItem.vue'
|
2026-01-12 12:41:14 -07:00
|
|
|
import { getEnvironmentTags } from './settings/environment/environments'
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
|
|
|
|
|
const { formatMessage } = useVIntl()
|
2025-01-10 17:52:05 +01:00
|
|
|
const router = useRouter()
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
|
|
|
|
|
type EnvironmentValue = 'optional' | 'required' | 'unsupported' | 'unknown'
|
|
|
|
|
|
2025-08-28 15:11:35 -07:00
|
|
|
const TYPES_WITH_ENVS = ['mod', 'modpack'] as const
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
2025-08-14 21:48:38 +01:00
|
|
|
project: {
|
|
|
|
|
actualProjectType: string
|
|
|
|
|
project_type: string
|
|
|
|
|
loaders: string[]
|
|
|
|
|
client_side: EnvironmentValue
|
|
|
|
|
server_side: EnvironmentValue
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
versions: any[]
|
|
|
|
|
}
|
|
|
|
|
tags: {
|
|
|
|
|
gameVersions: GameVersionTag[]
|
|
|
|
|
loaders: PlatformTag[]
|
|
|
|
|
}
|
2025-08-28 15:11:35 -07:00
|
|
|
v3Metadata?: ProjectV3Partial
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
}>()
|
|
|
|
|
|
2025-08-28 15:11:35 -07:00
|
|
|
const showEnvironments = computed(
|
|
|
|
|
() =>
|
|
|
|
|
TYPES_WITH_ENVS.some((x) => props.v3Metadata?.project_types.includes(x)) &&
|
|
|
|
|
primaryEnvironment.value,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const primaryEnvironment = computed<EnvironmentV3 | undefined>(() =>
|
|
|
|
|
props.v3Metadata?.environment?.find((x) => x !== 'unknown'),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const primaryEnvironmentTags = computed(() => {
|
2026-01-12 12:41:14 -07:00
|
|
|
return getEnvironmentTags(primaryEnvironment.value)
|
2025-08-28 15:11:35 -07:00
|
|
|
})
|
|
|
|
|
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
const messages = defineMessages({
|
2025-08-14 21:48:38 +01:00
|
|
|
title: {
|
2025-08-28 15:11:35 -07:00
|
|
|
id: `project.about.compatibility.title`,
|
2025-08-14 21:48:38 +01:00
|
|
|
defaultMessage: 'Compatibility',
|
|
|
|
|
},
|
|
|
|
|
minecraftJava: {
|
2025-08-28 15:11:35 -07:00
|
|
|
id: `project.about.compatibility.game.minecraftJava`,
|
2025-08-14 21:48:38 +01:00
|
|
|
defaultMessage: 'Minecraft: Java Edition',
|
|
|
|
|
},
|
|
|
|
|
platforms: {
|
2025-08-28 15:11:35 -07:00
|
|
|
id: `project.about.compatibility.platforms`,
|
2025-08-14 21:48:38 +01:00
|
|
|
defaultMessage: 'Platforms',
|
|
|
|
|
},
|
|
|
|
|
environments: {
|
2025-08-28 15:11:35 -07:00
|
|
|
id: `project.about.compatibility.environments`,
|
2025-08-14 21:48:38 +01:00
|
|
|
defaultMessage: 'Supported environments',
|
|
|
|
|
},
|
App redesign (#2946)
* Start of app redesign
* format
* continue progress
* Content page nearly done
* Fix recursion issues with content page
* Fix update all alignment
* Discover page progress
* Settings progress
* Removed unlocked-size hack that breaks web
* Revamp project page, refactor web project page to share code with app, fixed loading bar, misc UI/UX enhancements, update ko-fi logo, update arrow icons, fix web issues caused by floating-vue migration, fix tooltip issues, update web tooltips, clean up web hydration issues
* Ads + run prettier
* Begin auth refactor, move common messages to ui lib, add i18n extraction to all apps, begin Library refactor
* fix ads not hiding when plus log in
* rev lockfile changes/conflicts
* Fix sign in page
* Add generated
* (mostly) Data driven search
* Fix search mobile issue
* profile fixes
* Project versions page, fix typescript on UI lib and misc fixes
* Remove unused gallery component
* Fix linkfunction err
* Search filter controls at top, localization for locked filters
* Fix provided filter names
* Fix navigating from instance browse to main browse
* Friends frontend (#2995)
* Friends system frontend
* (almost) finish frontend
* finish friends, fix lint
* Fix lint
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
* Refresh macOS app icon
* Update web search UI more
* Fix link opens
* Fix frontend build
---------
Signed-off-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
2024-12-11 19:54:18 -08:00
|
|
|
})
|
|
|
|
|
</script>
|