<script lang="ts">
import MessageView from "@/components/messageView/index.vue";
import TextAudioInput from "@/components/taInput/index.vue";
-import { defineComponent } from "vue";
+import { defineComponent, ref } from "vue";
+import {Messages} from './mockMessages';
+import useMitt from "@/modules/mitt";
export default defineComponent({
name: "Messenger",
components: { MessageView, TextAudioInput },
+ setup() {
+ const { emitter } = useMitt();
+ const counter = ref(0);
+
+ const emittMessage = () => {
+ console.log('testing')
+ counter.value++;
+ emitter.emit('animateSend', Messages[counter.value])
+ }
+ return {
+ emittMessage
+ }
+ }
});
</script>
--- /dev/null
+import { Message } from "@/types/message/index";
+
+export const Messages: Message[] = [
+ {
+ content: "Welcome",
+ context: "ai",
+ subContext: "",
+ modifier: "ai",
+ id: "2",
+ time: ""
+ },
+ {
+ content:
+ "add friend",
+ context: "launch",
+ subContext: "",
+ modifier: "sf",
+ id: "1",
+ time: ""
+ },
+ {
+ content: "Did you mean to addcontact?",
+ context: "addcontact",
+ subContext: "",
+ modifier: "ai",
+ id: "5",
+ time: ""
+ },
+ {
+ content: "yes",
+ context: "fulfill",
+ subContext: "",
+ modifier: "sf",
+ id: "6",
+ time: ""
+ },
+
+ {
+ content: "Hey Anna, did you get the paper done?",
+ context: "Mesage from Tommy McConville",
+ subContext: "New Conversation",
+ modifier: "ai",
+ id: "3",
+ time: ""
+ },
+ {
+ content: "Hey do you know Enrique Hernandez?",
+ context: "Message from Crimata",
+ subContext: "",
+ modifier: "ai",
+ id: "7",
+ time: ""
+ },
+
+ {
+ content: "Yes posting it online soon.",
+ context: "You to Tommy McConville",
+ subContext: "",
+ modifier: "sf",
+ id: "4",
+ time: ""
+ },
+ {
+ content: "Hey do you know Enrique Hernandez?",
+ context: "Message from Crimata",
+ subContext: "",
+ modifier: "ai",
+ id: "8",
+ time: ""
+ },
+ {
+ content: "Hey Anna, did you get the paper done?",
+ context: "Message from Tommy McConville",
+ subContext: "",
+ modifier: "ai",
+ id: "9",
+ time: ""
+ },
+ {
+ content: "Hey Anna, did you get the paper done?",
+ context: "Message from Tommy McConville",
+ subContext: "",
+ modifier: "ai",
+ id: "10",
+ time: ""
+ },
+ {
+ content: "Yes posting it online soon.",
+ context: "Message from Tommy McConville",
+ subContext: "",
+ modifier: "sf",
+ id: "11",
+ time: ""
+ },
+ {
+ content:
+ "I can be there at 5 pm tomorrow to greet you at a Chick file with my almond and chive salad.",
+ context: "You to Tommy McConville",
+ subContext: "",
+ modifier: "sf",
+ id: "12",
+ time: ""
+ },
+ {
+ content: "Hey Anna, did you get the paper done?",
+ context: "Message from Tommy McConville",
+ subContext: "",
+ modifier: "ai",
+ id: "13",
+ time: ""
+ },
+ {
+ content: "Hey Anna, did you get the paper done?",
+ context: "Message from Tommy McConville",
+ subContext: "",
+ modifier: "ai",
+ id: "14",
+ time: ""
+ },
+ {
+ content: "Yes posting it online soon.",
+ context: "You to Tommy McConville",
+ subContext: "",
+ modifier: "sf",
+ id: "15",
+ time: ""
+ },
+ {
+ content: "Sweet, thanks!",
+ context: "Message from Tommy McConville",
+ subContext: "",
+ modifier: "ai",
+ id: "16",
+ time: ""
+ },
+ {
+ content: "Hey do you know Enrique Hernandez?",
+ context: "Message from Crimata AI",
+ subContext: "",
+ modifier: "ai",
+ id: "17",
+ time: ""
+ },
+ {
+ content: "Yes posting it online soon.",
+ context: "You to Tommy McConville",
+ subContext: "",
+ modifier: "sf",
+ id: "18",
+ time: ""
+ },
+ {
+ content: "Sweet, thanks!",
+ context: "Message from Tommy McConville",
+ subContext: "",
+ modifier: "ai",
+ id: "19",
+ time: ""
+ },
+];