mirror of
https://github.com/romancm/gamebrary
synced 2025-02-17 03:28:25 +00:00
clean up
This commit is contained in:
parent
b473b0edd3
commit
9f4db66d3e
11 changed files with 13 additions and 72 deletions
|
@ -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',
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<!-- TODO: restore wikipedia -->
|
||||
<template lang="html">
|
||||
<div class="game-description">
|
||||
<b-spinner v-if="loading" class="spinner-centered" />
|
||||
|
|
|
@ -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>
|
|
@ -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"
|
||||
|
|
|
@ -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 '';
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<template lang="html">
|
||||
<!-- TODO: agregar Classificação Indicativa -->
|
||||
<div>
|
||||
<b-form-group label="Steam ID:">
|
||||
<b-form-input
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue