From e5853615db96eb18246cc2b27345931aaa245b98 Mon Sep 17 00:00:00 2001 From: C4rnivore Date: Thu, 30 Oct 2025 16:50:16 +0500 Subject: [PATCH] created modals for: ending or quitting session and ending transaltion ; --- .../src/components/modals/EndSessionModal.tsx | 49 +++++++++++++++++++ .../components/modals/EndTranslationModal.tsx | 30 ++++++++++++ .../components/modals/QuitSessionModal.tsx | 49 +++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 client/src/components/modals/EndSessionModal.tsx create mode 100644 client/src/components/modals/EndTranslationModal.tsx create mode 100644 client/src/components/modals/QuitSessionModal.tsx diff --git a/client/src/components/modals/EndSessionModal.tsx b/client/src/components/modals/EndSessionModal.tsx new file mode 100644 index 0000000..cf5f0c0 --- /dev/null +++ b/client/src/components/modals/EndSessionModal.tsx @@ -0,0 +1,49 @@ +import ModalWrapper from "../ModalWrapper"; +import Button from "../ui/Button"; +import useModalStore from "../../store/modalStore"; + +interface EndSessionModalProps { + onEndSession: () => void; +} + +function EndSessionModal({ onEndSession }: EndSessionModalProps) { + const { setModal } = useModalStore(); + + function handleEndSession() { + onEndSession(); + setModal(null); + } + + return ( + +
+

+ Точно хотите завершить сеанс? +

+

+ Результаты будут сохранены +

+
+ + +
+
+
+ ); +} + +export default EndSessionModal; diff --git a/client/src/components/modals/EndTranslationModal.tsx b/client/src/components/modals/EndTranslationModal.tsx new file mode 100644 index 0000000..7e52198 --- /dev/null +++ b/client/src/components/modals/EndTranslationModal.tsx @@ -0,0 +1,30 @@ +import ModalWrapper from "../ModalWrapper"; +import Button from "../ui/Button"; +import useModalStore from "../../store/modalStore"; + +function EndTranslationModal() { + const { setModal } = useModalStore(); + + return ( + +
+

+ Трансляция завершилась +

+

+ Но вы можете продолжить общение и подвести итоги встречи +

+ +
+
+ ); +} + +export default EndTranslationModal; diff --git a/client/src/components/modals/QuitSessionModal.tsx b/client/src/components/modals/QuitSessionModal.tsx new file mode 100644 index 0000000..2304026 --- /dev/null +++ b/client/src/components/modals/QuitSessionModal.tsx @@ -0,0 +1,49 @@ +import ModalWrapper from "../ModalWrapper"; +import Button from "../ui/Button"; +import useModalStore from "../../store/modalStore"; + +interface QuitSessionModalProps { + onQuitSession: () => void; +} + +function QuitSessionModal({ onQuitSession }: QuitSessionModalProps) { + const { setModal } = useModalStore(); + + function handleQuitSession() { + onQuitSession(); + setModal(null); + } + + return ( + +
+

+ Хотите выйти? +

+

+ Результаты встречи будут сохранены +

+
+ + +
+
+
+ ); +} + +export default QuitSessionModal;