You've already forked AstralRinth
forked from didirus/AstralRinth
Fix plugin URLs, display, redirects (#619)
* Fix plugin URLs, display, redirects * Fix user profile + some redirects not working
This commit is contained in:
@@ -150,6 +150,23 @@ export default (ctx, inject) => {
|
||||
return formatProjectType(type)
|
||||
}
|
||||
})
|
||||
inject('getProjectTypeForUrl', (type, categories) => {
|
||||
if (type === 'mod') {
|
||||
const isPlugin = categories.some((category) => {
|
||||
return ctx.store.state.tag.loaderData.allPluginLoaders.includes(
|
||||
category
|
||||
)
|
||||
})
|
||||
|
||||
const isMod = categories.some((category) => {
|
||||
return ctx.store.state.tag.loaderData.modLoaders.includes(category)
|
||||
})
|
||||
|
||||
return isPlugin && isMod ? 'mod' : isPlugin ? 'plugin' : 'mod'
|
||||
} else {
|
||||
return type
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const formatNumber = (number) => {
|
||||
|
||||
Reference in New Issue
Block a user