2
0
Fork 0
mirror of https://github.com/romancm/gamebrary synced 2024-12-26 02:53:08 +00:00
gamebrary/src/components/Game/GameWebsites.vue

44 lines
1,019 B
Vue
Raw Normal View History

2020-08-22 12:21:15 +00:00
<template lang="html">
2020-11-29 05:46:22 +00:00
<div v-if="game.websites" class="text-left">
2020-11-01 16:54:19 +00:00
<dl v-for="link in game.websites" :key="link.id">
2020-08-22 12:21:15 +00:00
<!-- TODO: research which links can be leveraged to get API data,
e.g. wikipedia article, wikia, etc -->
2020-11-01 16:54:19 +00:00
<dt class="w-100">{{ linkTypes[link.category]}}</dt>
<dd class="text-truncate d-block"><a :href="link.url" target="_blank">{{ link.url }}</a></dd>
2020-08-22 12:21:15 +00:00
</dl>
</div>
2020-08-22 12:21:15 +00:00
</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>