diff --git a/package-lock.json b/package-lock.json index 35bd2d1cd..63b509903 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "knossos", "version": "1.0.0", "dependencies": { "@nuxtjs/axios": "^5.12.5", diff --git a/pages/mods.vue b/pages/mods.vue index 91d5d3b98..054488951 100644 --- a/pages/mods.vue +++ b/pages/mods.vue @@ -439,9 +439,18 @@ export default { } }, async fillInitialLicenses() { - this.licenses = ( + const licences = ( await axios.get('https://api.modrinth.com/api/v1/tag/license') ).data + licences.sort((x, y) => { + // Custom case for custom, so it goes to the bottom of the list. + if (x.short === 'custom') return 1 + if (y.short === 'custom') return -1 + if (x.name < y.name) return -1 + if (x.name > y.name) return 1 + return 0 + }) + this.licenses = licences }, async toggleLicense(license) { if (this.selectedLicense) {