From f7c610fbf3bedd53a2737372d34ebdcb1a5ab7c3 Mon Sep 17 00:00:00 2001 From: Anssi Juvonen Date: Sat, 14 Dec 2024 07:46:04 +0200 Subject: [PATCH 1/2] Change favorites trophy calculation logic --- src/components/AchievementBadge.vue | 6 +- .../AchievementList.spec.ts.snap | 24 ++--- src/components/__tests__/achievements.spec.ts | 101 ++++++++++-------- .../__tests__/activityStore.spec.ts | 24 ----- src/hooks/achievements.ts | 22 ++-- src/i18n/en.json | 10 +- src/i18n/fi.json | 12 +-- src/stores/activityStore.ts | 27 +---- src/stores/appStateStore.ts | 4 +- 9 files changed, 95 insertions(+), 135 deletions(-) diff --git a/src/components/AchievementBadge.vue b/src/components/AchievementBadge.vue index 6c6762d..43fa509 100644 --- a/src/components/AchievementBadge.vue +++ b/src/components/AchievementBadge.vue @@ -102,15 +102,15 @@ const achievementProps: AchievementProps = { }, favorite: { [AchievementLevel.Bronze]: { - textProps: [20], + textProps: [5], emoji: '😺', }, [AchievementLevel.Silver]: { - textProps: [50], + textProps: [20], emoji: '😽', }, [AchievementLevel.Gold]: { - textProps: [100], + textProps: [50], emoji: '😻', }, }, diff --git a/src/components/__tests__/__snapshots__/AchievementList.spec.ts.snap b/src/components/__tests__/__snapshots__/AchievementList.spec.ts.snap index c4d86ef..480d08a 100644 --- a/src/components/__tests__/__snapshots__/AchievementList.spec.ts.snap +++ b/src/components/__tests__/__snapshots__/AchievementList.spec.ts.snap @@ -109,23 +109,23 @@ exports[`AchievementList > renders 1`] = `
-