mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Challenges plus misc fixes (#8961)
* Forced full refresh after deletE * Fixed styles on firefox * Removed instagram link * Added information to modal * Fixed deleteing and task keeping * Added redirect to challenge detail after created * Updated challenge item styles * Added new limit option to challenges
This commit is contained in:
@@ -257,11 +257,18 @@ export default {
|
||||
await this.$store.dispatch('challenges:joinChallenge', {challengeId: this.challengeId});
|
||||
},
|
||||
async leaveChallenge () {
|
||||
let keepChallenge = confirm('Do you want to keep challenge tasks?');
|
||||
let keep = 'keep-all';
|
||||
if (!keepChallenge) keep = 'remove-all';
|
||||
|
||||
let index = findIndex(this.user.challenges, (challengeId) => {
|
||||
return challengeId === this.challengeId;
|
||||
});
|
||||
this.user.challenges.splice(index, 1);
|
||||
await this.$store.dispatch('challenges:leaveChallenge', {challengeId: this.challengeId});
|
||||
await this.$store.dispatch('challenges:leaveChallenge', {
|
||||
challengeId: this.challengeId,
|
||||
keep,
|
||||
});
|
||||
},
|
||||
closeChallenge () {
|
||||
this.$root.$emit('show::modal', 'close-challenge-modal');
|
||||
|
||||
Reference in New Issue
Block a user