habitica-self-host/website/common/script/content/achievements.js

393 lines
11 KiB
JavaScript
Raw Normal View History

import each from 'lodash/each';
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
2019-10-08 14:57:10 +00:00
const achievementsData = {};
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
2019-10-08 14:57:10 +00:00
const worldQuestAchievs = {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
dilatoryQuest: {
icon: 'achievement-dilatory',
titleKey: 'achievementDilatory',
textKey: 'achievementDilatoryText',
},
stressbeastQuest: {
icon: 'achievement-stoikalm',
titleKey: 'achievementStressbeast',
textKey: 'achievementStressbeastText',
},
burnoutQuest: {
icon: 'achievement-burnout',
titleKey: 'achievementBurnout',
textKey: 'achievementBurnoutText',
},
bewilderQuest: {
icon: 'achievement-bewilder',
titleKey: 'achievementBewilder',
textKey: 'achievementBewilderText',
},
dysheartenerQuest: {
icon: 'achievement-dysheartener',
titleKey: 'achievementDysheartener',
textKey: 'achievementDysheartenerText',
},
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
};
Object.assign(achievementsData, worldQuestAchievs);
2019-10-08 14:57:10 +00:00
const seasonalSpellAchievs = {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
snowball: {
icon: 'achievement-snowball',
titleKey: 'annoyingFriends',
textKey: 'annoyingFriendsText',
},
spookySparkles: {
icon: 'achievement-spookySparkles',
titleKey: 'alarmingFriends',
textKey: 'alarmingFriendsText',
},
shinySeed: {
icon: 'achievement-shinySeed',
titleKey: 'agriculturalFriends',
textKey: 'agriculturalFriendsText',
},
seafoam: {
icon: 'achievement-seafoam',
titleKey: 'aquaticFriends',
textKey: 'aquaticFriendsText',
},
};
Object.assign(achievementsData, seasonalSpellAchievs);
2019-10-08 14:57:10 +00:00
const masterAchievs = {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
beastMaster: {
icon: 'achievement-rat',
titleKey: 'beastMasterName',
textKey: 'beastMasterText',
text2Key: 'beastMasterText2',
},
mountMaster: {
icon: 'achievement-wolf',
titleKey: 'mountMasterName',
textKey: 'mountMasterText',
text2Key: 'mountMasterText2',
},
triadBingo: {
icon: 'achievement-triadbingo',
titleKey: 'triadBingoName',
textKey: 'triadBingoText',
text2Key: 'triadBingoText2',
},
};
Object.assign(achievementsData, masterAchievs);
2019-10-08 14:57:10 +00:00
const basicAchievs = {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
partyUp: {
icon: 'achievement-partyUp',
titleKey: 'partyUpName',
textKey: 'partyUpText',
},
partyOn: {
icon: 'achievement-partyOn',
titleKey: 'partyOnName',
textKey: 'partyOnText',
},
streak: {
icon: 'achievement-thermometer',
singularTitleKey: 'streakSingular',
singularTextKey: 'streakSingularText',
pluralTitleKey: 'streakName',
pluralTextKey: 'streakText',
},
perfect: {
icon: 'achievement-perfect',
singularTitleKey: 'perfectSingular',
singularTextKey: 'perfectSingularText',
pluralTitleKey: 'perfectName',
pluralTextKey: 'perfectText',
},
royallyLoyal: {
icon: 'achievement-royally-loyal',
titleKey: 'royallyLoyal',
textKey: 'royallyLoyalText',
},
joinedGuild: {
icon: 'achievement-guild',
titleKey: 'joinedGuild',
textKey: 'joinedGuildText',
},
joinedChallenge: {
icon: 'achievement-challenge',
titleKey: 'joinedChallenge',
textKey: 'joinedChallengeText',
},
invitedFriend: {
icon: 'achievement-friends',
titleKey: 'invitedFriend',
textKey: 'invitedFriendText',
},
lostMasterclasser: {
icon: 'achievement-lostMasterclasser',
titleKey: 'achievementLostMasterclasser',
textKey: 'achievementLostMasterclasserText',
},
mindOverMatter: {
icon: 'achievement-mindOverMatter',
titleKey: 'achievementMindOverMatter',
textKey: 'achievementMindOverMatterText',
},
justAddWater: {
icon: 'achievement-justAddWater',
titleKey: 'achievementJustAddWater',
textKey: 'achievementJustAddWaterText',
},
backToBasics: {
icon: 'achievement-backToBasics',
titleKey: 'achievementBackToBasics',
textKey: 'achievementBackToBasicsText',
},
allYourBase: {
icon: 'achievement-allYourBase',
titleKey: 'achievementAllYourBase',
textKey: 'achievementAllYourBaseText',
},
dustDevil: {
icon: 'achievement-dustDevil',
titleKey: 'achievementDustDevil',
textKey: 'achievementDustDevilText',
},
aridAuthority: {
icon: 'achievement-aridAuthority',
titleKey: 'achievementAridAuthority',
textKey: 'achievementAridAuthorityText',
},
monsterMagus: {
icon: 'achievement-monsterMagus',
titleKey: 'achievementMonsterMagus',
textKey: 'achievementMonsterMagusText',
},
undeadUndertaker: {
icon: 'achievement-undeadUndertaker',
titleKey: 'achievementUndeadUndertaker',
textKey: 'achievementUndeadUndertakerText',
},
2019-12-10 20:41:39 +00:00
primedForPainting: {
icon: 'achievement-primedForPainting',
titleKey: 'achievementPrimedForPainting',
textKey: 'achievementPrimedForPaintingText',
},
pearlyPro: {
icon: 'achievement-pearlyPro',
titleKey: 'achievementPearlyPro',
textKey: 'achievementPearlyProText',
},
tickledPink: {
icon: 'achievement-tickledPink',
titleKey: 'achievementTickledPink',
textKey: 'achievementTickledPinkText',
},
rosyOutlook: {
icon: 'achievement-rosyOutlook',
titleKey: 'achievementRosyOutlook',
textKey: 'achievementRosyOutlookText',
},
2020-03-17 14:11:41 +00:00
bugBonanza: {
icon: 'achievement-bugBonanza',
titleKey: 'achievementBugBonanza',
textKey: 'achievementBugBonanzaText',
},
bareNecessities: {
icon: 'achievement-bareNecessities',
titleKey: 'achievementBareNecessities',
textKey: 'achievementBareNecessitiesText',
},
freshwaterFriends: {
icon: 'achievement-freshwaterFriends',
titleKey: 'achievementFreshwaterFriends',
textKey: 'achievementFreshwaterFriendsText',
},
2020-08-18 20:13:06 +00:00
goodAsGold: {
icon: 'achievement-goodAsGold',
titleKey: 'achievementGoodAsGold',
textKey: 'achievementGoodAsGoldText',
},
allThatGlitters: {
icon: 'achievement-allThatGlitters',
titleKey: 'achievementAllThatGlitters',
textKey: 'achievementAllThatGlittersText',
},
2020-10-19 20:38:12 +00:00
boneCollector: {
icon: 'achievement-boneCollector',
titleKey: 'achievementBoneCollector',
textKey: 'achievementBoneCollectorText',
},
skeletonCrew: {
icon: 'achievement-skeletonCrew',
titleKey: 'achievementSkeletonCrew',
textKey: 'achievementSkeletonCrewText',
},
2020-11-24 23:53:15 +00:00
seeingRed: {
icon: 'achievement-seeingRed',
titleKey: 'achievementSeeingRed',
textKey: 'achievementSeeingRedText',
},
redLetterDay: {
icon: 'achievement-redLetterDay',
titleKey: 'achievementRedLetterDay',
textKey: 'achievementRedLetterDayText',
},
2021-02-16 23:00:39 +00:00
legendaryBestiary: {
icon: 'achievement-legendaryBestiary',
titleKey: 'achievementLegendaryBestiary',
textKey: 'achievementLegendaryBestiaryText',
},
seasonalSpecialist: {
icon: 'achievement-seasonalSpecialist',
titleKey: 'achievementSeasonalSpecialist',
textKey: 'achievementSeasonalSpecialistText',
},
violetsAreBlue: {
icon: 'achievement-violetsAreBlue',
titleKey: 'achievementVioletsAreBlue',
textKey: 'achievementVioletsAreBlueText',
},
wildBlueYonder: {
icon: 'achievement-wildBlueYonder',
titleKey: 'achievementWildBlueYonder',
textKey: 'achievementWildBlueYonderText',
},
domesticated: {
icon: 'achievement-domesticated',
titleKey: 'achievementDomesticated',
textKey: 'achievementDomesticatedText',
},
shadyCustomer: {
icon: 'achievement-shadyCustomer',
titleKey: 'achievementShadyCustomer',
textKey: 'achievementShadyCustomerText',
},
shadeOfItAll: {
icon: 'achievement-shadeOfItAll',
titleKey: 'achievementShadeOfItAll',
textKey: 'achievementShadeOfItAllText',
},
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
};
Object.assign(achievementsData, basicAchievs);
Onboarding guide and initial achievements refactoring (#11536) * add achievements to user * add placeholder strings * add to achievements to common script * add onboarding achievements category * add notifications * more notifications * award achievements * wip notification panel * add achievements icons and copy * do not count onboarding tasks for the created task achievement * add notes * sprites, fixes and completion status and reward * add onboarding panel * add toggle * fix toggle size * fix tests * fix typo * add notification * start adding modal * fix remove button positionin, timeout, progress bar * modal + fixes * disable broken social links from level up modal * change toggle icon color on hover * add border bottom to onboarding guide panel * add collapse animation * expanded onboarding on first open * onboarding: flip toggle colors * onboarding: show progress bar all the time * onboarding: fix panel closing on click * onboarding modal: add close icon and fix padding * wip: add migration for existing users * fix titles in guide * fix achievements copy * do not award completed task achievement when direction is down * start implementing new achievements * start migrating client * remove social links from achievements modals * prevent skipping tutorial + fix achievement notification * sync fixes * start redesign achievement modal * misc fixes to achievements, polish generic achievement modal and hatched pet modal * add special badge for onboarding * fix badge condition * modals fixes * hatched pet modal: add close icon * fix badge typo * fix justin button * new scrolling behavior for dropdowns * fix strings capitalization * add common tests * add api unit tests * add date check * achievements modal polishing * typos * add toggle for achievements categories * typo * fix test * fix edit avatar modal cannot be closed * finish migration and correct launch date * fix migration * migration fixes * fix tests
2019-12-16 16:20:47 +00:00
const onboardingAchievs = {
createdTask: {
icon: 'achievement-createdTask',
titleKey: 'achievementCreatedTask',
textKey: 'achievementCreatedTaskText',
},
completedTask: {
icon: 'achievement-completedTask',
titleKey: 'achievementCompletedTask',
textKey: 'achievementCompletedTaskText',
},
hatchedPet: {
icon: 'achievement-hatchedPet',
titleKey: 'achievementHatchedPet',
textKey: 'achievementHatchedPetText',
},
fedPet: {
icon: 'achievement-fedPet',
titleKey: 'achievementFedPet',
textKey: 'achievementFedPetText',
},
purchasedEquipment: {
icon: 'achievement-purchasedEquipment',
titleKey: 'achievementPurchasedEquipment',
textKey: 'achievementPurchasedEquipmentText',
},
};
Object.assign(achievementsData, onboardingAchievs);
2019-10-08 14:57:10 +00:00
const specialAchievs = {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
contributor: {
icon: 'achievement-boot',
titleKey: 'contribName',
textKey: 'contribText',
},
npc: {
icon: 'achievement-npc',
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
titleKey: 'npcAchievementName',
textKey: 'npcAchievementText',
},
kickstarter: {
icon: 'achievement-heart',
titleKey: 'kickstartName',
textKey: 'kickstartText',
},
veteran: {
icon: 'achievement-cake',
titleKey: 'veteran',
textKey: 'veteranText',
},
originalUser: {
icon: 'achievement-alpha',
titleKey: 'originalUser',
textKey: 'originalUserText',
},
habitSurveys: {
icon: 'achievement-tree',
singularTitleKey: 'helped',
singularTextKey: 'surveysSingle',
pluralTitleKey: 'helped',
pluralTextKey: 'surveysMultiple',
},
2019-09-27 16:45:24 +00:00
kickstarter2019: {
icon: 'achievement-kickstarter2019',
titleKey: 'achievementKickstarter2019',
textKey: 'achievementKickstarter2019Text',
},
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
};
Object.assign(achievementsData, specialAchievs);
2019-10-08 14:57:10 +00:00
const holidayAchievs = {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
habiticaDays: {
icon: 'achievement-habiticaDay',
singularTitleKey: 'habiticaDay',
singularTextKey: 'habiticaDaySingularText',
pluralTitleKey: 'habiticaDay',
pluralTextKey: 'habiticaDayPluralText',
},
habitBirthdays: {
icon: 'achievement-habitBirthday',
singularTitleKey: 'habitBirthday',
singularTextKey: 'habitBirthdayText',
pluralTitleKey: 'habitBirthday',
pluralTextKey: 'habitBirthdayPluralText',
},
costumeContests: {
icon: 'achievement-costumeContest',
singularTitleKey: 'costumeContest',
singularTextKey: 'costumeContestText',
pluralTitleKey: 'costumeContest',
pluralTextKey: 'costumeContestTextPlural',
},
};
Object.assign(achievementsData, holidayAchievs);
2019-10-08 14:57:10 +00:00
const ultimateGearAchievs = ['healer', 'rogue', 'warrior', 'mage'].reduce((achievs, type) => {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
achievs[`${type}UltimateGear`] = {
icon: `achievement-ultimate-${type}`,
titleKey: 'ultimGearName',
textKey: 'ultimGearText',
};
return achievs;
}, {});
Object.assign(achievementsData, ultimateGearAchievs);
2019-10-08 14:57:10 +00:00
const cardAchievs = ['greeting', 'thankyou', 'nye', 'valentine', 'birthday', 'congrats', 'getwell', 'goodluck'].reduce((achievs, type) => {
Achievement list renovation & Achievements API (#7904) * pull apart achievements into different subcategories * achievs previously hidden to others if unachieved are now always shown * achievs previously always hidden if unachieved are now always shown * pull apart ultimate gear achievs * add achiev wrapper mixin * add achiev mixin for simple counts * add achiev mixin for singular/plural achievs * add simpleAchiev mixin and support attributes * always hide potentially unearnable achievs if unearned * contributor achiev now uses string interpolation for readMore link * transition to basic achiev grid layout * fix npc achievement img bug introduced in c90f7e2 * move surveys and contributor achievs into special section so it is never empty * double size of achievs in achievs grid * achievs in grid are muted if unachieved (includes recompiled sprites) * fix streak notification strings * add counts to achievement badges for applicable achieved achievs * list achievements by api * fix achievement strings in new api * unearned achievs now use dedicated (WIP) 'unearned' badge instead of muted versions of the normal badges * fix & cleanup achievements api * extract generation of the achievements result to a class * clean up achievement counter css using existing classes * simplify exports of new achievementBuilder lib * remove class logic from achievementBuilder lib * move achievs to common, add rebirth achiev logic, misc fixes * replace achievs jade logic with results of api call * fix linting errors * achievs lib now returns achievs object subdivided by type (basic/seasonal/special * add tests for new achievs lib * fix linting errors * update controllers and views for updated achievs lib * add indices to achievements to preserve intended order * move achiev popovers to left * rename achievs lib to achievements * adjust positioning of achieve popovers now that stats and achievs pages are separate * fix: achievements api correctly decides whether to append extra string for master and triadBingo achievs * revert compiled sprites so they don't bog down the PR * pull out achievs api integration tests * parameterize ultimate gear achievements' text string * break out static achievement data from user-specific data * reorg content.achievements to add achiev data in related chunks * cleanup, respond to feedback * improve api documentation * fix merge issues * Helped Habit Grow --> Helped Habitica Grow * achievement popovers are muted if the achiev is unearned * fix singular achievement labels / achievement popover on click * update apidoc for achievements (description, param-type, successExample, error-types) * fix whitespace issues in members.js * move html to a variable * updated json example * fix syntax after merge
2016-12-13 18:48:18 +00:00
achievs[`${type}Cards`] = {
icon: `achievement-${type}`,
titleKey: `${type}CardAchievementTitle`,
textKey: `${type}CardAchievementText`,
};
return achievs;
}, {});
Object.assign(achievementsData, cardAchievs);
each(achievementsData, (value, key) => {
value.key = key;
});
2019-10-01 15:53:48 +00:00
export default achievementsData;