mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add games to kind endpoints
This commit is contained in:
parent
7a68eb5838
commit
6f8ee3e4d6
1 changed files with 10 additions and 4 deletions
|
|
@ -44,6 +44,12 @@ import LinkButton from '~/components/link-button.vue'
|
|||
import { byTimeThenNull } from '~/helpers/sort-list.js'
|
||||
|
||||
import appList from '~/static/app-list.json'
|
||||
import gamelist from '~/static/game-list.json'
|
||||
|
||||
const allList = [
|
||||
...appList.sort(byTimeThenNull),
|
||||
...gamelist,
|
||||
]
|
||||
|
||||
export default {
|
||||
async asyncData ({ params: { slug } }) {
|
||||
|
|
@ -64,19 +70,19 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
section () {
|
||||
return appList.find(app => {
|
||||
return allList.find(app => {
|
||||
return app.section.slug === this.slug
|
||||
}).section
|
||||
},
|
||||
sectionAppList () {
|
||||
|
||||
const list = appList.filter(app => {
|
||||
const filteredList = allList.filter(app => {
|
||||
return app.section.slug === this.slug
|
||||
})
|
||||
|
||||
const sortedList = list.sort(byTimeThenNull)
|
||||
// const sortedList = list.sort(byTimeThenNull)
|
||||
|
||||
return sortedList
|
||||
return filteredList
|
||||
},
|
||||
supportedAppList () {
|
||||
return this.sectionAppList.filter(app => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue