From 9e4897d36b5f72669a254414e25234221102311c Mon Sep 17 00:00:00 2001 From: supertiger1234 Date: Tue, 9 Apr 2019 21:18:13 +0100 Subject: [PATCH] moved openchat to friends template --- .vs/slnx.sqlite | Bin 77824 -> 77824 bytes src/components/app/News.vue | 15 ++-- .../app/relationships/FriendsTemplate.vue | 33 ++------ src/components/app/userInformationPopout.vue | 28 +++++-- src/store/modules/channelModule.js | 32 +++---- src/store/modules/messageModule.js | 79 ++++++++++++------ 6 files changed, 105 insertions(+), 82 deletions(-) diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 742376e7933e4de5e74efcddb378fc3657c8ee65..8941b1d771ee303c797f9bbc4a5fa7ce4acd0e21 100644 GIT binary patch delta 44 zcmZp8z|!!5Wr8%L*hCp;MzM_vmGb= 1 && document.hasFocus()) { this.$socket.emit('notification:dismiss', {channelID: this.channelID}); } - // this.$store.dispatch('openChat', { - // channelID: this.channelID, - // channelName: this.channel - // }) - this.$store.dispatch('selectedChannelID', this.$props.channelID); - this.$store.dispatch('setChannelName', this.recipient.username); - if (this.$store.getters.messages[this.$props.channelID]) return; - if (this.$store.getters.channels[this.$props.channelID] && !this.$store.getters.messages[this.$props.channelID]) return this.getMessages(); - const {ok, error, result} = await channelService.post(this.$props.channelID); - if ( ok ) { - this.$store.dispatch('channel', result.data.channel); - this.getMessages(); - } else { - // TODO handle this - console.log(error) - } + this.$store.dispatch('openChat', { + channelID: this.channelID, + channelName: this.recipient.username + }) }, openUserInformation() { this.$store.dispatch('setUserInformationPopout', this.recipient.uniqueID) diff --git a/src/components/app/userInformationPopout.vue b/src/components/app/userInformationPopout.vue index 114de90..51d07b9 100644 --- a/src/components/app/userInformationPopout.vue +++ b/src/components/app/userInformationPopout.vue @@ -19,7 +19,6 @@
-
person_add
Add friend
@@ -36,7 +35,7 @@
person_add_disabled
End Friendship
-
+
chat
Send Message
@@ -48,7 +47,6 @@