Rename sections to categories

This commit is contained in:
Sam Carlton 2020-11-28 15:16:56 -06:00
parent e578118bab
commit fd63c02e2a
8 changed files with 56 additions and 58 deletions

View file

@ -2,7 +2,7 @@
<section class="container py-24">
<div class="flex flex-col items-center">
<h1 class="title text-3xl md:text-5xl font-hairline leading-tight text-center pb-4">
{{ section.pluralLabel || section.label }} that are reported to support Apple Silicon
{{ category.pluralLabel || category.label }} that are reported to support Apple Silicon
</h1>
<h2
@ -13,7 +13,7 @@
</h2>
<Search
:app-list="sectionAppList"
:app-list="categoryAppList"
:quick-buttons="[]"
@update:query="query = $event"
/>
@ -44,7 +44,7 @@ import LinkButton from '~/components/link-button.vue'
import { byTimeThenNull } from '~/helpers/sort-list.js'
import { categories } from '~/helpers/categories.js'
import { categories, getAppCategory } from '~/helpers/categories.js'
import appList from '~/static/app-list.json'
import gamelist from '~/static/game-list.json'
@ -74,13 +74,13 @@ export default {
}
},
computed: {
section () {
category () {
return categories[this.slug]
},
sectionAppList () {
categoryAppList () {
const filteredList = allList.filter(app => {
return app.section.slug === this.slug
return app.category.slug === this.slug
})
// const sortedList = list.sort(byTimeThenNull)
@ -88,12 +88,12 @@ export default {
return filteredList
},
supportedAppList () {
return this.sectionAppList.filter(app => {
return this.categoryAppList.filter(app => {
return app.status.includes('yes')
}).map(app => app.name)
},
title () {
return `List of ${this.section.pluralLabel || this.section.label} that work on Apple Silicon?`
return `List of ${this.category.pluralLabel || this.category.label} that work on Apple Silicon?`
}
},
head() {