mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 02:02:19 +00:00
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:
parent
2a97915477
commit
b9a6d9ceec
1 changed files with 15 additions and 16 deletions
|
|
@ -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`] || [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue