|
|
@ -1,7 +1,7 @@
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
//Fix v-if riga 20
|
|
|
|
//Fix v-if riga 20
|
|
|
|
import ChatPreview from "@/components/ChatPreview.vue";
|
|
|
|
import ChatPreview from "@/components/ChatPreview.vue";
|
|
|
|
import ChatView from "./ChatView.vue";
|
|
|
|
import ChatView from "@/components/single_chat/ChatView.vue";
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
@ -17,7 +17,7 @@ import ChatView from "./ChatView.vue";
|
|
|
|
:chat-new-messages="chat.new_messages"
|
|
|
|
:chat-new-messages="chat.new_messages"
|
|
|
|
@click="showChat(chat)"
|
|
|
|
@click="showChat(chat)"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<ChatView v-if="selected-chat" />
|
|
|
|
<ChatView v-if="selectedChat" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -26,10 +26,13 @@ import demo_chats_json from "../assets/demo_chats.json";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
demo_chats: demo_chats_json,
|
|
|
|
demo_chats: demo_chats_json,
|
|
|
|
selectedChat: false,
|
|
|
|
selectedChat: false,
|
|
|
|
|
|
|
|
chatId: Number,
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
showChat(chat) {
|
|
|
|
showChat(chat) {
|
|
|
|
|
|
|
|
console.log(chat);
|
|
|
|
this.$emit("change-header", [chat.picture, chat.name]);
|
|
|
|
this.$emit("change-header", [chat.picture, chat.name]);
|
|
|
|
this.selectedChat = true;
|
|
|
|
this.selectedChat = true;
|
|
|
|
|
|
|
|
this.chatId = chat.id;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|