You've already forked AstralRinth
forked from didirus/AstralRinth
Use Composition API for settings index (#1613)
This commit is contained in:
@@ -137,43 +137,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
import { Multiselect } from 'vue-multiselect'
|
import { Multiselect } from 'vue-multiselect'
|
||||||
|
import { formatProjectType } from '~/plugins/shorthands.js'
|
||||||
|
|
||||||
export default defineNuxtComponent({
|
useHead({
|
||||||
components: {
|
title: 'Display settings - Modrinth',
|
||||||
Multiselect,
|
})
|
||||||
},
|
|
||||||
setup() {
|
|
||||||
const cosmetics = useCosmetics()
|
|
||||||
const tags = useTags()
|
|
||||||
|
|
||||||
return { cosmetics, tags }
|
const cosmetics = useCosmetics()
|
||||||
},
|
const tags = useTags()
|
||||||
data() {
|
|
||||||
|
const listTypes = computed(() => {
|
||||||
|
const types = tags.value.projectTypes.map((type) => {
|
||||||
return {
|
return {
|
||||||
searchDisplayMode: this.cosmetics.searchDisplayMode,
|
id: type.id,
|
||||||
|
name: formatProjectType(type.id) + ' search',
|
||||||
|
display: 'the ' + formatProjectType(type.id).toLowerCase() + 's search page',
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
head: {
|
types.push({
|
||||||
title: 'Display settings - Modrinth',
|
id: 'user',
|
||||||
},
|
name: 'User page',
|
||||||
computed: {
|
display: 'user pages',
|
||||||
listTypes() {
|
})
|
||||||
const types = this.tags.projectTypes.map((type) => {
|
return types
|
||||||
return {
|
|
||||||
id: type.id,
|
|
||||||
name: this.$formatProjectType(type.id) + ' search',
|
|
||||||
display: 'the ' + this.$formatProjectType(type.id).toLowerCase() + 's search page',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
types.push({
|
|
||||||
id: 'user',
|
|
||||||
name: 'User page',
|
|
||||||
display: 'user pages',
|
|
||||||
})
|
|
||||||
return types
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user