From a42007df2d5abcec63619b6f941f00b4214f69e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B0=D0=BB=D0=B8=D0=BC=D0=BE=D0=B2=20=D0=A0=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BC?= Date: Thu, 2 Apr 2026 14:57:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B8=D0=B7=D0=B0=D0=B9=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client-web/src/core/infrastructure/i18n.ts | 6 ++ .../src/core/presentation/layouts/Sidebar.tsx | 6 +- client-web/src/core/utils/utils.ts | 32 ++----- .../modules/chats/presentation/ChatPage.tsx | 4 +- .../presentation/components/ChatView.tsx | 86 +++++++++++++------ .../presentation/components/MessageInput.tsx | 4 +- 6 files changed, 82 insertions(+), 56 deletions(-) diff --git a/client-web/src/core/infrastructure/i18n.ts b/client-web/src/core/infrastructure/i18n.ts index 2ffec33..e962aa0 100644 --- a/client-web/src/core/infrastructure/i18n.ts +++ b/client-web/src/core/infrastructure/i18n.ts @@ -41,6 +41,9 @@ const translations = { noChats: 'Нет чатов — создайте первый!', nothingFound: 'Ничего не найдено', selectChat: 'Выберите чат для начала общения', + selectChatTitle: 'Выберите чат', + selectChatSubtext: 'Начните общение прямо сейчас. Все ваши сообщения защищены сквозным шифрованием.', + newMessage: 'Новое сообщение', noMessages: 'Нет сообщений — напишите первое!', typing: 'печатает...', online: 'в сети', @@ -328,6 +331,9 @@ const translations = { noChats: 'No chats — create one!', nothingFound: 'Nothing found', selectChat: 'Select a chat to start messaging', + selectChatTitle: 'Select a chat', + selectChatSubtext: 'Start communicating right now. All your messages are protected with end-to-end encryption.', + newMessage: 'New message', noMessages: 'No messages — write the first one!', typing: 'typing...', online: 'online', diff --git a/client-web/src/core/presentation/layouts/Sidebar.tsx b/client-web/src/core/presentation/layouts/Sidebar.tsx index 44a17ab..79ba782 100644 --- a/client-web/src/core/presentation/layouts/Sidebar.tsx +++ b/client-web/src/core/presentation/layouts/Sidebar.tsx @@ -59,10 +59,14 @@ export default function Sidebar() { }; socket?.on('story_viewed', onStoryViewed); + + const handleOpenNewChat = () => setShowNewChat(true); + window.addEventListener('OPEN_NEW_CHAT', handleOpenNewChat); return () => { clearInterval(interval); socket?.off('story_viewed', onStoryViewed); + window.removeEventListener('OPEN_NEW_CHAT', handleOpenNewChat); }; }, [user?.id]); @@ -185,7 +189,7 @@ export default function Sidebar() { {/* Float Action Button equivalent for Web */} @@ -985,7 +985,7 @@ export default function MessageInput({ chatId }: MessageInputProps) { ) : (