mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
* Separated private message model * Added markdown to profile * Add color backgrounds * Added broken challenge flow * Added summary field to getgroups * Fixed group form information loading * Updated autocomplete to use chat * Fixed npc styles * Fixed onload mentions
36 lines
857 B
Vue
36 lines
857 B
Vue
<template lang="pug">
|
|
b-modal#private-message(title="Message", size='sm', :hide-footer="true")
|
|
textarea.form-control(v-model='privateMessage')
|
|
button.btn.btn-primary(@click='sendPrivateMessage()') Send
|
|
</template>
|
|
|
|
<script>
|
|
import bModal from 'bootstrap-vue/lib/components/modal';
|
|
import notifications from 'client/mixins/notifications';
|
|
|
|
export default {
|
|
mixins: [notifications],
|
|
props: ['userIdToMessage'],
|
|
components: {
|
|
bModal,
|
|
},
|
|
data () {
|
|
return {
|
|
privateMessage: '',
|
|
};
|
|
},
|
|
methods: {
|
|
async sendPrivateMessage () {
|
|
if (!this.privateMessage || !this.userIdToMessage) return;
|
|
|
|
await this.$store.dispatch('members:sendPrivateMessage', {
|
|
message: this.privateMessage,
|
|
toUserId: this.userIdToMessage,
|
|
});
|
|
|
|
this.text(this.$t('messageSentAlert'));
|
|
},
|
|
},
|
|
};
|
|
</script>
|