8f5a0cfe79
* 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
45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
// @TODO: This might become too generic. If so, check the refactor docs
|
|
const CONSTANTS = {
|
|
keyConstants: {
|
|
SPELL_DRAWER_STATE: 'spell-drawer-state',
|
|
EQUIPMENT_DRAWER_STATE: 'equipment-drawer-state',
|
|
CURRENT_EQUIPMENT_DRAWER_TAB: 'current-equipment-drawer-tab',
|
|
STABLE_SORT_STATE: 'stable-sort-state',
|
|
ONBOARDING_PANEL_STATE: 'onboarding-panel-state',
|
|
},
|
|
drawerStateValues: {
|
|
DRAWER_CLOSED: 'drawer-closed',
|
|
DRAWER_OPEN: 'drawer-open',
|
|
},
|
|
equipmentDrawerTabValues: {
|
|
COSTUME_TAB: 'costume-tab',
|
|
EQUIPMENT_TAB: 'equipment-tab',
|
|
},
|
|
savedAppStateValues: {
|
|
SAVED_APP_STATE: 'saved-app-state',
|
|
},
|
|
onboardingPanelValues: {
|
|
PANEL_OPENED: 'onboarding-panel-opened',
|
|
},
|
|
};
|
|
|
|
function setLocalSetting (key, value) {
|
|
localStorage.setItem(key, value);
|
|
}
|
|
|
|
function getLocalSetting (key) {
|
|
return localStorage.getItem(key);
|
|
}
|
|
|
|
function removeLocalSetting (key) {
|
|
return localStorage.removeItem(key);
|
|
}
|
|
|
|
|
|
export {
|
|
CONSTANTS,
|
|
getLocalSetting,
|
|
setLocalSetting,
|
|
removeLocalSetting,
|
|
};
|