mirror of
https://github.com/romancm/gamebrary
synced 2024-12-22 17:13:09 +00:00
49 lines
1.1 KiB
Vue
49 lines
1.1 KiB
Vue
|
<template lang="html">
|
||
|
<b-tab v-if="game.websites">
|
||
|
<template v-slot:title>
|
||
|
Links
|
||
|
<b-badge>{{ game.websites.length }}</b-badge>
|
||
|
</template>
|
||
|
|
||
|
<dl class="row mb-0" v-for="link in game.websites" :key="link.id">
|
||
|
<!-- TODO: research which links can be leveraged to get API data,
|
||
|
e.g. wikipedia article, wikia, etc -->
|
||
|
<dt class="col-sm-3">{{ linkTypes[link.category]}}</dt>
|
||
|
<dd class="col-sm-9"><a :href="link.url" target="_blank">{{ link.url }}</a></dd>
|
||
|
</dl>
|
||
|
</b-tab>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
props: {
|
||
|
game: Object,
|
||
|
},
|
||
|
|
||
|
data() {
|
||
|
return {
|
||
|
// TODO: GET THIS FROM https://api-v3.igdb.com/igdbapi.proto?
|
||
|
linkTypes: {
|
||
|
1: 'Official site',
|
||
|
2: 'Wikia',
|
||
|
3: 'Wikipedia',
|
||
|
4: 'Facebook',
|
||
|
5: 'Twitter',
|
||
|
6: 'Twitch',
|
||
|
8: 'Instagram',
|
||
|
9: 'YouTube',
|
||
|
10: 'iPhone',
|
||
|
11: 'iPad',
|
||
|
12: 'Android',
|
||
|
13: 'Steam',
|
||
|
14: 'Reddit',
|
||
|
15: 'Itch',
|
||
|
16: 'Epic Games',
|
||
|
17: 'GOG',
|
||
|
18: 'Discord',
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
};
|
||
|
</script>
|