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) { ) : (