починил веб сокет

This commit is contained in:
uniknow 2024-06-24 22:13:43 +04:00
parent 5f94ff5e29
commit ea980b3974

View file

@ -49,6 +49,8 @@
const userData = await UserCheck(); const userData = await UserCheck();
userId = userData.id; userId = userData.id;
window.addEventListener('keydown', onEnterPress);
chats = await getAllChats() chats = await getAllChats()
createNewChatButton = true createNewChatButton = true
console.log(chats, " чаты") console.log(chats, " чаты")
@ -95,9 +97,6 @@
} }
messages = messages messages = messages
onDestroy(() => {
close();
});
}) })
} }
} }
@ -564,8 +563,7 @@ let PickedName = ""
<!-- svelte-ignore a11y-autofocus --> <!-- svelte-ignore a11y-autofocus -->
<div class="textMsg"> <div class="textMsg">
<textarea on:keydown={onEnterPress} <textarea autofocus placeholder="Введите сообщение" rows="{rows}" bind:value={messageText}
autofocus placeholder="Введите сообщение" rows="{rows}" bind:value={messageText}
on:input={onInput} bind:this={inputArea} name="msg" id="msg"></textarea> on:input={onInput} bind:this={inputArea} name="msg" id="msg"></textarea>
<!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-click-events-have-key-events -->
@ -1187,6 +1185,7 @@ width: 100%;
var(--gradient) border-box; var(--gradient) border-box;
width: 98%; width: 98%;
margin-top: 3px;
} }
#msg{ #msg{