diff --git a/geografia-vue/package.json b/geografia-vue/package.json index 916fb9b..a3c52c9 100644 --- a/geografia-vue/package.json +++ b/geografia-vue/package.json @@ -2,7 +2,7 @@ "name": "geografia_vue", "version": "0.0.0", "scripts": { - "dev": "vite", + "dev": "vite --host", "build": "vite build", "preview": "vite preview --port 4173", "test:unit": "vitest --environment jsdom", diff --git a/geografia-vue/src/components/ChatHistory.vue b/geografia-vue/src/components/ChatHistory.vue index bbf89c5..19c2246 100644 --- a/geografia-vue/src/components/ChatHistory.vue +++ b/geografia-vue/src/components/ChatHistory.vue @@ -1,19 +1,12 @@ - {v-for key="messages" message in history.messages - - } - - + - - {v-if (WriteMsg)} diff --git a/geografia-vue/src/components/ChatList.vue b/geografia-vue/src/components/ChatList.vue index a19c84f..78a634c 100644 --- a/geografia-vue/src/components/ChatList.vue +++ b/geografia-vue/src/components/ChatList.vue @@ -1,18 +1,23 @@ - + @@ -25,10 +30,11 @@ export default { chats: { id: 1, name: "test-name", - last_msg: "test-msg", + last_msg: "🐱⛸️➡️?", seen: false, date: "25/08/22", new_messages: 1, + is_user: false, }, }, }; diff --git a/geografia-vue/src/components/ChatMsg.vue b/geografia-vue/src/components/ChatMsg.vue index 95fb5c6..3c76dba 100644 --- a/geografia-vue/src/components/ChatMsg.vue +++ b/geografia-vue/src/components/ChatMsg.vue @@ -1,15 +1,65 @@ - - {{v-if MsgSender != "user"}} - $MsgType = "Receiver" - Sent text here + + {{ msgText }} - + diff --git a/geografia-vue/src/components/ChatPreview.vue b/geografia-vue/src/components/ChatPreview.vue index d60fb16..df653e6 100644 --- a/geografia-vue/src/components/ChatPreview.vue +++ b/geografia-vue/src/components/ChatPreview.vue @@ -41,16 +41,6 @@ export default { chatDate: String, chatNewMessages: Number, }, - methods: { - fetchCats(){ - var url = "https://api.thecatapi.com/v1/images/search?api_key=live_wErMWjgaxvhV4nsfoyHxwyvscBbfBW606hsQB6iWeG4oLY0IleWSKrs2XgQaQIYB" - fetch(url).then((response) => { - return response.json() - }).then((data)=>{ - return data.url - }) - }, - } }; diff --git a/geografia-vue/src/components/ChatView.vue b/geografia-vue/src/components/ChatView.vue new file mode 100644 index 0000000..a61ff19 --- /dev/null +++ b/geografia-vue/src/components/ChatView.vue @@ -0,0 +1,19 @@ + + + + + + + + + + + +
{{ msgText }}