You've already forked AstralRinth
forked from didirus/AstralRinth
Update Nuxt to v3.12.1 (#1720)
* Update Nuxt dependencies * Fix ref access in ChartDisplay * Fix feature flags cookie options type error * Specify type-only imports * Fix shorthands access to tags outside of reactive scope * Replace most useRoute calls with useRoute from vue-router Nuxt's version of this composable is horrendously broken (nuxt/nuxt#21340) * Import all svgs with ?component parameter Fixes weird hydration issues + gives correct type
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { getProjectTypeForUrlShorthand } from '~/helpers/projects.js'
|
||||
|
||||
export default defineNuxtPlugin((nuxtApp) => {
|
||||
const tagStore = useTags()
|
||||
|
||||
nuxtApp.provide('formatNumber', formatNumber)
|
||||
nuxtApp.provide('capitalizeString', capitalizeString)
|
||||
nuxtApp.provide('formatMoney', formatMoney)
|
||||
nuxtApp.provide('formatVersion', (versionsArray) => formatVersions(versionsArray))
|
||||
nuxtApp.provide('formatVersion', (versionsArray) => formatVersions(tagStore, versionsArray))
|
||||
nuxtApp.provide('orElse', (first, otherwise) => first ?? otherwise)
|
||||
nuxtApp.provide('external', () => {
|
||||
const cosmeticsStore = useCosmetics().value
|
||||
@@ -76,8 +78,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
.sort((a, b) => nuxtApp.$dayjs(b.date_published) - nuxtApp.$dayjs(a.date_published))
|
||||
})
|
||||
nuxtApp.provide('getProjectTypeForDisplay', (type, categories) => {
|
||||
const tagStore = useTags()
|
||||
|
||||
if (type === 'mod') {
|
||||
const isPlugin = categories.some((category) => {
|
||||
return tagStore.value.loaderData.allPluginLoaders.includes(category)
|
||||
@@ -111,8 +111,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
)
|
||||
nuxtApp.provide('cycleValue', cycleValue)
|
||||
nuxtApp.provide('sortedCategories', () => {
|
||||
const tagStore = useTags()
|
||||
|
||||
return tagStore.value.categories.slice().sort((a, b) => {
|
||||
const headerCompare = a.header.localeCompare(b.header)
|
||||
if (headerCompare !== 0) {
|
||||
@@ -252,8 +250,7 @@ export const formatProjectStatus = (name) => {
|
||||
return capitalizeString(name)
|
||||
}
|
||||
|
||||
export const formatVersions = (versionArray) => {
|
||||
const tag = useTags()
|
||||
export const formatVersions = (tag, versionArray) => {
|
||||
const allVersions = tag.value.gameVersions.slice().reverse()
|
||||
const allReleases = allVersions.filter((x) => x.version_type === 'release')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user