commit: becacf064303f0fceca8def3f1c49248b9d3e5f8
parent 0673511fc246d67356dd656ad81ba401e3179108
Author: Shpuld Shpuldson <shp@cock.li>
Date: Wed, 3 Mar 2021 16:47:59 +0200
remove shoutbox test hacks
Diffstat:
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/src/App.vue b/src/App.vue
@@ -50,7 +50,7 @@
<media-modal />
</div>
<chat-panel
- v-if="currentUser"
+ v-if="currentUser && chat"
:floating="true"
class="floating-chat mobile-hidden"
/>
diff --git a/src/modules/chat.js b/src/modules/chat.js
@@ -18,24 +18,6 @@ const chat = {
actions: {
initializeChat (store, socket) {
const channel = socket.channel('chat:public')
- let id = 0
- const createmsg = () => {
- id += 1
- return {
- text: 'test' + id,
- author: {
- username: 'test',
- avatar: '',
- id
- }
- }
- }
-
- const loop = () => {
- store.commit('addMessage', createmsg())
- setTimeout(loop, 3000)
- }
- loop()
channel.on('new_msg', (msg) => {
store.commit('addMessage', msg)