From 92289e545a62bd28ea336c5d712a05445e0e20ab Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Fri, 26 Jan 2018 15:11:34 +0100 Subject: [PATCH] Move chat to sidebar. --- package.json | 1 + src/App.js | 7 +++++-- src/App.vue | 1 + .../chat.js => chat_panel/chat_panel.js} | 4 ++-- .../chat.vue => chat_panel/chat_panel.vue} | 19 +++++++++---------- src/components/nav_panel/nav_panel.vue | 5 ----- src/main.js | 7 ++++--- yarn.lock | 8 +++++++- 8 files changed, 29 insertions(+), 23 deletions(-) rename src/components/{chat/chat.js => chat_panel/chat_panel.js} (87%) rename src/components/{chat/chat.vue => chat_panel/chat_panel.vue} (74%) diff --git a/package.json b/package.json index 4e98647bc9..3a807a6c67 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "sanitize-html": "^1.13.0", "sass-loader": "^4.0.2", "vue": "^2.3.4", + "vue-chat-scroll": "^1.2.1", "vue-i18n": "^7.3.2", "vue-router": "^2.5.3", "vue-template-compiler": "^2.3.4", diff --git a/src/App.js b/src/App.js index 1da3ff7cb0..0636c47dbc 100644 --- a/src/App.js +++ b/src/App.js @@ -2,6 +2,7 @@ import UserPanel from './components/user_panel/user_panel.vue' import NavPanel from './components/nav_panel/nav_panel.vue' import Notifications from './components/notifications/notifications.vue' import UserFinder from './components/user_finder/user_finder.vue' +import ChatPanel from './components/chat_panel/chat_panel.vue' export default { name: 'app', @@ -9,7 +10,8 @@ export default { UserPanel, NavPanel, Notifications, - UserFinder + UserFinder, + ChatPanel }, data: () => ({ mobileActivePanel: 'timeline' @@ -21,7 +23,8 @@ export default { }, logoStyle () { return { 'background-image': `url(${this.$store.state.config.logo})` } }, style () { return { 'background-image': `url(${this.background})` } }, - sitename () { return this.$store.state.config.name } + sitename () { return this.$store.state.config.name }, + chat () { return this.$store.state.chat.channel } }, methods: { activatePanel (panelName) { diff --git a/src/App.vue b/src/App.vue index 74a18dc787..ec403519b3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,6 +23,7 @@ diff --git a/src/components/chat/chat.js b/src/components/chat_panel/chat_panel.js similarity index 87% rename from src/components/chat/chat.js rename to src/components/chat_panel/chat_panel.js index ef326d4a1b..b146c5d916 100644 --- a/src/components/chat/chat.js +++ b/src/components/chat_panel/chat_panel.js @@ -1,4 +1,4 @@ -const chat = { +const chatPanel = { data () { return { currentMessage: '', @@ -18,4 +18,4 @@ const chat = { } } -export default chat +export default chatPanel diff --git a/src/components/chat/chat.vue b/src/components/chat_panel/chat_panel.vue similarity index 74% rename from src/components/chat/chat.vue rename to src/components/chat_panel/chat_panel.vue index 6c1e2c3890..ec379db575 100644 --- a/src/components/chat/chat.vue +++ b/src/components/chat_panel/chat_panel.vue @@ -1,12 +1,12 @@ - - +