From 02043d4d9706aaddbc90ccb403367e8a28dffe07 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: Tue, 7 Apr 2026 12:29:41 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B8=D0=BD=D0=B8=D0=BC=D0=B0=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D0=B0=D1=8F=20=D0=B0=D0=B4=D0=B0=D0=BF=D1=82=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=BF=D0=BE=D0=B4=20=D0=BC=D0=BE=D0=B1?= =?UTF-8?q?=D0=B8=D0=BB=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client-web/index.html | 2 + client-web/src/core/infrastructure/i18n.ts | 6 + .../components/ui/ImageLightbox.tsx | 10 +- .../presentation/layouts/GlobalNavBar.tsx | 18 +- .../core/presentation/layouts/SideMenu.tsx | 2 +- .../src/core/presentation/layouts/Sidebar.tsx | 6 +- client-web/src/index.css | 27 ++ .../modules/chats/presentation/ChatPage.tsx | 8 +- .../presentation/components/ChatView.tsx | 42 +- .../presentation/components/GroupSettings.tsx | 2 +- .../presentation/components/NewChatModal.tsx | 4 +- .../components/CreateStoryModal.tsx | 360 ++++++++++-------- .../presentation/components/UserProfile.tsx | 2 +- 13 files changed, 309 insertions(+), 180 deletions(-) diff --git a/client-web/index.html b/client-web/index.html index 3e3b4e3..3fb7a5e 100644 --- a/client-web/index.html +++ b/client-web/index.html @@ -2,6 +2,8 @@ + + Knot Messenger diff --git a/client-web/src/core/infrastructure/i18n.ts b/client-web/src/core/infrastructure/i18n.ts index d6f984e..547d5d3 100644 --- a/client-web/src/core/infrastructure/i18n.ts +++ b/client-web/src/core/infrastructure/i18n.ts @@ -248,6 +248,7 @@ const translations = { you: 'вы', // Stories Editor cropVideo: 'Обрезка видео', + cropTool: 'Обрезка', trimVideo: 'Обрезать видео', trim: 'Обрезать', reset: 'Сбросить', @@ -279,6 +280,8 @@ const translations = { unmuteVideo: 'Включить звук', interactive: 'Интерактив', apply: 'Применить', + zoom: 'Масштаб', + rotation: 'Поворот', // User profile mediaTab: 'Медиа', gifs: 'GIF', @@ -622,6 +625,7 @@ const translations = { you: 'you', // Stories Editor cropVideo: 'Video Crop', + cropTool: 'Crop', trimVideo: 'Trim Video', trim: 'Trim', reset: 'Reset', @@ -653,6 +657,8 @@ const translations = { unmuteVideo: 'Unmute Video', interactive: 'Interactive', apply: 'Apply', + zoom: 'Zoom', + rotation: 'Rotation', // User profile mediaTab: 'Media', gifs: 'GIF', diff --git a/client-web/src/core/presentation/components/ui/ImageLightbox.tsx b/client-web/src/core/presentation/components/ui/ImageLightbox.tsx index d8fcc28..455c69f 100644 --- a/client-web/src/core/presentation/components/ui/ImageLightbox.tsx +++ b/client-web/src/core/presentation/components/ui/ImageLightbox.tsx @@ -99,8 +99,16 @@ export default function ImageLightbox({ url, images, initialIndex = 0, onClose } animate={{ scale: 1, opacity: 1 }} exit={{ scale: 0.8, opacity: 0 }} transition={{ duration: 0.2 }} + drag={gallery && total > 1 ? "x" : false} + dragConstraints={{ left: 0, right: 0 }} + dragElastic={0.4} + onDragEnd={(_, info) => { + const swipeThreshold = 50; + if (info.offset.x > swipeThreshold) goPrev(); + else if (info.offset.x < -swipeThreshold) goNext(); + }} onClick={(e) => e.stopPropagation()} - className="absolute inset-x-0 inset-y-12 flex items-center justify-center p-4" + className="absolute inset-x-0 inset-y-12 flex items-center justify-center p-4 touch-none" > {(currentType === 'video' || currentType === 'gif') ? (