More fixes (#8988)

* Links stay white on hover

* Fixed task icon color

* Disabled plus button when needed

* Fixed difficulty color

* Fixed task reward color

* Updated create styles

* Fixed group plan link

* Fixed second group test modal

* Added login incentives

* Fixed group notification clear

* Show baily correctly

* Styled armoire notification

* Fixed contributor achievement styles

* Fixed death

* Fixed drop styles

* Fixed invited friend modal

* Fixed joined challenge achievement style

* Fixed joined guild style

* Fixed level up styles

* Updated low health styles

* Fixed bailey styles

* Updated quest completed

* Added soem conditionals to hide modals

* Added rebirth styles

* Fixed rebirth enable styles

* Fixed streak styles

* Fixed testing modals

* Fixed ultimate gear achievement

* Fixed won challenge

* Set user to welcomed if created on mobile

* Removed old default tasks

* Began adding more options to avatar

* Added change class

* Inbox to messages

* Moved profile to menu

* Added user modal for viewing a user and send message

* Fixed conversations

* Fixed lint

* Fixed challenges sending to server

* Added challenge progress view

* Fixed group sync after pay

* Fixed some group accepting features

* Fixed initial chat loading

* Fixed some exitence errors

* Added user names to assigned

* Added upgrade link

* Began adding new payment flow

* Added default tasks

* Updated avatar styles

* Updated tutorial styles

* Rebuilt notifications and styles

* Updated upload script

* Fixed lint

* Added default tasks back to mobile and added updated tests

* More test fixes
This commit is contained in:
Keith Holliday
2017-08-25 20:56:21 -06:00
committed by GitHub
parent c129c38631
commit 0233f7b486
64 changed files with 13438 additions and 5207 deletions

View File

@@ -26,10 +26,10 @@
.conversation(v-for='conversation in conversations', @click='selectConversation(conversation.key)', :class="{active: selectedConversation === conversation.key}")
div
span(:class="userLevelStyle(conversation)") {{conversation.name}}
span.timeago {{conversation.date}}
span.timeago {{conversation.date | timeAgo}}
div {{conversation.lastMessageText.substring(0, 30)}}
.col-8.messages
chat-message.container-fluid(:chat.sync='activeChat')
chat-message.container-fluid(:chat.sync='activeChat', :inbox='true')
// @TODO: Implement new message header here when we fix the above
@@ -130,7 +130,7 @@
<script>
import moment from 'moment';
import filter from 'lodash/filter';
import sortBy from 'lodash/sortBy';
// import sortBy from 'lodash/sortBy';
import { mapState } from 'client/libs/store';
import styleHelper from 'client/mixins/styleHelper';
@@ -159,6 +159,11 @@ export default {
activeChat: [],
};
},
filters: {
timeAgo (value) {
return moment(new Date(value)).fromNow();
},
},
computed: {
...mapState({user: 'user.data'}),
conversations () {
@@ -185,7 +190,7 @@ export default {
timestamp: message.timestamp,
});
conversations[userId].lastMessageText = message.text;
conversations[userId].date = moment(new Date(message.timestamp)).fromNow();
conversations[userId].date = message.timestamp;
}
return conversations;
@@ -207,10 +212,12 @@ export default {
},
selectConversation (key) {
this.selectedConversation = key;
this.activeChat = this.conversations[this.selectedConversation].messages;
this.activeChat = sortBy(this.activeChat, [(o) => {
return o.timestamp;
}]);
let activeChat = this.conversations[this.selectedConversation].messages;
// @TODO: I think I did this wrong
// activeChat = sortBy(this.activeChat, [(o) => {
// return o.timestamp;
// }]);
this.$set(this, 'activeChat', activeChat);
},
sendPrivateMessage () {
this.$store.dispatch('members:sendPrivateMessage', {