mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
* Adjusted styles and added loading for private messages * Allowed for assigning during group task creation * Fixed white logos and start overflow * Added state styles to home * Fixed position * Updated avatar purchasing
52 lines
1.1 KiB
Vue
52 lines
1.1 KiB
Vue
<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],
|
|
props: ['userIdToMessage'],
|
|
components: {
|
|
bModal,
|
|
},
|
|
data () {
|
|
return {
|
|
privateMessage: '',
|
|
loading: false,
|
|
};
|
|
},
|
|
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'));
|
|
},
|
|
},
|
|
};
|
|
</script>
|