message grouping

This commit is contained in:
Andrew Gundersen 2021-03-13 11:59:37 -06:00
commit feccda8ec9
6 changed files with 110 additions and 37 deletions

View file

@ -10,12 +10,9 @@ import useMitt from "@/modules/mitt";
import { useIpc } from '@/modules/ipc';
import keyboardNameMap from "./keyBoardMaps/keyboardNameMap";
import keyboardCharMap from "./keyBoardMaps/keyboardCharMap";
import { RenderMessage, ClientMessage } from "@/types/message/index";
import { v4 as uuidv4 } from 'uuid';
import {clientMessage, initRenderMessage} from '@/modules/message';
let textInput: HTMLInputElement | null;
let uid: string;
export default function useInputController() {
@ -37,8 +34,8 @@ export default function useInputController() {
emitter.emit("self-message", message);
// Then send it to the backend for processing.
const clientMm = clientMessage(text, false, message.uid);
post('client-message', message);
const clientM = clientMessage(text, false, message.uid);
post('client-message', clientM);
// Reset the text input.
if (textInput) textInput.value = '';