mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
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
This commit is contained in:
@@ -1,82 +1,29 @@
|
||||
// When using a common module from the website or the server NEVER import the module directly
|
||||
// but access it through `api` (the main common) module,
|
||||
// otherwise you would require the non transpiled version of the file in production.
|
||||
import content from './content/index';
|
||||
|
||||
import * as errors from './libs/errors';
|
||||
import i18n from './i18n';
|
||||
|
||||
import commonErrors from './errors/commonErrorMessages';
|
||||
import apiErrors from './errors/apiErrorMessages';
|
||||
|
||||
// TODO under api.libs.cron?
|
||||
import { shouldDo, daysSince, DAY_MAPPING } from './cron';
|
||||
|
||||
import {
|
||||
MAX_HEALTH,
|
||||
MAX_LEVEL,
|
||||
MAX_STAT_POINTS,
|
||||
MAX_INCENTIVES,
|
||||
TAVERN_ID,
|
||||
LARGE_GROUP_COUNT_MESSAGE_CUTOFF,
|
||||
MAX_SUMMARY_SIZE_FOR_GUILDS,
|
||||
MAX_SUMMARY_SIZE_FOR_CHALLENGES,
|
||||
MIN_SHORTNAME_SIZE_FOR_CHALLENGES,
|
||||
SUPPORTED_SOCIAL_NETWORKS,
|
||||
GUILDS_PER_PAGE,
|
||||
PARTY_LIMIT_MEMBERS,
|
||||
CHAT_FLAG_LIMIT_FOR_HIDING,
|
||||
CHAT_FLAG_FROM_MOD,
|
||||
CHAT_FLAG_FROM_SHADOW_MUTE,
|
||||
CHAT_FLAG_LIMIT_FOR_HIDING,
|
||||
GUILDS_PER_PAGE,
|
||||
LARGE_GROUP_COUNT_MESSAGE_CUTOFF,
|
||||
MAX_HEALTH,
|
||||
MAX_INCENTIVES,
|
||||
MAX_LEVEL,
|
||||
MAX_STAT_POINTS,
|
||||
MAX_SUMMARY_SIZE_FOR_CHALLENGES,
|
||||
MAX_SUMMARY_SIZE_FOR_GUILDS,
|
||||
MIN_SHORTNAME_SIZE_FOR_CHALLENGES,
|
||||
PARTY_LIMIT_MEMBERS,
|
||||
SUPPORTED_SOCIAL_NETWORKS,
|
||||
TAVERN_ID,
|
||||
} from './constants';
|
||||
|
||||
// TODO under api.libs.statHelpers?
|
||||
import * as statHelpers from './statHelpers';
|
||||
|
||||
import splitWhitespace from './libs/splitWhitespace';
|
||||
|
||||
import refPush from './libs/refPush';
|
||||
|
||||
import planGemLimits from './libs/planGemLimits';
|
||||
|
||||
import preenTodos from './libs/preenTodos';
|
||||
|
||||
import updateStore from './libs/updateStore';
|
||||
|
||||
import inAppRewards from './libs/inAppRewards';
|
||||
|
||||
import setDebuffPotionItems from './libs/setDebuffPotionItems';
|
||||
|
||||
import getDebuffPotionItems from './libs/getDebuffPotionItems';
|
||||
|
||||
import uuid from './libs/uuid';
|
||||
|
||||
import taskDefaults from './libs/taskDefaults';
|
||||
|
||||
import percent from './libs/percent';
|
||||
|
||||
import gold from './libs/gold';
|
||||
|
||||
import silver from './libs/silver';
|
||||
|
||||
import noTags from './libs/noTags';
|
||||
|
||||
import appliedTags from './libs/appliedTags';
|
||||
|
||||
import pickDeep from './libs/pickDeep';
|
||||
|
||||
import content from './content/index';
|
||||
import * as count from './count';
|
||||
|
||||
import statsComputed from './libs/statsComputed';
|
||||
|
||||
import shops from './libs/shops';
|
||||
|
||||
import achievements from './libs/achievements';
|
||||
|
||||
import randomVal from './libs/randomVal';
|
||||
|
||||
import hasClass from './libs/hasClass';
|
||||
|
||||
// TODO under api.libs.cron?
|
||||
import { daysSince, DAY_MAPPING, shouldDo } from './cron';
|
||||
import apiErrors from './errors/apiErrorMessages';
|
||||
import commonErrors from './errors/commonErrorMessages';
|
||||
import autoAllocate from './fns/autoAllocate';
|
||||
import crit from './fns/crit';
|
||||
import handleTwoHanded from './fns/handleTwoHanded';
|
||||
@@ -85,33 +32,59 @@ import randomDrop from './fns/randomDrop';
|
||||
import resetGear from './fns/resetGear';
|
||||
import ultimateGear from './fns/ultimateGear';
|
||||
import updateStats from './fns/updateStats';
|
||||
|
||||
import scoreTask from './ops/scoreTask';
|
||||
import sleep from './ops/sleep';
|
||||
import allocateNow from './ops/stats/allocateNow';
|
||||
import allocate from './ops/stats/allocate';
|
||||
import allocateBulk from './ops/stats/allocateBulk';
|
||||
import i18n from './i18n';
|
||||
import achievements from './libs/achievements';
|
||||
import appliedTags from './libs/appliedTags';
|
||||
import * as errors from './libs/errors';
|
||||
import getDebuffPotionItems from './libs/getDebuffPotionItems';
|
||||
import gold from './libs/gold';
|
||||
import hasClass from './libs/hasClass';
|
||||
import inAppRewards from './libs/inAppRewards';
|
||||
import noTags from './libs/noTags';
|
||||
import * as onboarding from './libs/onboarding';
|
||||
import percent from './libs/percent';
|
||||
import pickDeep from './libs/pickDeep';
|
||||
import planGemLimits from './libs/planGemLimits';
|
||||
import preenTodos from './libs/preenTodos';
|
||||
import randomVal from './libs/randomVal';
|
||||
import refPush from './libs/refPush';
|
||||
import setDebuffPotionItems from './libs/setDebuffPotionItems';
|
||||
import shops from './libs/shops';
|
||||
import silver from './libs/silver';
|
||||
import splitWhitespace from './libs/splitWhitespace';
|
||||
import statsComputed from './libs/statsComputed';
|
||||
import taskDefaults from './libs/taskDefaults';
|
||||
import updateStore from './libs/updateStore';
|
||||
import uuid from './libs/uuid';
|
||||
import blockUser from './ops/blockUser';
|
||||
import buy from './ops/buy/buy';
|
||||
import hatch from './ops/hatch';
|
||||
import feed from './ops/feed';
|
||||
import equip from './ops/equip';
|
||||
import changeClass from './ops/changeClass';
|
||||
import disableClasses from './ops/disableClasses';
|
||||
import readCard from './ops/readCard';
|
||||
import equip from './ops/equip';
|
||||
import feed from './ops/feed';
|
||||
import hatch from './ops/hatch';
|
||||
import markPmsRead from './ops/markPMSRead';
|
||||
import openMysteryItem from './ops/openMysteryItem';
|
||||
import releasePets from './ops/releasePets';
|
||||
import * as pinnedGearUtils from './ops/pinnedGearUtils';
|
||||
import readCard from './ops/readCard';
|
||||
import rebirth from './ops/rebirth';
|
||||
import releaseBoth from './ops/releaseBoth';
|
||||
import releaseMounts from './ops/releaseMounts';
|
||||
import updateTask from './ops/updateTask';
|
||||
import sell from './ops/sell';
|
||||
import unlock from './ops/unlock';
|
||||
import revive from './ops/revive';
|
||||
import rebirth from './ops/rebirth';
|
||||
import blockUser from './ops/blockUser';
|
||||
import releasePets from './ops/releasePets';
|
||||
import reroll from './ops/reroll';
|
||||
import reset from './ops/reset';
|
||||
import markPmsRead from './ops/markPMSRead';
|
||||
import * as pinnedGearUtils from './ops/pinnedGearUtils';
|
||||
import revive from './ops/revive';
|
||||
import scoreTask from './ops/scoreTask';
|
||||
import sell from './ops/sell';
|
||||
import sleep from './ops/sleep';
|
||||
import allocate from './ops/stats/allocate';
|
||||
import allocateBulk from './ops/stats/allocateBulk';
|
||||
import allocateNow from './ops/stats/allocateNow';
|
||||
import unlock from './ops/unlock';
|
||||
import updateTask from './ops/updateTask';
|
||||
// TODO under api.libs.statHelpers?
|
||||
import * as statHelpers from './statHelpers';
|
||||
|
||||
|
||||
const api = {};
|
||||
api.content = content;
|
||||
@@ -162,10 +135,10 @@ api.shops = shops;
|
||||
api.achievements = achievements;
|
||||
api.randomVal = randomVal;
|
||||
api.hasClass = hasClass;
|
||||
api.onboarding = onboarding;
|
||||
api.setDebuffPotionItems = setDebuffPotionItems;
|
||||
api.getDebuffPotionItems = getDebuffPotionItems;
|
||||
|
||||
|
||||
api.fns = {
|
||||
autoAllocate,
|
||||
crit,
|
||||
|
||||
Reference in New Issue
Block a user