Bug fixes and clean up

This commit is contained in:
Gamebrary 2022-11-05 21:11:53 -07:00
parent 5ac8ea4a8c
commit f237344d8d
11 changed files with 28 additions and 391 deletions

View file

@ -1,11 +1,8 @@
<!-- TODO: restore rtl -->
<!-- TODO: translate strings -->
<!-- TODO: allow for anonymous boards, prompt to sign up -->
<!-- TODO: switch toggle -->
<!-- TODO: add markdown wysiwyg -->
<!-- TODO: add help section -->
<!-- TODO: bring notifications back! -->
<!-- TODO: fix favicon broken link -->
<template>
<main
id="app"
@ -18,16 +15,6 @@
<router-view class="viewport" />
<keyboard-shortcuts-modal />
<markdown-cheatsheet />
<b-button
class="position-fixed"
style="bottom: 10px;"
title="Toggle theme"
@click="toggleTheme"
v-b-tooltip.hover
>
<i v-if="darkTheme" class="fa-solid fa-sun" />
<i v-else class="fa-solid fa-moon" />
</b-button>
</main>
</template>
@ -134,14 +121,11 @@ export default {
},
init() {
// TODO: get platforms from constants
if (this.isPublicRoute) {
return;
}
if (this.isPublicRoute) return;
if (this.user) {
this.boot();
} else if (this.$route.name !== 'auth' && !this.$route.params.providerId) {
} else if (this.$route.name !== 'auth') {
this.$router.replace({ name: 'auth' });
}
},
@ -171,7 +155,7 @@ export default {
}
.viewport {
height: calc(100vh - 62px);
overflow-y: auto;
min-height: calc(100vh - 62px);
}
</style>

View file

