/
list.ts
53 lines (49 loc) · 996 Bytes
/
list.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import Vue from 'vue';
import { Component, Prop } from 'vue-property-decorator';
import { propOptional } from '../../../../utils/vue';
import AppScrollScroller from '../../../../_common/scroll/scroller/scroller.vue';
import { TagInfo, TagsInfo } from '../tags-info.service';
import AppTagThumbnail from '../thumbnail/thumbnail.vue';
const FeaturedTags = [
'action',
'horror',
'adventure',
'fangame',
'fnaf',
'fnf',
'rpg',
'other',
'multiplayer',
'platformer',
'scifi',
'retro',
'pointnclick',
'shooter',
'altgame',
'vr',
'survival',
'arcade',
'roguelike',
'puzzle',
'strategy',
'sports',
];
@Component({
components: {
AppScrollScroller,
AppTagThumbnail,
},
})
export default class AppTagList extends Vue {
@Prop(propOptional(String, 'global')) eventCat!: string;
get tags() {
const tags: TagInfo[] = [];
for (const tag of FeaturedTags) {
const info = TagsInfo.tags.find(i => i.id === tag);
if (info) {
tags.push(info);
}
}
return tags;
}
}