Merge branch 'develop' into release
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
<div
|
||||
id="app"
|
||||
:class="{
|
||||
'casting-spell': castingSpell,
|
||||
'resting': showRestingBanner
|
||||
'casting-spell': castingSpell,
|
||||
'resting': showRestingBanner
|
||||
}"
|
||||
>
|
||||
<banned-account-modal />
|
||||
@@ -609,6 +609,25 @@ export default {
|
||||
|
||||
if (modalBefore) this.$root.$emit('bv::show::modal', modalBefore, { fromRoot: true });
|
||||
});
|
||||
|
||||
// Dismiss modal aggressively. Pass a modal ID to remove a modal instance from the stack
|
||||
// (both the stack entry itself and its "prev" reference) so we don't reopen it
|
||||
this.$root.$on('habitica::dismiss-modal', oldModal => {
|
||||
if (!oldModal) return;
|
||||
this.$root.$emit('bv::hide::modal', oldModal);
|
||||
let removeIndex = this.$store.state.modalStack
|
||||
.map(modal => modal.modalId)
|
||||
.indexOf(oldModal);
|
||||
if (removeIndex >= 0) {
|
||||
this.$store.state.modalStack.splice(removeIndex, 1);
|
||||
}
|
||||
removeIndex = this.$store.state.modalStack
|
||||
.map(modal => modal.prev)
|
||||
.indexOf(oldModal);
|
||||
if (removeIndex >= 0) {
|
||||
delete this.$store.state.modalStack[removeIndex].prev;
|
||||
}
|
||||
});
|
||||
},
|
||||
validStack (modalStack) {
|
||||
const modalsThatCanShowTwice = ['profile'];
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
}
|
||||
|
||||
.tierNPC, .npc {
|
||||
color: #77f4c7;
|
||||
fill: #77f4c7;
|
||||
color: #4e4a57;
|
||||
fill: #4e4a57;
|
||||
stroke: #005737;
|
||||
|
||||
&:hover, &:active, &:focus {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="form-wrapper">
|
||||
<div class="warning-banner d-flex" v-if="forgotPassword && preOutage">
|
||||
<div
|
||||
v-if="forgotPassword && preOutage"
|
||||
class="warning-banner d-flex"
|
||||
>
|
||||
<div class="warning-box ml-auto my-auto mr-2 d-flex">
|
||||
<div
|
||||
class="svg-icon exclamation m-auto"
|
||||
|
||||
@@ -592,7 +592,7 @@ export default {
|
||||
this.$emit('createChallenge', challenge);
|
||||
this.resetWorkingChallenge();
|
||||
|
||||
this.$root.$emit('bv::hide::modal', 'challenge-modal');
|
||||
this.$root.$emit('habitica::dismiss-modal', 'challenge-modal');
|
||||
this.$router.push(`/challenges/${challenge._id}`);
|
||||
},
|
||||
async updateChallenge () {
|
||||
@@ -613,7 +613,7 @@ export default {
|
||||
const challenge = await this.$store.dispatch('challenges:updateChallenge', { challenge: challengeDetails });
|
||||
this.$emit('updatedChallenge', { challenge });
|
||||
this.resetWorkingChallenge();
|
||||
this.$root.$emit('bv::hide::modal', 'challenge-modal');
|
||||
this.$root.$emit('habitica::dismiss-modal', 'challenge-modal');
|
||||
},
|
||||
toggleCategorySelect () {
|
||||
this.showCategorySelect = !this.showCategorySelect;
|
||||
|
||||
@@ -144,14 +144,16 @@ export default {
|
||||
challengeId: this.challengeId,
|
||||
winnerId: this.winner._id,
|
||||
});
|
||||
this.$root.$emit('habitica::dismiss-modal', 'close-challenge-modal');
|
||||
this.$router.push('/challenges/myChallenges');
|
||||
},
|
||||
async deleteChallenge () {
|
||||
if (!window.confirm('Are you sure you want to delete this challenge?')) return;
|
||||
if (!window.confirm(this.$t('sureDelCha'))) return;
|
||||
this.challenge = await this.$store.dispatch('challenges:deleteChallenge', {
|
||||
challengeId: this.challengeId,
|
||||
prize: this.prize,
|
||||
});
|
||||
this.$root.$emit('habitica::dismiss-modal', 'close-challenge-modal');
|
||||
this.$router.push('/challenges/myChallenges');
|
||||
},
|
||||
},
|
||||
|
||||
@@ -294,7 +294,7 @@ export default {
|
||||
this.sendingInProgress = false;
|
||||
},
|
||||
close () {
|
||||
this.$root.$emit('bv::hide::modal', 'send-gems');
|
||||
this.$root.$emit('habitica::dismiss-modal', 'send-gems');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -38,7 +38,10 @@
|
||||
<span>{{ $t('push') }}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr v-for="notification in notificationsIds" :key="notification">
|
||||
<tr
|
||||
v-for="notification in notificationsIds"
|
||||
:key="notification"
|
||||
>
|
||||
<td>
|
||||
<span>{{ $t(notification) }}</span>
|
||||
</td>
|
||||
@@ -55,7 +58,7 @@
|
||||
type="checkbox"
|
||||
@change="set('pushNotifications', notification)"
|
||||
>
|
||||
<td v-else>
|
||||
</td><td v-else>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
<div class="how-many-to-buy">
|
||||
<strong>{{ $t('howManyToBuy') }}</strong>
|
||||
</div>
|
||||
<div class="mb-3" v-if="item.addlNotes">
|
||||
<div
|
||||
v-if="item.addlNotes"
|
||||
class="mb-3"
|
||||
>
|
||||
{{ item.addlNotes }}
|
||||
</div>
|
||||
<div class="box">
|
||||
|
||||
@@ -92,9 +92,9 @@ export default {
|
||||
},
|
||||
isNPC () {
|
||||
if (this.backer) {
|
||||
return this.backer.level;
|
||||
return this.backer.tier;
|
||||
} if (this.user && this.user.backer) {
|
||||
return this.user.backer.level;
|
||||
return this.user.backer.tier;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user