gamebrary/src/components/GameCards/GameCardGrid.vue

77 lines
1.6 KiB
Vue
Raw Normal View History

2019-06-06 13:44:06 +00:00
<template lang="html">
2020-08-11 23:39:11 +00:00
<b-card
no-body
2020-08-26 18:07:13 +00:00
class="clickable mb-2"
2020-08-11 23:39:11 +00:00
:img-src="coverUrl"
img-top
@click="openDetails"
2020-08-11 23:39:11 +00:00
>
<b-card-body body-class="p-2" v-if="game && game.name">
<b-card-title class="mb-0" title-tag="h6">
2020-10-08 17:55:26 +00:00
<icon
name="verified"
class="rounded bg-success p-1"
2020-10-08 17:55:26 +00:00
white
v-if="showCompletedBadge"
/>
2020-08-11 23:39:11 +00:00
{{ game.name }}
2020-08-11 23:39:11 +00:00
</b-card-title>
<b-progress
v-if="showGameProgress"
:value="gameProgress"
class="my-2"
variant="success"
height="6px"
/>
2020-08-21 07:42:16 +00:00
<!-- <b-badge
2020-08-11 23:39:11 +00:00
v-if="releaseDate"
variant="secondary"
class="mb-2"
>
Releases in
{{ releaseDate }}
2020-08-21 07:42:16 +00:00
</b-badge> -->
2020-08-11 23:39:11 +00:00
<b-form-rating
v-if="gameRating"
2020-08-31 22:19:53 +00:00
class="p-0 border-0 shadow-none"
2020-08-11 23:39:11 +00:00
inline
:value="gameRating"
readonly
variant="warning"
size="sm"
no-border
/>
<template v-if="showGameTags">
2020-08-11 23:39:11 +00:00
<b-badge
v-for="({ games, hex, tagTextColor }, name) in tags"
v-if="games.includes(game.id)"
:key="name"
pill
variant="primary"
tag="small"
:style="`background-color: ${hex}; color: ${tagTextColor}`"
>
{{ name }}
</b-badge>
</template>
<b-badge variant="warning" v-if="gameNotes">
2020-10-08 17:55:26 +00:00
<icon name="note" />
</b-badge>
2020-08-11 23:39:11 +00:00
</b-card-body>
</b-card>
2019-06-06 13:44:06 +00:00
</template>
<script>
import GameCardUtils from '@/components/GameCards/GameCard';
export default {
2019-11-08 19:56:03 +00:00
mixins: [GameCardUtils],
2019-06-06 13:44:06 +00:00
};
</script>