Oct 9 fixes (#9174)

* Prevented purchasing of locked quest

* Fixed category filters for challenges

* Added armoire equipment directly to user

* Halfed the time notifications display

* Added quest accept/reject to party page
This commit is contained in:
Keith Holliday 2017-10-09 14:40:45 -05:00 committed by GitHub
parent 5dd168eee4
commit 7e1ae6a571
6 changed files with 53 additions and 11 deletions

View file

@ -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');

View file

@ -471,6 +471,8 @@ export default {
}
},
selectItem (item) {
if (item.locked) return;
this.selectedItemToBuy = item;
if (this.$store.state.recentlyPurchased[item.key]) {

View file

@ -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);

View file

@ -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;
}

View file

@ -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: '',

View file

@ -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?"
}