From ac032efb6d7c282b383da62101c07df34d06ff92 Mon Sep 17 00:00:00 2001 From: Gamebrary Date: Tue, 11 May 2021 12:52:42 -0700 Subject: [PATCH] simplify game progress logic --- src/components/GameCards/GameCardCompact.vue | 2 +- src/components/GameCards/GameCardDefault.vue | 30 ++++++++++++++------ src/components/GameCards/GameCardGrid.vue | 2 +- src/components/GameCards/GameCardText.vue | 2 +- src/mixins/gameCardMixin.js | 14 ++++----- 5 files changed, 29 insertions(+), 21 deletions(-) diff --git a/src/components/GameCards/GameCardCompact.vue b/src/components/GameCards/GameCardCompact.vue index 9a826710..6b01de8f 100644 --- a/src/components/GameCards/GameCardCompact.vue +++ b/src/components/GameCards/GameCardCompact.vue @@ -30,7 +30,7 @@
{{ game.name }} - - - - - + + + {{ gameProgress }}% + + + + + + + + -
+ + + + + + diff --git a/src/components/GameCards/GameCardGrid.vue b/src/components/GameCards/GameCardGrid.vue index 4c50fe25..9ea01f20 100644 --- a/src/components/GameCards/GameCardGrid.vue +++ b/src/components/GameCards/GameCardGrid.vue @@ -14,7 +14,7 @@ 0; }, showGameTags() { @@ -32,11 +28,11 @@ export default { }, gameProgress() { - const { gameId, progresses, list: { settings } } = this; + const { gameId, progresses } = this; - return settings && settings.showGameProgress && gameId && progresses[gameId] + return gameId && progresses[gameId] ? progresses[gameId] - : null; + : 0; }, gameNotes() {