From 46d848c579488af688b5eea069f0d78eccce487d Mon Sep 17 00:00:00 2001 From: Layne Date: Fri, 25 Mar 2022 20:07:33 -0400 Subject: [PATCH] fix achievement icons --- src/api/achievements/GetAchievementCategoryImageUrl.ts | 6 ++++-- src/components/achievements/AchievementsView.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/api/achievements/GetAchievementCategoryImageUrl.ts b/src/api/achievements/GetAchievementCategoryImageUrl.ts index edfc35e3..ea7dff06 100644 --- a/src/api/achievements/GetAchievementCategoryImageUrl.ts +++ b/src/api/achievements/GetAchievementCategoryImageUrl.ts @@ -1,10 +1,12 @@ import { GetConfiguration, IAchievementCategory } from '..'; -export const GetAchievementCategoryImageUrl = (category: IAchievementCategory, progress: number = null) => +export const GetAchievementCategoryImageUrl = (category: IAchievementCategory, progress: number = null, icon: boolean = false) => { const imageUrl = GetConfiguration('achievements.images.url'); - let imageName = `achcategory_${ category.code }`; + let imageName = icon ? 'achicon_' : 'achcategory_'; + + imageName += category.code; if(progress !== null) imageName += `_${ ((progress > 0) ? 'active' : 'inactive') }`; diff --git a/src/components/achievements/AchievementsView.tsx b/src/components/achievements/AchievementsView.tsx index 1807bba1..71776720 100644 --- a/src/components/achievements/AchievementsView.tsx +++ b/src/components/achievements/AchievementsView.tsx @@ -228,7 +228,7 @@ export const AchievementsView: FC<{}> = props => { LocalizeText(`quests.${ getSelectedCategory.code }.name`) } { LocalizeText('achievements.details.categoryprogress', [ 'progress', 'limit' ], [ getSelectedCategory.getProgress().toString(), getSelectedCategory.getMaxProgress().toString() ]) } - + } { !getSelectedCategory &&