Modrinth/store/tag.js
Geometrically 673f7a82d1
New features (#592)
* New features

* Lots of bug fixes

* Fix respack creation

* Improve mobile nav with more project types

* Fix resolution sorting and remove icons

* Move cookie consent to top on small devices to get out of the way of navigation

* Move cookie consent + fix hydration

* Fix project editing + update search features

* Centralize hardcoding of loader/category names, fix cookie consent shadow, fix mobile navbar rounding

* Fix plugin platforms formatting

* Kitchen sink!

* Add support for display names

* LiteLoader formatting

* Fixed "show all loaders" toggle not resetting when changing pages

* Allow multiple loaders in version filter controls

* Fix clear filters button

* Revert "Add support for display names"

This reverts commit 370838763d86bcae51bf06c304248f7a1f8fc28f.

* Let's see how this goes. Upstream filters, attempt 1

* github? hello?

* No more "Server mod" on plugins

* Fix formatting of project types in project creation

* Move where project creation sets the resource pack loader

* Allow setting pixelated image-rendering

Allows to apply 'style' attribute to IMG tags with value
'image-rendering' set to 'pixelated', which can be useful for people who
use pixel art in their READMEs (to demonstrate items, for example).

* fix user page + hydration issue fix from Brawaru

* Rename to proxies

* Make categories use title case

* Always show project type on moderation page, improve project type display on project pages

* Remove invalid key

* Missed a check

* Fix browse menu animation

* Fix disabled button condition and minimum width for 2 lines

* Body -> Description in edit pages

* More casing consistency issues

* Fix duplicate version URLs

* Fix version creation

* Edit URLs, fix privacy page buttons

* Fix notifications popup overlaying

* Final merge fixes

Co-authored-by: Prospector <prospectordev@gmail.com>
Co-authored-by: Sasha Sorokin <10401817+Brawaru@users.noreply.github.com>
2022-08-14 12:42:58 -07:00

69 lines
1.8 KiB
JavaScript

export const state = () => ({
categories: [],
loaders: [],
gameVersions: [],
licenses: [],
donationPlatforms: [],
loaderData: {
pluginLoaders: ['bukkit', 'spigot', 'paper', 'purpur', 'sponge'],
pluginPlatformLoaders: ['bungeecord', 'waterfall', 'velocity'],
allPluginLoaders: [
'bukkit',
'spigot',
'paper',
'purpur',
'sponge',
'bungeecord',
'waterfall',
'velocity',
],
modLoaders: ['forge', 'fabric', 'quilt', 'liteloader', 'modloader', 'rift'],
},
})
export const mutations = {
SET_CATEGORIES(state, categories) {
state.categories = categories
},
SET_LOADERS(state, loaders) {
state.loaders = loaders
},
SET_GAME_VERSIONS(state, gameVersions) {
state.gameVersions = gameVersions
},
SET_LICENSES(state, licenses) {
state.licenses = licenses
},
SET_DONATION_PLATFORMS(state, donationPlatforms) {
state.donationPlatforms = donationPlatforms
},
}
export const actions = {
async fetchAllTags({ commit }) {
const headers = {
headers: {
'x-ratelimit-key': process.server
? process.env.RATE_LIMIT_IGNORE_KEY || ''
: '',
},
}
const [categories, loaders, gameVersions, licenses, donationPlatforms] = (
await Promise.all([
this.$axios.get(`tag/category`, headers),
this.$axios.get(`tag/loader`, headers),
this.$axios.get(`tag/game_version`, headers),
this.$axios.get(`tag/license`, headers),
this.$axios.get(`tag/donation_platform`, headers),
])
).map((it) => it.data)
commit('SET_CATEGORIES', categories)
commit('SET_LOADERS', loaders)
commit('SET_GAME_VERSIONS', gameVersions)
commit('SET_LICENSES', licenses)
commit('SET_DONATION_PLATFORMS', donationPlatforms)
},
}