@ -16,7 +16,7 @@
by
<b-link
class="mr-2"
:class="['mr-2', { 'text-white': backgroundUrl } ]"
:to="{ name: 'public.profile', params: { userName: publicUserName }}"
>
<b-avatar
@ -231,6 +231,7 @@ export default {
display: flex;
align-items: flex-start;
width: 100vw;
min-height: calc(100vh - 62px);
box-sizing: border-box;
overflow-x: auto;
overflow-x: overlay;

View file

@ -9,7 +9,6 @@
{{ board.name }}
</span>
<b-badge
v-if="showPublicIndicator"
class="bg-warning"

View file

@ -26,7 +26,7 @@
<b-button
v-if="!user"
class="mr-2"
class="ml-2"
variant="dark"
:to="{ name: 'auth' }"
>

View file

@ -17,6 +17,22 @@ export const BOARD_TYPES = [
{ text: 'Tier', value: BOARD_TYPE_TIER },
];
export const FEATURED_BOARDS = [
'wGZ8chO5VK4jOaqG1373',
'raHXfbMSJtQ9xNT8T6yC',
'NSmHnEtQbjblUcwNKN0T',
'022E7O53f6XpvO5VIz8D',
];
export const TRENDING_GAMES = [
'112875',
'200165',
'119388',
'96437',
'191692',
'125165',
];
export const PLATFORM_CATEGORIES = {
1: 'console',
2: 'arcade',

View file

@ -11,7 +11,7 @@
<template v-else-if="game">
<portal to="pageTitle">
<span class="d-sm-none">
<span>
{{ game.name }}
</span>

View file

@ -295,12 +295,8 @@ export default {
const filter = genres || platforms || perspectiveFilter || gameModeFilter || '';
// where (platforms = [6,48] & genres = 13);
// const filter = ' where genres = 4;';
// const data = `${search} fields platforms,slug,rating,cover.image_id; limit 50; ${filter}`;
// TODO: paginate
const data = `${search} fields platforms,slug,rating,cover.image_id; limit 100; ${filter}`;
const data = `${search} fields *,platforms,slug,rating,cover.image_id; limit 100; ${filter};`;
this.searchResults = await this.$store.dispatch('IGDB', { path: 'games', data });

View file

@ -1,344 +0,0 @@
<template lang="html">
<b-container fluid>
<stripe-checkout
ref="checkoutRef"
mode="subscription"
pk="pk_test_Plr6zbTURKQbfRUkcXYP58hl"
:line-items="lineItems"
success-url="http://localhost:4000/#/upgrade?state=success"
cancel-url="http://localhost:4000/#/upgrade?state=cancel"
@loading="load"
/>
<b-card class="text-center">
<h2>Level up your video game collection!</h2>
<p class="lead-text">
Organize your video game collection with Gamebrary.
</p>
<b-button-group>
<b-button
:variant="planSelected === 'monthly' ? 'info' : 'light'"
@click="planSelected = 'monthly'"
>
Monthly billing
</b-button>
<b-button
:variant="planSelected === 'yearly' ? 'info' : 'light'"
v-b-tooltip.top="'2 Months free'"
@click="planSelected = 'yearly'"
>
Yearly billing
</b-button>
</b-button-group>
<table class="table table-hover">
<thead>
<tr>
<th scope="col"></th>
<th scope="col" class="text-muted">
Gamebrary Free
<br />
<h2 class="price">
$0{{ pricingLabel }}
</h2>
</th>
<th scope="col" class="text-success">
Gamebrary Pro
<br />
<h2 class="price">
${{ `${amountToPay}${pricingLabel}` }}
</h2>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Unlimited game boards
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Search
</td>
<td class="text-muted">
Basic
</td>
<td class="text-success">
Advanced
</td>
</tr>
<tr>
<td>
Board filters
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Customizations
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Speedruns
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Steam integration
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Tags
</td>
<td>
5
</td>
<td>
Unlimited
</td>
</tr>
<tr>
<td>
Notes
</td>
<td>
Plain text
</td>
<td>
Custom notes, rich text.
</td>
</tr>
<tr>
<td>
Custom URL
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Progress tracking
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Keyboard shortcuts
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Feature
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
List sorting
</td>
<td>
Basic
</td>
<td>
Advanced
</td>
</tr>
<tr>
<td>
Multiple list views
</td>
<td>
Basic
</td>
<td>
Multiple
</td>
</tr>
<tr>
<td>
Import/Export
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Public profile
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>Shared feature</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
<tr>
<td>
Customer support
</td>
<td>
<i class="fa-solid fa-times text-muted" />
</td>
<td>
<i class="fa-solid fa-check text-success" />
</td>
</tr>
</tbody>
</table>
<b-button size="lg" variant="success" @click="checkout">
Go Pro!
</b-button>
</b-card>
<b-alert show class="mt-3">
Students and Developers get Pro for free!
</b-alert>
<b-alert show class="mt-3">
F.A.Q.
NO REFUNDS
We use stripe for payments
</b-alert>
</b-container>
</template>
<script>
import { StripeCheckout } from '@vue-stripe/vue-stripe';
export default {
components: {
StripeCheckout,
},
data() {
return {
loading: false,
planSelected: 'monthly',
monthlyPlan: {
price: 'price_1KjFY4GpsgtQXdlaWZa44Gbj',
quantity: 1,
},
yearlyPlan: {
price: 'price_1KjFYeGpsgtQXdlajXFxtkDN',
quantity: 1,
},
};
},
computed: {
lineItems() {
return this.planSelected === 'yearly'
? [this.yearlyPlan]
: [this.monthlyPlan];
},
pricingLabel() {
return this.planSelected === 'yearly'
? '/year'
: '/month';
},
amountToPay() {
return this.planSelected === 'yearly'
? '50'
: '5';
},
},
methods: {
load(value) {
this.loading = value;
},
checkout() {
this.$refs.checkoutRef.redirectToCheckout();
}
},
};
</script>

View file

@ -1,13 +1,4 @@
const routes = [
{
name: 'upgrade',
path: '/upgrade',
component: () => import(/* webpackChunkName: "public" */ '@/public/pages/UpgradePage'),
meta: {
title: 'Upgrade',
public: true,
},
},
{
name: 'explore',
path: '/explore',

View file

@ -5,8 +5,7 @@
<profile-form />
<div class="field">
<div class="field" v-if="user">
<hr class="py-2" />
<p>Logged in as {{ user.displayName }} / {{ user.email }}</p>

View file

@ -85,7 +85,6 @@
<b-button
:to="{ name: 'account' }"
v-b-tooltip.hover
title="Tooltip content"
>
<b-avatar
rounded
@ -93,7 +92,6 @@
:src="avatarImage"
v-b-tooltip.hover
size="22"
class="mr-1"
:title="`@${profile.userName}`"
/>
@ -103,12 +101,9 @@
aria-hidden
/>
<b-link
v-if="profile.userName"
:to="{ name: 'public.profile', params: { userName: profile.userName } }"
>
<template v-if="profile.userName">
@{{ profile.userName }}
</b-link>
</template>
<template v-else>
Account
@ -276,7 +271,7 @@ export default {
<style lang="scss" rel="stylesheet/scss" scoped>
.boards {
max-height: calc(100vh - 300px);
max-height: calc(100vh - 164px);
overflow-y: auto;
}
</style>