New client tavern fixes (#8967)

* Load chat on sent

* Removed report own message

* Fixed some minor styles

* Removed extra mods

* Hide class badge

* Fixed chat alignment

* Fixed taven autocomplete
This commit is contained in:
Keith Holliday
2017-08-18 12:30:39 -06:00
committed by GitHub
parent bc499bcfbf
commit cbee0542ad
4 changed files with 88 additions and 38 deletions

View File

@@ -11,8 +11,10 @@ div.autocomplete-selection(v-if='searchResults.length > 0', :style='autocomplete
</style>
<script>
import groupBy from 'lodash/groupBy';
export default {
props: ['selections', 'text', 'coords', 'groupId'],
props: ['selections', 'text', 'coords', 'groupId', 'chat'],
data () {
return {
currentSearch: '',
@@ -47,6 +49,14 @@ export default {
this.searchActive = true;
this.currentSearchPosition = newText.length - 1;
},
chat () {
let usersThatMessage = groupBy(this.chat, 'user');
for (let userName in usersThatMessage) {
if (this.tmpSelections.indexOf(userName) === -1) {
this.tmpSelections.push(userName);
}
}
},
async groupId () {
if (!this.groupId) return;
let members = await this.$store.dispatch('members:getGroupMembers', {groupId: this.groupId});