UI: DM список метаданных и Enter/Ctrl+Enter в чате

This commit is contained in:
AidarKC
2026-05-19 15:50:42 +03:00
parent c6d310184b
commit 8325cbec84
5 changed files with 74 additions and 6 deletions
+10
View File
@@ -416,6 +416,16 @@ export function render({ navigate, route }) {
const input = form.elements.message;
autoResizeComposer(input);
input?.addEventListener('input', () => autoResizeComposer(input));
input?.addEventListener('keydown', async (event) => {
if (event.key !== 'Enter') return;
if (event.ctrlKey) return;
event.preventDefault();
const text = String(input.value || '').trim();
if (!text) return;
input.value = '';
autoResizeComposer(input);
await sendTextMessage(text);
});
form.querySelector('#chat-voice-input')?.addEventListener('click', async () => {
await openSpeechInputModal({