|
|
@ -2,32 +2,19 @@
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div ref="msgContainer" id="messagesContainer" class="messagesContainer">
|
|
|
|
<div ref="msgContainer" id="messagesContainer" class="messagesContainer">
|
|
|
|
<div id="messages" class="messages">
|
|
|
|
<div id="messages" class="messages">
|
|
|
|
<message msg="Hey :D" />
|
|
|
|
<p style="text-align: center; font-style: italic;">you entered the chat</p>
|
|
|
|
<message msg="Du bist blööööd xD" />
|
|
|
|
<div v-for="(message, i) in chatroom.messages" :key="message.time">
|
|
|
|
<messageReceive msg="Du auch" />
|
|
|
|
<div v-if="message.content.user !== chatroom.username && function(){
|
|
|
|
<message msg="lol" />
|
|
|
|
return i===0 || chatroom.messages[i-1].content.user!==message.content.user;}()"
|
|
|
|
<messageReceive msg="Du bist voll blöd, ich hasse dich, warum tust du das?!" />
|
|
|
|
style="margin-left: 2rem; margin-top: 1rem">{{message.content.user}}
|
|
|
|
<message msg="Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
|
|
</div>
|
|
|
|
Ut imperdiet vel risus tristique mollis. Proin aliquam felis non vehicula ornare.
|
|
|
|
<messageReceive v-if="message.content.user !== chatroom.username" :msg=message.content.text />
|
|
|
|
Fusce scelerisque pellentesque erat quis sollicitudin.
|
|
|
|
<message v-if="message.content.user === chatroom.username" :msg=message.content.text />
|
|
|
|
Quisque aliquet, ligula ut volutpat vulputate, ligula lorem dictum velit, et aliquam sapien orci sed magna.
|
|
|
|
</div>
|
|
|
|
Nam suscipit ex eget urna accumsan pulvinar. Pellentesque fringilla placerat feugiat.
|
|
|
|
|
|
|
|
Aenean aliquam vestibulum metus. Nulla augue turpis, consectetur vitae quam ac, porttitor rhoncus nunc.
|
|
|
|
|
|
|
|
Nullam non turpis consequat, placerat lectus nec, ornare orci.
|
|
|
|
|
|
|
|
Fusce lorem tortor, viverra ac suscipit sit amet, scelerisque id eros.
|
|
|
|
|
|
|
|
Suspendisse et ultricies elit, vitae pretium ipsum. Suspendisse vel ex in turpis pulvinar feugiat. "
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<messageReceive msg="Du hast Pizza!" />
|
|
|
|
|
|
|
|
<message msg="und Kuchen :P" />
|
|
|
|
|
|
|
|
<message msg="und Kuchen :P" />
|
|
|
|
|
|
|
|
<message msg="und Kuchen :P" />
|
|
|
|
|
|
|
|
<message msg="und Kuchen :P" />
|
|
|
|
|
|
|
|
<message msg="und Kuchen :P" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<newMessage />
|
|
|
|
<newMessage />
|
|
|
|
<topBanner />
|
|
|
|
<topBanner />
|
|
|
|
<chatInformation />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -35,8 +22,8 @@
|
|
|
|
import message from '@/components/message.vue';
|
|
|
|
import message from '@/components/message.vue';
|
|
|
|
import messageReceive from '@/components/messageReceive.vue';
|
|
|
|
import messageReceive from '@/components/messageReceive.vue';
|
|
|
|
import newMessage from '@/components/newMessage.vue';
|
|
|
|
import newMessage from '@/components/newMessage.vue';
|
|
|
|
import topBanner from "@/components/topBanner";
|
|
|
|
import topBanner from '@/components/topBanner.vue';
|
|
|
|
import chatInformation from "@/components/chatInformation";
|
|
|
|
import main from '@/main.js';
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'chat',
|
|
|
|
name: 'chat',
|
|
|
@ -44,8 +31,12 @@ export default {
|
|
|
|
message,
|
|
|
|
message,
|
|
|
|
messageReceive,
|
|
|
|
messageReceive,
|
|
|
|
newMessage,
|
|
|
|
newMessage,
|
|
|
|
topBanner,
|
|
|
|
topBanner
|
|
|
|
chatInformation
|
|
|
|
},
|
|
|
|
|
|
|
|
data(){
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
chatroom: main.data().chatroom
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|