This commit is contained in:
Gamebrary 2022-08-18 14:19:26 -07:00
parent b473b0edd3
commit 9f4db66d3e
11 changed files with 13 additions and 72 deletions

View file

@ -188,7 +188,6 @@ exports.game = functions.https.onRequest((req, res) => {
websites.url;
where id = ${gameId};`;
// TODO: deploy
axios({
url: 'https://api.igdb.com/v4/games',

View file

@ -1,5 +1,4 @@
<!-- TODO: FIX this mess, auto save on selection -->
<!-- TODO: flatten, put it in single edit board page -->
<template lang="html">
<b-modal
id="boardBackground"

View file

@ -1,4 +1,3 @@
<!-- TODO: restore wikipedia -->
<template lang="html">
<div class="game-description">
<b-spinner v-if="loading" class="spinner-centered" />

View file

@ -1,18 +0,0 @@
<!-- TODO: Mix media from other sources (e.g. instagram, wikipedia, youtube, twitter, etc... ) -->
<template lang="html">
<div>
gameImages
<pre>{{ gameImages }}</pre>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
computed: {
...mapGetters(['gameImages']),
// ...mapState(['board']),
},
};
</script>

View file

@ -1,5 +1,4 @@
<!-- TODO: Mix media from other sources (e.g. instagram, wikipedia, youtube, twitter, etc... ) -->
<!-- TODO: get images from article and add them to media page -->
<template lang="html">
<b-modal
id="mediaModal"

View file

@ -89,11 +89,6 @@ export default {
if (this.user) this.loadPlatforms();
},
editBoard(id) {
// TODO: restore once load board logic is simplified
this.$router.push({ name: 'board.edit', params: { id } });
},
getWallpaperUrl(url) {
if (!url) {
return '';

View file

@ -59,15 +59,7 @@ export default {
},
methods: {
// isGameSelected(game.id)
// isGameSelected(gameId) {
// console.log(this.activeBoardList?.games?.includes(gameId));
//
// return this.activeBoardList?.games?.includes(gameId);
// },
handleClick() {
// const activeBoardList = boards
const { boardId, listIndex } = this.$route?.query;
const hasActiveBoard = boardId && listIndex >= 0;
@ -78,11 +70,6 @@ export default {
this.$router.push({ name: 'game', params: { id, slug }});
}
// TODO: put guards when unauthed
// return this.user
// ? this.$bus.$emit('ADD_GAME', this.game.id)
// : this.$router.push({ name: 'game', params: { id: this.game.id, slug: this.game.slug }});
},
addGameToList() {

View file

@ -70,25 +70,16 @@
@click.native="openGame(gameId, list)"
/>
<!-- TODO: route to search and default to add to list? -->
<!-- <b-button
block
v-if="isEmpty"
class="mb-2"
variant="light"
:to="{ name: 'search' }"
>
</b-button> -->
<b-button
v-if="isEmpty"
variant="light"
block
class="mb-2"
:to="{ name: 'search', query: { boardId: board.id, listIndex: listIndex } }"
>
{{ $t('board.list.emptyListButton') }}
</b-button>
<div v-if="isEmpty">
<b-button
variant="light"
block
class="mb-2"
:to="{ name: 'search', query: { boardId: board.id, listIndex: listIndex } }"
>
Add games
</b-button>
</div>
</draggable>
</b-card>
</div>

View file

@ -1,5 +1,4 @@
<template lang="html">
<!-- TODO: agregar Classificação Indicativa -->
<div>
<b-form-group label="Steam ID:">
<b-form-input

View file

@ -4,6 +4,7 @@ export const MIN_PROFILE_LENGTH = 6;
export const MAX_PROFILE_LENGTH = 32;
export const STEAM_CATEGORY_ID = 13;
export const GOG_CATEGORY_ID = 17;
export const TWITTER_CATEGORY_ID = 5;
export const PLATFORM_CATEGORIES = {
1: 'console',

View file

@ -209,7 +209,7 @@ import GameInList from '@/components/Game/GameInList';
import GameWebsites from '@/components/Game/GameWebsites';
// import GameSpeedruns from '@/components/Game/GameSpeedruns';
import GameNote from '@/components/GameNote';
import { STEAM_CATEGORY_ID, GOG_CATEGORY_ID } from '@/constants';
import { STEAM_CATEGORY_ID, GOG_CATEGORY_ID, TWITTER_CATEGORY_ID } from '@/constants';
export default {
components: {
@ -232,13 +232,6 @@ export default {
};
},
beforeDestroy() {
// TODO: only clear board if game being viewed is not in current board
// if (!['game', 'board'].includes(this.$route.name)) {
// this.$store.commit('CLEAR_BOARD');
// }
},
computed: {
...mapState(['game', 'progresses', 'tags', 'boards', 'user', 'notes']),
@ -280,11 +273,8 @@ export default {
},
twitterHandle() {
// TODO: put in constant
const twitterCategory = 5;
const twitterUrl = this.game?.websites
? this.game.websites.find(({ category }) => category === twitterCategory)
? this.game.websites.find(({ category }) => category === TWITTER_CATEGORY_ID)
: '';
return twitterUrl?.url