Skip to content

Commit 9476fc6

Browse files
committed
achievements
1 parent cd596dc commit 9476fc6

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

src/components/CommandPalette.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ const CommandPalette = ({
195195
break;
196196
}
197197
case 'showVersion':
198+
unlockAchievement('leave_no_stone_unturned');
198199
openGenericModal(
199200
'Application Version',
200201
<p>

src/config/achievements.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
CompassIcon,
3-
ClockIcon,
43
TerminalWindowIcon,
54
PaintBrushIcon,
65
GameControllerIcon,
@@ -13,7 +12,10 @@ import {
1312
BookBookmarkIcon,
1413
BooksIcon,
1514
GhostIcon,
16-
EyeSlashIcon, // Added for new achievement
15+
EyeSlashIcon,
16+
ChalkboardIcon,
17+
CastleTurretIcon,
18+
MartiniIcon,
1719
} from '@phosphor-icons/react';
1820

1921
export const ACHIEVEMENTS = [
@@ -101,6 +103,20 @@ export const ACHIEVEMENTS = [
101103
icon: <BooksIcon size={32} weight="duotone" />,
102104
category: 'Content',
103105
},
106+
{
107+
id: 'scholar',
108+
title: 'Scholar',
109+
description: 'Read 20 different blog posts. Impressive!',
110+
icon: <ChalkboardIcon size={32} weight="duotone" />,
111+
category: 'Content',
112+
},
113+
{
114+
id: 'lord',
115+
title: 'Lord',
116+
description: 'Read 40 different blog posts. MiLord!',
117+
icon: <CastleTurretIcon size={32} weight="duotone" />,
118+
category: 'Content',
119+
},
104120
{
105121
id: 'hide_and_seek_master',
106122
title: 'Hide and Seek Master',
@@ -116,6 +132,13 @@ export const ACHIEVEMENTS = [
116132
icon: <GhostIcon size={32} weight="duotone" />,
117133
category: 'Secret',
118134
},
135+
{
136+
id: 'leave_no_stone_unturned',
137+
title: 'Leave No Stone Unturned',
138+
description: 'Check application version.',
139+
icon: <MartiniIcon size={32} weight="duotone" />,
140+
category: 'Secret',
141+
},
119142
{
120143
id: 'her_daim',
121144
title: 'Her Daim...',

src/context/AchievementContext.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export const AchievementProvider = ({ children }) => {
5555
if (count >= 1) unlockAchievement('novice_reader');
5656
if (count >= 5) unlockAchievement('avid_reader');
5757
if (count >= 10) unlockAchievement('bookworm');
58+
if (count >= 20) unlockAchievement('scholar');
59+
if (count >= 40) unlockAchievement('lord');
5860

5961
return newReadPosts;
6062
});

0 commit comments

Comments
 (0)