diff --git a/website/client/components/groups/group.vue b/website/client/components/groups/group.vue index eb45d917fb..a9ee683823 100644 --- a/website/client/components/groups/group.vue +++ b/website/client/components/groups/group.vue @@ -91,6 +91,10 @@ p {{acceptedCount}} / {{group.memberCount}} .col-4 button.btn.btn-secondary(@click="openQuestDetails()") {{ $t('details') }} + .row.quest-active-section.quest-invite(v-if='user.party.quest && user.party.quest.RSVPNeeded') + span {{ $t('wouldYouParticipate') }} + button.btn.btn-primary.accept(@click='questAccept(group._id)') {{$t('accept')}} + button.btn.btn-primary.reject(@click='questReject(group._id)') {{$t('reject')}} .row.quest-active-section(v-if='isParty && !onPendingQuest && onActiveQuest') .col-12.text-center .quest-boss(:class="'quest_' + questData.key") @@ -378,6 +382,37 @@ } } + .quest-invite { + background-color: #2995cd; + color: #fff; + padding: 1em; + + span { + margin-top: .3em; + font-size: 14px; + font-weight: bold; + } + + .accept, .reject { + padding: .2em 1em; + font-size: 12px; + height: 24px; + border-radius: 2px; + box-shadow: 0 2px 2px 0 rgba(26, 24, 29, 0.16), 0 1px 4px 0 rgba(26, 24, 29, 0.12); + } + + .accept { + background-color: #24cc8f; + margin-left: 4em; + margin-right: .5em; + } + + .reject { + border-radius: 2px; + background-color: #f74e52; + } + } + .section-header { border-top: 1px solid #e1e0e3; margin-top: 1em; @@ -859,14 +894,13 @@ export default { let quest = await this.$store.dispatch('quests:sendAction', {groupId: this.group._id, action: 'quests/leave'}); this.group.quest = quest; }, - async questAccept () { - let quest = await this.$store.dispatch('quests:sendAction', {groupId: this.group._id, action: 'quests/accept'}); - this.group.quest = quest; + async questAccept (partyId) { + let quest = await this.$store.dispatch('quests:sendAction', {groupId: partyId, action: 'quests/accept'}); + this.user.party.quest = quest; }, - // @TODO: Move to notificaitons component? - async questReject () { - let quest = await this.$store.dispatch('quests:sendAction', {groupId: this.group._id, action: 'quests/reject'}); - this.group.quest = quest; + async questReject (partyId) { + let quest = await this.$store.dispatch('quests:sendAction', {groupId: partyId, action: 'quests/reject'}); + this.user.party.quest = quest; }, showGroupGems () { this.$root.$emit('show::modal', 'group-gems-modal'); diff --git a/website/client/components/shops/quests/index.vue b/website/client/components/shops/quests/index.vue index 725a5b8ced..0b8035cf21 100644 --- a/website/client/components/shops/quests/index.vue +++ b/website/client/components/shops/quests/index.vue @@ -471,6 +471,8 @@ export default { } }, selectItem (item) { + if (item.locked) return; + this.selectedItemToBuy = item; if (this.$store.state.recentlyPurchased[item.key]) { diff --git a/website/client/components/snackbars/notification.vue b/website/client/components/snackbars/notification.vue index 21a9912a45..a114dfb199 100644 --- a/website/client/components/snackbars/notification.vue +++ b/website/client/components/snackbars/notification.vue @@ -126,8 +126,8 @@ export default { // @TODO the notifications always close even if timeout is false let timeout = this.notification.hasOwnProperty('timeout') ? this.notification.timeout : true; if (timeout) { - let delay = this.notification.delay || 1000; - delay += this.$store.state.notificationStore.length * 1000; + let delay = this.notification.delay || 500; + delay += this.$store.state.notificationStore.length * 500; setTimeout(() => { this.show = false; }, delay); diff --git a/website/client/mixins/challengeUtilities.js b/website/client/mixins/challengeUtilities.js index 6cfbe51a33..9f8a3cc7d4 100644 --- a/website/client/mixins/challengeUtilities.js +++ b/website/client/mixins/challengeUtilities.js @@ -20,7 +20,8 @@ export default { } if (filters.categories && filters.categories.length > 0) { - let intersectingCats = intersection(filters.categories, challenge.categories); + let challengeCategories = challenge.categories.map(chal => chal.slug); + let intersectingCats = intersection(filters.categories, challengeCategories); hasCategories = intersectingCats.length > 0; } diff --git a/website/client/store/actions/shops.js b/website/client/store/actions/shops.js index b44597efe8..bb978c14e2 100644 --- a/website/client/store/actions/shops.js +++ b/website/client/store/actions/shops.js @@ -87,6 +87,10 @@ export async function genericPurchase (store, params) { const isExperience = item.type === 'experience'; + if (item.type === 'gear') { + store.state.user.data.items.gear.owned[item.dropKey] = true; + } + // @TODO: We might need to abstract notifications to library rather than mixin store.state.notificationStore.push({ title: '', diff --git a/website/common/locales/en/groups.json b/website/common/locales/en/groups.json index 9db7eb1012..40403b430e 100644 --- a/website/common/locales/en/groups.json +++ b/website/common/locales/en/groups.json @@ -396,5 +396,6 @@ "groupGemsDesc": "Guild Gems can be spent to make Challenges! In the future, you will be able to add more Guild Gems.", "groupTaskBoard": "Task Board", "groupInformation": "Group Information", - "groupBilling": "Group Billing" + "groupBilling": "Group Billing", + "wouldYouParticipate": "Would you like to participate?" }