2017-12-04 18:13:49 +00:00
|
|
|
<template>
|
|
|
|
|
|
|
|
<div id='CONTAINER' class='message'>
|
|
|
|
|
|
|
|
<div v-for='msg in gstore.notif[1].data' :class="msg[0] == gstore.server.session.name ? 'me' : ''">
|
|
|
|
<span class='author'>{{ msg[0] }}</span>
|
|
|
|
<span class='content'>{{ msg[1] }}</span>
|
|
|
|
</div>
|
|
|
|
|
2017-12-05 17:12:26 +00:00
|
|
|
<form class='msg-input' @submit.prevent='new_message'>
|
2017-12-05 12:32:42 +00:00
|
|
|
<input type='text' placeholder='Nouveau message..' id='msg-new-content' v-model='gstore.new_msg'>
|
|
|
|
<button></button>
|
|
|
|
</form>
|
2017-12-04 18:13:49 +00:00
|
|
|
</div>
|
|
|
|
|
2017-12-05 12:32:42 +00:00
|
|
|
|
2017-12-04 18:13:49 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2017-12-05 07:39:24 +00:00
|
|
|
name: 'CONTAINER_INBOX',
|
2017-12-05 17:41:39 +00:00
|
|
|
data(){ return { gstore: gstore.data }; },
|
2017-12-05 17:12:26 +00:00
|
|
|
methods: {
|
|
|
|
new_message(msg){
|
|
|
|
|
|
|
|
// {1} Send message //
|
|
|
|
this.gstore.func.sendMessage(this.gstore.new_msg);
|
|
|
|
|
|
|
|
// {2} Empty input //
|
|
|
|
this.gstore.new_msg = '';
|
|
|
|
}
|
|
|
|
}
|
2017-12-04 18:13:49 +00:00
|
|
|
}
|
|
|
|
</script>
|