multiplefixes quest (#8964)

* add hourglass to header

* multiple quest fixes - show quest info in popover/modal

* pin backgrounds

* unpin gem-purchable items / change pinType of quest to quests

* check if hatching potion is allowed on egg - wide hatching info

* fix (perf): items - request text()/notes() only once

* change items margin to 23px

* list cards + open modal to choose a target + add space between market items

* buy card from task-list

* fix tests - unpin items on purchasing eggs / hatchingPotions
This commit is contained in:
negue
2017-08-21 00:32:32 +02:00
committed by GitHub
parent 2b922508c5
commit 876552b922
21 changed files with 562 additions and 58 deletions
+6
View File
@@ -11,6 +11,9 @@ import {
BadRequest,
} from '../libs/errors';
import { removeItemByPath } from './pinnedGearUtils';
import getItemInfo from '../libs/getItemInfo';
module.exports = function purchase (user, req = {}, analytics) {
let type = get(req.params, 'type');
let key = get(req.params, 'key');
@@ -103,6 +106,9 @@ module.exports = function purchase (user, req = {}, analytics) {
throw new NotAuthorized(i18n.t('notEnoughGems', req.language));
}
let itemInfo = getItemInfo(user, type, item);
removeItemByPath(user, itemInfo.path);
user.balance -= price;
if (type === 'gear') {