diff --git a/view/vue-config.js b/view/vue-config.js index c65648d..511a917 100644 --- a/view/vue-config.js +++ b/view/vue-config.js @@ -74,14 +74,14 @@ gstore.add('func', { }, toggleMenuSize: function(){ gstore.data.min_menu=!gstore.data.min_menu; }, - sendMessage: function(msg){ + sendMessage: function(msg, wsc){ /* (1) If empty message -> abort */ if( msg.trim().length == 0 ) return; /* (2) Send message to WebSocket */ - wsc_chat.send(JSON.stringify({message: msg})); + wsc.send(JSON.stringify({message: msg})); /* (3) Add loader */ gstore.data.msg_pending.inbox = true; diff --git a/view/vue/container/emergency.vue b/view/vue/container/emergency.vue index a2f525f..1a008d5 100644 --- a/view/vue/container/emergency.vue +++ b/view/vue/container/emergency.vue @@ -1,17 +1,85 @@ \ No newline at end of file diff --git a/view/vue/container/event.vue b/view/vue/container/event.vue index faf453c..67b145e 100644 --- a/view/vue/container/event.vue +++ b/view/vue/container/event.vue @@ -1,17 +1,85 @@ \ No newline at end of file diff --git a/view/vue/container/inbox.vue b/view/vue/container/inbox.vue index 0ec8119..21b7852 100644 --- a/view/vue/container/inbox.vue +++ b/view/vue/container/inbox.vue @@ -28,7 +28,7 @@ export default { new_message(msg){ // {1} Send message // - this.gstore.func.sendMessage(this.gstore.new_msg.inbox); + this.gstore.func.sendMessage(this.gstore.new_msg.inbox, wsc_chat); // {2} Empty input // this.gstore.new_msg.inbox = '';