+
+
+
@@ -52,26 +36,26 @@
return this.users[this.group.author]
},
messages() {
- if(!this.isAuthorSelf || !this.isLastGroup) return this.group.messages
+ if (!this.isAuthorSelf || !this.isLastGroup) return this.group.messages
return [...this.group.messages, ...this.sendingMessages]
},
userIcon() {
- if(!this.author) return null
+ if (!this.author) return null
- if(this.hover) return this.author.icon
+ if (this.hover) return this.author.icon
return this.author.icon.replace('.gif', '.png')
},
isAuthorSelf() {
- if(!this.author) return
+ if (!this.author) return
return this.group.author === this.userId
},
hasController() {
- if(!this.author) return false
+ if (!this.author) return false
return this.author.id === this.controllerId
}
diff --git a/components/Chat/InputBar.vue b/components/Chat/InputBar.vue
index c2a2432..e9065e4 100644
--- a/components/Chat/InputBar.vue
+++ b/components/Chat/InputBar.vue
@@ -1,21 +1,7 @@
-
-
@@ -41,9 +27,9 @@
},
methods: {
async sendMessage() {
- if(this.sending) return
- if(this.content.length === 0) return
- if(this.content.length > 255) return alert('This message is longer than 255 characters, please shorten it before trying again.')
+ if (this.sending) return
+ if (this.content.length === 0) return
+ if (this.content.length > 255) return alert('This message is longer than 255 characters, please shorten it before trying again.')
const content = sanitizeHtml(this.content, { allowedTags: [], allowedAttributes: {} })
@@ -55,7 +41,7 @@
this.$store.commit('pushSendingMessage', { content })
- if(content.trim().toLowerCase() === 'something cool')
+ if (content.trim().toLowerCase() === 'something cool')
alert('You are not very funny. At all.')
try {
@@ -67,10 +53,10 @@
}
},
didPressKey(e) {
- if(e.keyCode === 8) return
- if(this.content.length === 0) return
+ if (e.keyCode === 8) return
+ if (this.content.length === 0) return
- if(this.typingTimer)
+ if (this.typingTimer)
clearInterval(this.typingTimer)
else
this.$store.commit('setTypingStatus', true)
@@ -80,7 +66,7 @@
didEndTyping(broadcast) {
this.$store.commit('setTypingStatus', false)
- if(this.typingTimer) {
+ if (this.typingTimer) {
clearInterval(this.typingTimer)
this.typingTimer = null
}
@@ -88,4 +74,3 @@
}
}
-
diff --git a/components/Chat/Message.vue b/components/Chat/Message.vue
index f462981..e396036 100644
--- a/components/Chat/Message.vue
+++ b/components/Chat/Message.vue
@@ -1,24 +1,9 @@
-
-
+
@@ -44,7 +29,7 @@
return this.$parent.isAuthorSelf
},
isSelfRoomOwner() {
- if(!this.room) return
+ if (!this.room) return
return this.userId === (typeof this.room.owner === 'string' ? this.room.owner : this.room.owner.id)
},
diff --git a/components/Chat/TypingBar.vue b/components/Chat/TypingBar.vue
index 5928595..cb2f8e9 100644
--- a/components/Chat/TypingBar.vue
+++ b/components/Chat/TypingBar.vue
@@ -1,5 +1,5 @@
-
+
{{ typingTooltip }}
diff --git a/components/Chat/index.vue b/components/Chat/index.vue
index 93daaab..960c450 100644
--- a/components/Chat/index.vue
+++ b/components/Chat/index.vue
@@ -1,20 +1,10 @@
-
+
Nobody said nothing. Maybe say something?
-
-
+
+
@@ -25,7 +15,7 @@
import ChatInput from '~/components/Chat/InputBar'
import ChatTypingBar from '~/components/Chat/TypingBar'
- import GroupedChatMessage from '~/components/Chat/GroupedMessage'
+ import GroupedChatMessage from '~/components/Chat/GroupedChatMessage'
export default {
components: {
@@ -40,20 +30,17 @@
this.$nextTick(this.updateMessageView)
this.$store.subscribe(({ type }, state) => {
- if(type === 'pushMessage' || type === 'pushSendingMessage')
+ if (type === 'pushMessage' || type === 'pushSendingMessage')
this.$nextTick(this.updateMessageView)
})
},
methods: {
updateMessageView() {
const { messagesView } = this.$refs
- if(!messagesView) return
+ if (!messagesView) return
messagesView.scrollTop = messagesView.scrollHeight
}
}
}
-
diff --git a/components/Footer/index.vue b/components/Footer/index.vue
new file mode 100644
index 0000000..d6854e2
--- /dev/null
+++ b/components/Footer/index.vue
@@ -0,0 +1,23 @@
+
+
+
+
diff --git a/components/Form/index.vue b/components/Form/index.vue
index 1ec8096..af08fd3 100644
--- a/components/Form/index.vue
+++ b/components/Form/index.vue
@@ -3,4 +3,3 @@
-
diff --git a/components/Header/Menu/Option.vue b/components/Header/Menu/Option.vue
index 59a5605..ad39b34 100644
--- a/components/Header/Menu/Option.vue
+++ b/components/Header/Menu/Option.vue
@@ -1,25 +1,14 @@
-