Files
habitica/website/common/script/libs/shops-seasonal.config.js
Natalie f72eef6bff feat(content): prebuild Fall Festival (#14869)
* feat(content): prebuild Fall Festival

* fix(typos): because 2023 is not the same as 2024

* feat(css): having stylesheets is important

* feat(content): ready for review & testing

* fix(tests): account for Sept 09 bundle

* fix(gala): use multi event list more
fix a couple of strings too

* feat(content): Warrior and Rogue text
also fix timing of quest bundle feature

* fix(strings): correct stat boosts

* fix(content): missing mage
also adds missing margin to purchase gems button in buy modal

---------

Co-authored-by: SabreCat <sabe@habitica.com>
2023-09-20 19:46:34 -05:00

51 lines
1.3 KiB
JavaScript

import find from 'lodash/find';
import upperFirst from 'lodash/upperFirst';
import moment from 'moment';
import {
EVENTS,
SEASONAL_SETS,
} from '../content/constants';
const CURRENT_EVENT = find(
EVENTS, event => moment().isBetween(event.start, event.end)
&& ['winter', 'spring', 'summer', 'fall'].includes(event.season),
);
export default {
opened: CURRENT_EVENT,
currentSeason: CURRENT_EVENT ? upperFirst(CURRENT_EVENT.season) : 'Closed',
dateRange: {
start: CURRENT_EVENT ? moment(CURRENT_EVENT.start) : moment().subtract(1, 'days').toDate(),
end: CURRENT_EVENT ? moment(CURRENT_EVENT.end) : moment().subtract(1, 'seconds').toDate(),
},
availableSets: CURRENT_EVENT
? [
...SEASONAL_SETS[CURRENT_EVENT.season],
]
: [],
pinnedSets: CURRENT_EVENT
? {
rogue: 'fall2023WitchsBrewRogueSet',
warrior: 'fall2023ScaryMovieWarriorSet',
wizard: 'fall2023ScarletWarlockMageSet',
healer: 'fall2023BogCreatureHealerSet',
}
: {},
availableSpells: CURRENT_EVENT && moment().isBetween('2023-10-03T08:00-04:00', CURRENT_EVENT.end)
? [
'spookySparkles',
]
: [],
availableQuests: CURRENT_EVENT && moment().isBetween('2023-07-11T08:00-04:00', CURRENT_EVENT.end)
? []
: [],
featuredSet: 'fall2022HarpyMageSet',
};