mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Oct 11 fxes (#9181)
* Added unqequip for hair styles * Added quest rewards to quest completed modal * Fixed display of task approvals * Ensured the user is welcomed before showing login notification * Added new message modal * fixed manager functions * Fixed group edit on group plan
This commit is contained in:
@@ -1,63 +0,0 @@
|
||||
<template lang="pug">
|
||||
b-modal#private-message(title="Message", size='md', :hide-footer="true")
|
||||
.content
|
||||
textarea.form-control(v-model='privateMessage')
|
||||
button.btn.btn-primary(@click='sendPrivateMessage()', :disabled='loading') Send
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content {
|
||||
padding: 1em;
|
||||
|
||||
textarea {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import bModal from 'bootstrap-vue/lib/components/modal';
|
||||
import notifications from 'client/mixins/notifications';
|
||||
|
||||
export default {
|
||||
mixins: [notifications],
|
||||
components: {
|
||||
bModal,
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
privateMessage: '',
|
||||
loading: false,
|
||||
userIdToMessage: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
userIdToMessageStore () {
|
||||
return this.$store.state.userIdToMessage;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
userIdToMessageStore () {
|
||||
this.userIdToMessage = this.userIdToMessageStore;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async sendPrivateMessage () {
|
||||
if (!this.privateMessage || !this.userIdToMessage) return;
|
||||
|
||||
this.loading = true;
|
||||
|
||||
await this.$store.dispatch('members:sendPrivateMessage', {
|
||||
message: this.privateMessage,
|
||||
toUserId: this.userIdToMessage,
|
||||
});
|
||||
|
||||
this.loading = false;
|
||||
|
||||
this.text(this.$t('messageSentAlert'));
|
||||
|
||||
this.privateMessage = '';
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user