Allow Un-subscribed Users to Claim Mystery Items (#9270)

Remove restriction on mystery/special inventory items that prevents
non-subscribed users from seeing the items. Organize the imports on the
page.

Resolves: Issue #9228
This commit is contained in:
Zack Sunderland 2018-03-17 15:13:31 -06:00 committed by Matteo Pagliazzi
parent 2a97915477
commit b9a6d9ceec

View file

@ -193,31 +193,32 @@
</style>
<script>
import { mapState } from 'client/libs/store';
import each from 'lodash/each';
import throttle from 'lodash/throttle';
import moment from 'moment';
import Item from 'client/components/inventory/item';
import ItemRows from 'client/components/ui/itemRows';
import CountBadge from 'client/components/ui/countBadge';
import cardsModal from './cards-modal';
import HatchedPetDialog from '../stable/hatchedPetDialog';
import startQuestModal from '../../groups/startQuestModal';
import createAnimal from 'client/libs/createAnimal';
import QuestInfo from '../../shops/quests/questInfo.vue';
import moment from 'moment';
import Item from 'client/components/inventory/item';
import ItemRows from 'client/components/ui/itemRows';
import CountBadge from 'client/components/ui/countBadge';
const allowedSpecialItems = ['snowball', 'spookySparkles', 'shinySeed', 'seafoam'];
import { mapState } from 'client/libs/store';
import createAnimal from 'client/libs/createAnimal';
import notifications from 'client/mixins/notifications';
import DragDropDirective from 'client/directives/dragdrop.directive';
import MouseMoveDirective from 'client/directives/mouseposition.directive';
const allowedSpecialItems = ['snowball', 'spookySparkles', 'shinySeed', 'seafoam'];
const groups = [
['eggs', 'Pet_Egg_'],
['hatchingPotions', 'Pet_HatchingPotion_'],
@ -321,14 +322,12 @@ export default {
let specialArray = itemsByType.special;
if (this.user.purchased.plan.customerId) {
specialArray.push({
key: 'mysteryItem',
class: `inventory_present inventory_present_${moment().format('MM')}`,
text: this.$t('subscriberItemText'),
quantity: this.user.purchased.plan.mysteryItems.length,
});
}
specialArray.push({
key: 'mysteryItem',
class: `inventory_present inventory_present_${moment().format('MM')}`,
text: this.$t('subscriberItemText'),
quantity: this.user.purchased.plan.mysteryItems.length,
});
for (let type in this.content.cardTypes) {
let card = this.user.items.special[`${type}Received`] || [];