mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
* Some random quick (#9111) * Switch group button directions * Allowed admins to export challenges * Added scoping to some stable styles * Fixed challenge cloning * Tasks tags (#9112) * Added auto apply and exit * Add challenge tag editing * Fixed lint * Skill fixes (#9113) * Added local storage setting for spell drawer * Added new spell styles * Fixed typo * Reset local creds if access is denied (#9114) * various fixes: group leader's name at top of edit drop-down; Members List; etc (#9117) * fix text describing location of subscription/gem gift box * disable Copy As To-Do in Tavern, guilds, party because it's not working * change members label on group pages to Member List * remove outdated info about seeing number of Gems available to buy * allow Danger Zone to be seen by players without local authentication Also add an hr because the Danger Zone heading was crammed up against the button above it. * put current group leader's name at top of Leader change drop-down * Client Fixes (#9120) * unduplicate logout code * re-enable debug menu * fix pets badge and equipping mounts * close gift modal after sending gems * armoire notifications * Oct 1 fixes (#9121) * Added default tags to task * Added seasonal gear check and show spooky * Disabled spooky sparkles * Fixed challenge remove tasks modal * Hid checklist * Added group gems modal * Purchase with amazon * Added check for user health * Added missing notification file
83 lines
2.8 KiB
Vue
83 lines
2.8 KiB
Vue
<template lang='pug'>
|
|
b-modal#broken-task-modal(title="Broken Challenge", size='sm', :hide-footer="true", v-if='brokenChallengeTask && brokenChallengeTask.challenge')
|
|
.modal-body
|
|
div(v-if='brokenChallengeTask.challenge.broken === "TASK_DELETED" || brokenChallengeTask.challenge.broken === "CHALLENGE_TASK_NOT_FOUND"')
|
|
h2 {{ $t('brokenTask') }}
|
|
div
|
|
button.btn.btn-primary(@click='unlink("keep")') {{ $t('keepIt') }}
|
|
button.btn.btn-danger(@click='removeTask(obj)') {{ $t('removeIt') }}
|
|
div(v-if='brokenChallengeTask.challenge.broken === "CHALLENGE_DELETED"')
|
|
h2 {{ $t('brokenChallenge') }}
|
|
div
|
|
button.btn.btn-primary(@click='unlink("keep-all")') {{ $t('keepThem') }}
|
|
button.btn.btn-danger(@click='unlink("remove-all")') {{ $t('removeThem') }}
|
|
div(v-if='brokenChallengeTask.challenge.broken === "CHALLENGE_CLOSED"')
|
|
h2(v-html="$t('challengeCompleted', {user: brokenChallengeTask.challenge.winner})")
|
|
div
|
|
button.btn.btn-primary(@click='unlink("keep-all")') {{ $t('keepThem') }}
|
|
button.btn.btn-danger(@click='unlink("remove-all")') {{ $t('removeThem') }}
|
|
// @TODO: I ported this over, but do we use it anymore?
|
|
//div(v-if='brokenChallengeTask.challenge.broken === "UNSUBSCRIBED"')
|
|
p {{ $t('unsubChallenge') }}
|
|
p
|
|
a(@click="unlink('keep-all')") {{ $t('keepThem') }}
|
|
| |
|
|
a(@click="unlink('remove-all')") {{ $t('removeThem') }}
|
|
</template>
|
|
|
|
<style scoped>
|
|
.modal-body {
|
|
padding-bottom: 2em;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
import { mapActions } from 'client/libs/store';
|
|
import bModal from 'bootstrap-vue/lib/components/modal';
|
|
import notifications from 'client/mixins/notifications';
|
|
|
|
export default {
|
|
mixins: [notifications],
|
|
components: {
|
|
bModal,
|
|
},
|
|
computed: {
|
|
brokenChallengeTask () {
|
|
return this.$store.state.brokenChallengeTask;
|
|
},
|
|
},
|
|
methods: {
|
|
...mapActions({
|
|
destroyTask: 'tasks:destroy',
|
|
unlinkOneTask: 'tasks:unlinkOneTask',
|
|
unlinkAllTasks: 'tasks:unlinkAllTasks',
|
|
}),
|
|
async unlink (keepOption) {
|
|
if (keepOption.indexOf('-all') !== -1) {
|
|
this.unlinkAllTasks({
|
|
challengeId: this.brokenChallengeTask.challenge.id,
|
|
keep: keepOption,
|
|
});
|
|
await this.$store.dispatch('tasks:fetchUserTasks', {forceLoad: true});
|
|
this.close();
|
|
return;
|
|
}
|
|
|
|
this.unlinkOneTask({
|
|
task: this.brokenChallengeTask,
|
|
keep: keepOption,
|
|
});
|
|
this.close();
|
|
},
|
|
removeTask () {
|
|
if (!confirm('Are you sure you want to delete this task?')) return;
|
|
this.destroyTask(this.brokenChallengeTask);
|
|
},
|
|
close () {
|
|
this.$store.state.brokenChallengeTask = {};
|
|
this.$root.$emit('hide::modal', 'broken-task-modal');
|
|
},
|
|
},
|
|
};
|
|
</script>
|