diff --git a/public/assets/locales/en/translation.json b/public/assets/locales/en/translation.json
index bf0e390..2e87a6a 100644
--- a/public/assets/locales/en/translation.json
+++ b/public/assets/locales/en/translation.json
@@ -8,8 +8,8 @@
"popup-connect-title": "Connection code",
"popup-connect-btn-mode": "Select demonstration mode",
"popup-connect-btn-continue": "Continue",
- "fullscreen-control-btn": "Expand",
- "fullscreen-control-btn-active": "Collapse",
+ "fullscreen-control-btn": "Windowed mode",
+ "fullscreen-control-btn-active": "Fullscreen mode",
"request-control-btn": "Request control",
"request-control-btn-disable": "Stop control",
"mute-control-btn": "Turn On Mic",
@@ -19,9 +19,9 @@
"popup-control-code": "Connection code",
"popup-control-link": "Link for connection",
"popup-control-btn": "Copy",
- "popup-control-btn-active": "Copied!",
+ "popup-control-btn-active": "Link Copied",
"language-control-btn": "Language",
- "exit-control-btn": "Exit presintation",
+ "exit-control-btn": "Exit",
"popup-control-exit-title": "Are you sure you want to end the demo?",
"popup-control-yes": "Finish",
"popup-control-no": "Stay"
diff --git a/public/assets/locales/ru/translation.json b/public/assets/locales/ru/translation.json
index 0ee4112..5a969a7 100644
--- a/public/assets/locales/ru/translation.json
+++ b/public/assets/locales/ru/translation.json
@@ -8,8 +8,8 @@
"popup-connect-title": "Код подключения к демонстрации",
"popup-connect-btn-mode": "Выбор способа демонстрации",
"popup-connect-btn-continue": "Продолжить",
- "fullscreen-control-btn": "Развернуть",
- "fullscreen-control-btn-active": "Свернуть",
+ "fullscreen-control-btn": "Полноэкранный режим",
+ "fullscreen-control-btn-active": "Оконный режим",
"request-control-btn": "Запрос управления",
"request-control-btn-disable": "Запрет управления",
"mute-control-btn": "Включить микрофон",
@@ -19,9 +19,9 @@
"popup-control-code": "Код подключения",
"popup-control-link": "Ссылка для подключения",
"popup-control-btn": "Скопировать",
- "popup-control-btn-active": "Скопировано",
+ "popup-control-btn-active": "Ссылка скопирована",
"language-control-btn": "Язык",
- "exit-control-btn": "Завершить презентацию",
+ "exit-control-btn": "Выйти",
"popup-control-exit-title": "Вы уверены, что хотите закончить демонстрацию??",
"popup-control-yes": "Закончить",
"popup-control-no": "Остаться"
diff --git a/src/App.css b/src/App.css
index e2c85b6..a2f6837 100644
--- a/src/App.css
+++ b/src/App.css
@@ -4,8 +4,6 @@
width: 100%;
}
-
-
.content__container {
height: 100vh;
width: 400px;
@@ -17,13 +15,18 @@
left: 50%;
border-width: 0px 2px;
border-style: solid;
- border-color: #23242A;
-
+ border-color: #23242a;
transform: translate(-50%, -50%);
- /* This is a shorthand of */
-
}
+.popup {
+ width: 100%;
+ background: transparent;
+ padding: 56px;
+ box-sizing: border-box;
+}
+
+
.card-container {
display: flex;
flex-direction: row;
@@ -38,8 +41,7 @@
line-height: 100%;
/* identical to box height, or 38px */
-
- color: #FFFFFF;
+ color: #ffffff;
}
.demos_container {
@@ -47,12 +49,9 @@
border-radius: 16px;
}
-
-
@media screen and (max-width: 1440px) {
.card-title {
margin: 22px 0 40px 0;
-
}
.card-container {
@@ -67,15 +66,12 @@
.card-title {
margin: 42px 0 40px 0;
-
}
}
@media screen and (max-width: 920px) {
-
.card-title {
margin: 36px 0 32px 0;
-
}
.card-title {
@@ -91,6 +87,4 @@
width: 100%;
border: none;
}
-
-
-}
\ No newline at end of file
+}
diff --git a/src/App.tsx b/src/App.tsx
index 23c4ff6..9eb88d8 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,22 +1,25 @@
import "./App.css";
+import 'styles/styles.css'
+
import { useEffect } from "react";
import { Redirect, Route, Switch, useHistory } from "react-router-dom";
-import { Header } from "./components/header/header";
-import { Card } from "./components/demos/Card";
-import { Main } from "./components/Main/Main";
-import { PlayerComponent } from "./components/playerComponent/playerComponent";
-
-import { useAppDispatch, useAppSelector } from "./hooks/redux";
-import { fetchCards } from "./store/reducers/ActionCreator";
-import { cardSlice } from "./store/reducers/cardSlice";
-import { languageSlice } from "./store/reducers/languageSlice";
-import { ICards } from "./models/ICards";
import { useTranslation } from "react-i18next";
import cookies from "js-cookie";
-const App: React.FC = () => {
+import { Header } from "components/shared/Header/Header";
+import { Card } from "components/pages/Main/Card/Card";
+import { PopupComponent } from "components/pages/ConnectPage/PopupComponent/PopupComponent";
+import { PlayerComponent } from "components/pages/Stream/PlayerComponent/PlayerComponent";
+
+import { useAppDispatch, useAppSelector } from "hooks/redux";
+import { fetchCards } from "store/reducers/ActionCreator";
+import { cardSlice } from "store/reducers/cardSlice";
+import { languageSlice } from "store/reducers/languageSlice";
+import { ICards } from "models/ICards";
+
+const App: React.FC = () => {
const dispatch = useAppDispatch();
const history = useHistory();
@@ -29,6 +32,9 @@ const App: React.FC = () => {
dispatch(handleChangeLanguage(cookies.get("i18next")));
}, []);
+ useEffect(() => {
+ window.screen.orientation.lock("landscape");
+ }, []);
const handleCards = (card: ICards) => {
dispatch(handleCurrentCard(card));
history.push("/connect-page");
@@ -48,11 +54,7 @@ const App: React.FC = () => {
{t("demo-title")}
{cards.map((i: ICards) => (
- handleCards(i)}
- key={i._id}
- item={i}
- >
+ handleCards(i)} key={i._id} item={i}>
))}
@@ -60,9 +62,9 @@ const App: React.FC = () => {
{currentCard ? (
-
-
) : (
@@ -70,9 +72,7 @@ const App: React.FC = () => {
)}
-
+
);
diff --git a/src/components/ExitPopup/ExitPopup.css b/src/components/ExitPopup/ExitPopup.css
deleted file mode 100644
index 644a4c5..0000000
--- a/src/components/ExitPopup/ExitPopup.css
+++ /dev/null
@@ -1,60 +0,0 @@
-.exit-popup-container {
- position: absolute;
- display: flex;
- flex-direction: column;
- width: 494px;
- height: 330px;
- box-sizing: border-box;
- border: 1px solid #4F4F4F;
- border-radius: 32px;
- top: calc(50% - 469px / 2);
- left: calc(50% - 494px / 2);
- background-color: #333333;
- color: #FFFFFF;
- padding: 48px;
- /* gap: 24px; */
- justify-content: space-between;
-}
-
-.exit-popup-button-container {
- display: flex;
- flex-direction: column;
- gap: 24px;
-}
-
-.exit-popup-button {
- border-radius: 12px;
- border: none;
- color: white;
- height: 60px;
- font-style: normal;
- font-weight: 600;
- font-size: 16px;
- line-height: 20px;
- cursor: pointer;
-}
-
-.exit-popup-button_confirm {
- background: #567ECE;
- opacity: 1;
-
-}
-
-.exit-popup-button_finish {
- background: #404040;
-}
-
-.exit-popup-button-title {
- width: 366px;
-
-}
-
-.exit-popup-button_confirm:hover {
- opacity: 0.7;
- transition: .3s;
-
-}
-
-.exit-popup-header {
- align-items: normal;
-}
\ No newline at end of file
diff --git a/src/components/ExitPopup/ExitPopup.tsx b/src/components/ExitPopup/ExitPopup.tsx
deleted file mode 100644
index 40ff99e..0000000
--- a/src/components/ExitPopup/ExitPopup.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import "../PopupShare/sharePopup.css";
-import "./ExitPopup.css";
-import { TSidebarPopup } from "../../utils/types";
-import { useTranslation } from "react-i18next";
-
-export const ExitPopup: React.FC
= ({ setClose, onExit }) => {
- const { t } = useTranslation();
-
- return (
-
-
-
- {t("popup-control-exit-title")}
-
-
-
-
-
-
-
-
- );
-};
diff --git a/src/components/LanguagePopup/LanguagePopup.tsx b/src/components/LanguagePopup/LanguagePopup.tsx
deleted file mode 100644
index 4a673bb..0000000
--- a/src/components/LanguagePopup/LanguagePopup.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import "../sidebar/toolbar.css";
-import { languageSlice } from "../../store/reducers/languageSlice";
-import { useAppDispatch, useAppSelector } from "../../hooks/redux";
-
-export const LanguagePopup: React.FC = ({ setOpen }) => {
- const { handleChangeLanguage } = languageSlice.actions;
-
- const buttons = [{ value: "ru" }, { value: "en" }];
- const dispatch = useAppDispatch();
-
- const onChange = (value: string) => {
- dispatch(handleChangeLanguage(value));
- setOpen(false);
- };
-
- const { currentLang } = useAppSelector((state) => state.languageReducer);
-
- return (
-
- {buttons.map((i) => (
-
-
-
- ))}
-
- );
-};
diff --git a/src/components/Navigaton/Vector 106.png b/src/components/Navigaton/Vector 106.png
deleted file mode 100644
index fe8b905..0000000
Binary files a/src/components/Navigaton/Vector 106.png and /dev/null differ
diff --git a/src/components/Navigaton/closeIcon.png b/src/components/Navigaton/closeIcon.png
deleted file mode 100644
index c6696a6..0000000
--- a/src/components/Navigaton/closeIcon.png
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/components/Navigaton/navigation.css b/src/components/Navigaton/navigation.css
deleted file mode 100644
index f0caa77..0000000
--- a/src/components/Navigaton/navigation.css
+++ /dev/null
@@ -1,112 +0,0 @@
-.navigation {
- display: flex;
- flex-direction: column;
- color: #E3DDE5;
- padding: 8px 10px;
- box-sizing: border-box;
- position: fixed;
- top: 66px;
- right: 0;
- bottom: 0;
- background: #0E0E0E;
- width: 100%;
- z-index: 3;
- overflow-y: scroll;
-}
-
-
-
-.nav__close {
- cursor: pointer;
- object-fit: cover;
- width: 24px;
-
-}
-
-.button__container {
-}
-
-
-
-.nav__header {
- display: flex;
- flex-direction: column;
- gap: 42px;
-}
-
-.logo {
- width: 31px;
- height: 50px;
-}
-
-.button__nav_container {
- margin-top: 28px;
- padding: 1px;
- display: flex;
- gap: 20px;
- align-items: center;
-}
-
-.nav__button {
- appearance: none;
- background-color: transparent;
- color: #ebebeb;
- margin: 0;
- text-align: left;
- border: none;
- height: 13px;
- -webkit-appearance: none;
- padding: 0;
-
- cursor: pointer;
-}
-
-.language__container {
- border-bottom: 1px solid transparent;
-
-
-}
-
-.language__container_active {
- box-sizing: border-box;
- height: 20px;
- border-bottom: 1px solid #EBEBEB;
-}
-
-.nav__button_active {
- border-bottom: 1px solid #EBEBEB;
-}
-.nav__title {
- font-style: normal;
- font-weight: 500;
- font-size: 24px;
- line-height: 100%;
- /* identical to box height, or 24px */
- color: #FFFFFF;
- margin: 0;
- text-decoration: none;
-}
-
-.nav__line {
- background-color: #454545;
- width: 100%;
- height: 1px;
- margin-bottom: 40px;
-}
-
-.nav__title_container {
- display: flex;
- gap: 24px;
-
-}
-
-.icon_chevron {
- width: 20px;
-}
-
-.nav__buttons {
- display: flex;
- flex-direction: column;
- gap: 10px;
- margin-bottom: 50px;
-}
\ No newline at end of file
diff --git a/src/components/Navigaton/navigation.tsx b/src/components/Navigaton/navigation.tsx
deleted file mode 100644
index 0d4711c..0000000
--- a/src/components/Navigaton/navigation.tsx
+++ /dev/null
@@ -1,185 +0,0 @@
-import './navigation.css'
-import '../header/header.css'
-import "../../styles/styles.css"
-import write from '../footer/send.svg'
-import phone from '../footer/phone.svg'
-import iconButton from "../../styles/iconButton.svg"
-import { AnimatePresence, motion } from "framer-motion";
-import chevron from '../header/chevronIcon.svg'
-type THeader = {
- menuOpen?: boolean,
- language: string,
- setOpen?: (value: boolean) => void
- changeLanguage: (language: string) => void;
- setOpacity?: (value: boolean) => void;
- text?: any;
-
-}
-
-const container = {
- hidden: {
- translateX: '100%',
- transition: { duration: 0.2, ease: 'easeOut' }
- },
- show: {
- translateX: '0%',
- transition: { duration: 0.2, ease: 'easeIn' },
- },
- exit: {
- translateX: '0%',
- transition: { duration: 0.2, ease: 'easeOut' }
- }
-}
-
-const staggeredVariants = {
- hidden: {
- transition: {
- }
- },
- show: {
- transition: {
- staggerChildren: 0.35,
- staggerDirection: -1,
-
- }
- },
-
- exit: {
- transition: {
- }
- }
-}
-
-const items = {
- hidden: {
- opacity: 0,
- },
- show: {
- opacity: 1,
- transition: { ease: 'easeIn' },
-
- },
-
- exit: {
- opacity: 1,
- }
-}
-
-export const Nav: React.FC = ({ menuOpen, language, changeLanguage, text }) => {
-
- const userLanguage = language === 'RU';
-
- const { cardLarge, cardLarge1, cardSmall, cardSmall1 } = text
-
- const langArray = [{
- value: 'ru-RU',
- name: 'RU'
- },
- {
- value: 'en-EN',
- name: 'EN'
- }]
-
-
- function langActive(lang: string, language: string) {
- if (lang === language) {
- return 'language__container_active'
- }
-
- else {
- return 'language__container'
- }
- }
-
- return (
-
- {menuOpen && (
-
-
-
-
- {langArray.map((lang, i) => (
-
-
-
- ))}
-
-
-
-
-
-
-
-
-

-
-
-
-

-
{cardSmall.caption}
-
-
-
-
-
-

-
-
-
-

-
{cardSmall1.caption}
-
-
-
-
-
info@graff.tech
-
+7 800 770 00 76
-
-
-
{cardLarge.address}
-
{cardLarge.city}
-
- {cardLarge.country}
-
-
-
-
waseem@graff.tech
-
+971 50 938 8902
-
-
- {cardLarge1.country}
-
-
-
- )}
-
-
- )
-}
\ No newline at end of file
diff --git a/src/components/PopupShare/sharePopup.css b/src/components/PopupShare/sharePopup.css
deleted file mode 100644
index a2c16d9..0000000
--- a/src/components/PopupShare/sharePopup.css
+++ /dev/null
@@ -1,141 +0,0 @@
-.share-popup-container {
- position: absolute;
- display: flex;
- flex-direction: column;
- width: 494px;
- height: 469px;
- box-sizing: border-box;
- border: 1px solid #4F4F4F;
- border-radius: 32px;
- top: calc(50% - 469px / 2);
- left: calc(50% - 494px / 2);
- background-color: #333333;
- color: #FFFFFF;
- padding: 48px;
- gap: 24px;
-}
-
-.share-header-popup {
- padding-bottom: 0px;
-}
-
-.border-line {
- width: 80%;
- height: 1px;
- background-color: #404040;
-}
-
-.share-popup-data-container {
- display: flex;
- flex-direction: column;
- gap: 16px;
-}
-
-.share-popup-data-title {
- font-weight: 600;
- font-size: 18px;
- line-height: 22px;
- user-select: none;
-}
-
-.share-popup-data-input {
- background-color: #4F4F4F;
- outline: none;
- width: 100%;
- border: none;
- border-radius: 12px;
- color: #FFFFFF;
- box-sizing: border-box;
-}
-
-.mobile-users-part-header-title {
- display: flex;
- gap: 12px;
- align-items: center;
- font-weight: 400;
- font-size: 22px;
- line-height: 130%;
- -webkit-user-select: none;
- user-select: none;
-}
-
-.mobile-users-part-header-close-button {
- width: 15px;
- height: 15px;
- border: none;
- background-color: transparent;
- background: url(../../images/icons/close.svg) 50% 50% no-repeat;
- background-size: 100% 100%;
- cursor: pointer;
-}
-
-.share-popup-data-input.code {
- height: 76px;
- font-weight: 300;
- font-size: 38px;
- line-height: 46px;
- letter-spacing: 0.3em;
- text-align: center;
- padding: 15px 0;
-}
-
-.share-popup-data-input.href {
- height: 48px;
- padding: 14.5px 16px;
- font-weight: 400;
- font-size: 16px;
- line-height: 19px;
-}
-
-.share-popup-copy-button {
- display: flex;
- box-sizing: border-box;
- width: 176px;
- height: 48px;
- align-items: center;
- justify-content: center;
- border-radius: 12px;
- background-color: #567ECE;
- border: none;
- color: #FFFFFF;
- font-weight: 500;
- font-size: 16px;
- line-height: 20px;
- gap: 4px;
- cursor: pointer;
- transition: .3s;
-}
-
-.share-popup-copy-button:hover {
- opacity: .7;
-}
-
-.share-popup-copy-button.copied {
- background-color: #219653;
- transition: .3s;
-}
-
-.share-popup-copy-button-icon {
- width: 24px;
- height: 24px;
- background: url('copyIcon.svg') 50% 50% no-repeat;
- background-size: 100% 100%;
-}
-
-.show-share-popup-enter {
- opacity: 0;
-}
-
-.show-share-popup-enter-active {
- opacity: 1;
- transition: .3s;
-}
-
-.show-share-popup-exit {
- opacity: 1;
-}
-
-.show-share-popup-exit-active {
- opacity: 0;
- transition: .3s;
-}
\ No newline at end of file
diff --git a/src/components/ProtectedComponent/ProtectedComponent.tsx b/src/components/ProtectedComponent/ProtectedComponent.tsx
deleted file mode 100644
index d361839..0000000
--- a/src/components/ProtectedComponent/ProtectedComponent.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { Route, Redirect } from "react-router-dom";
-
-export const ProtectedComponent: React.FC = ({ children, ...props }) => {
- console.log(props)
- return (
-
- {() => (props.currentCard ? children : )}
-
- )
-}
\ No newline at end of file
diff --git a/src/components/UserList/UserList.tsx b/src/components/UserList/UserList.tsx
deleted file mode 100644
index b683b73..0000000
--- a/src/components/UserList/UserList.tsx
+++ /dev/null
@@ -1,4 +0,0 @@
-
-export const UserList: React.FC = ({ selected, setSelected }) => {
- return <>>;
-};
diff --git a/src/components/demonstration/building.png b/src/components/demonstration/building.png
deleted file mode 100644
index 1a14647..0000000
Binary files a/src/components/demonstration/building.png and /dev/null differ
diff --git a/src/components/demonstration/building1.png b/src/components/demonstration/building1.png
deleted file mode 100644
index 3f125bd..0000000
Binary files a/src/components/demonstration/building1.png and /dev/null differ
diff --git a/src/components/demonstration/building2.png b/src/components/demonstration/building2.png
deleted file mode 100644
index 87fc94a..0000000
Binary files a/src/components/demonstration/building2.png and /dev/null differ
diff --git a/src/components/demonstration/demonstartion.tsx b/src/components/demonstration/demonstartion.tsx
deleted file mode 100644
index c458798..0000000
--- a/src/components/demonstration/demonstartion.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import "../../styles/styles.css"
-import './demonstration.css'
-
-import building from './building.png'
-
-import iconButton from "./iconButton.svg"
-
-
-export const Demostration: React.FC = ({text}) => {
- const { card } = text;
- return (
-
- )
-}
\ No newline at end of file
diff --git a/src/components/demonstration/demonstration.css b/src/components/demonstration/demonstration.css
deleted file mode 100644
index 12220d5..0000000
--- a/src/components/demonstration/demonstration.css
+++ /dev/null
@@ -1,152 +0,0 @@
-.demonstration__title {
- margin: 0 0 44px 0;
- font-style: normal;
- font-weight: 400;
- font-size: 40px;
- line-height: 100%;
- /* or 40px */
- color: #FFFFFF;
-}
-
-.demos-card__container {
- display: flex;
- flex-direction: row;
- gap: 24px;
-
-}
-
-.demo__icon {
- right: 36px;
- top: 36px;
-
-}
-
-.demo-card__header {
- position: relative;
-}
-
-.demos-card {
- background: #1E1E1E;
- border-radius: 24px;
- width: 384px;
-}
-
-.block {
- margin-top: 80px;
- display: flex;
- flex-direction: column;
- gap: 20px;
-}
-
-.demo-card__image {
- width: 100%;
- height: 300px;
- border-radius: 24px;
-
-}
-
-.demo-card__info {
- padding: 32px;
- display: flex;
- flex-direction: column;
- gap: 20px;
-}
-
-.demo-card__icon {
- position: absolute;
- top: 0;
- right: 0;
- width: 16px;
-}
-
-.demo-card__title {
- font-weight: 400;
- font-size: 22px;
- line-height: 130%;
- color: #EBEBEB;
- margin: 0 0 5px 0;
-}
-
-.demo-card__subtitle {
- font-weight: 400;
- font-size: 14px;
- line-height: 130%;
- /* or 18px */
-
-
- /* Landing/White */
-
- color: #EBEBEB;
-
- opacity: 0.5;
-
-}
-
-.demo-card__text {
- font-style: normal;
- font-weight: 400;
- font-size: 16px;
- line-height: 130%;
- /* or 21px */
-
-
- /* Landing/White */
- margin: 0 0 10px 0;
- color: #EBEBEB;
-}
-
-.demo-card__subtext {
- font-weight: 400;
- font-size: 14px;
- line-height: 130%;
- /* or 18px */
- /* Landing/White */
- color: #EBEBEB;
- opacity: 0.5;
-
-}
-
-.demos-card {
- cursor: pointer;
-}
-
-
-.demos-card:hover>div>div>div>img {
- transition: opacity ease-out 0.2s;
- opacity: 1;
-}
-
-.demos__route {
- width: 100%;
-}
-
-
-@media screen and (max-width: 1024px) {
- .block {
- padding: 0 20px 80px;
- }
-
- .demos-card__container {
- flex-direction: column;
- }
-
- .demos-card {
- display: flex;
- flex-direction: row;
- width: 100%;
- }
-
- .demo-card__image {
- width: 200px;
- height: auto;
- }
-}
-
-
-@media screen and (max-width: 639px) {
- .demo__icon {
- right: 19px;
- top: 186px;
-
- }
-}
\ No newline at end of file
diff --git a/src/components/demonstration/iconButton.svg b/src/components/demonstration/iconButton.svg
deleted file mode 100644
index 78c5309..0000000
--- a/src/components/demonstration/iconButton.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/components/header/closeIcon1.svg b/src/components/header/closeIcon1.svg
deleted file mode 100644
index c6696a6..0000000
--- a/src/components/header/closeIcon1.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/src/components/LoadingPopup/LoadingPopup.css b/src/components/pages/ConnectPage/LoadingPopup/LoadingPopup.css
similarity index 84%
rename from src/components/LoadingPopup/LoadingPopup.css
rename to src/components/pages/ConnectPage/LoadingPopup/LoadingPopup.css
index 41db4e5..7c2e16c 100644
--- a/src/components/LoadingPopup/LoadingPopup.css
+++ b/src/components/pages/ConnectPage/LoadingPopup/LoadingPopup.css
@@ -1,8 +1,4 @@
-.loader-container {
- width: 100%;
- background: transparent;
- padding: 56px;
- box-sizing: border-box;
+.popup-type-loader {
display: flex;
flex-direction: column;
gap: 58px;
@@ -14,6 +10,22 @@
flex-direction: column;
}
+.popup-img-container {
+ height: 94px;
+ width: 100%;
+ padding: 0 21px 16px 0;
+ margin-bottom: 32px;
+ box-sizing: border-box;
+
+}
+
+.popup-logo {
+ height: 78px;
+ width: 267px;
+ object-fit: contain;
+
+}
+
.loading-caption {
font-style: normal;
font-weight: 400;
diff --git a/src/components/LoadingPopup/LoadingPopup.tsx b/src/components/pages/ConnectPage/LoadingPopup/LoadingPopup.tsx
similarity index 72%
rename from src/components/LoadingPopup/LoadingPopup.tsx
rename to src/components/pages/ConnectPage/LoadingPopup/LoadingPopup.tsx
index b61da3d..9863462 100644
--- a/src/components/LoadingPopup/LoadingPopup.tsx
+++ b/src/components/pages/ConnectPage/LoadingPopup/LoadingPopup.tsx
@@ -1,7 +1,6 @@
-import "../../styles/styles.css";
import "./LoadingPopup.css";
-import loader from "./loader.svg";
import { useHistory } from "react-router-dom";
+
import { useTranslation } from "react-i18next";
export const LoadingPopup: React.FC = ({ logo }) => {
@@ -9,9 +8,11 @@ export const LoadingPopup: React.FC = ({ logo }) => {
const { t } = useTranslation();
return (
-
+
-

+
+

+
Пожалуйста подождите
diff --git a/src/components/LoadingPopup/loader.svg b/src/components/pages/ConnectPage/LoadingPopup/loader.svg
similarity index 100%
rename from src/components/LoadingPopup/loader.svg
rename to src/components/pages/ConnectPage/LoadingPopup/loader.svg
diff --git a/src/components/Main/main.css b/src/components/pages/ConnectPage/PopupComponent/PopupComponent.css
similarity index 100%
rename from src/components/Main/main.css
rename to src/components/pages/ConnectPage/PopupComponent/PopupComponent.css
diff --git a/src/components/Main/Main.tsx b/src/components/pages/ConnectPage/PopupComponent/PopupComponent.tsx
similarity index 74%
rename from src/components/Main/Main.tsx
rename to src/components/pages/ConnectPage/PopupComponent/PopupComponent.tsx
index c0374f4..6fa1341 100644
--- a/src/components/Main/Main.tsx
+++ b/src/components/pages/ConnectPage/PopupComponent/PopupComponent.tsx
@@ -1,15 +1,16 @@
-import "./main.css";
import { useEffect, useState } from "react";
import { motion, AnimatePresence } from "framer-motion";
-import { PopupConnect } from "../popupConnect/popupConnect";
-import { LoadingPopup } from "../LoadingPopup/LoadingPopup";
-import { popupAnimation } from "../../utils/animationProps";
-import { useAppDispatch, useAppSelector } from "../../hooks/redux";
-import { createSession } from "../../store/reducers/ActionCreator";
-import { sessionSlice } from "../../store/reducers/sessionSlice";
+import { popupAnimation } from "utils/animationProps";
-export const Main: React.FC = () => {
+import { PopupConnect } from "components/pages/ConnectPage/PopupConnect/PopupConnect";
+import { LoadingPopup } from "components/pages/ConnectPage/LoadingPopup/LoadingPopup";
+
+import { useAppDispatch, useAppSelector } from "hooks/redux";
+import { createSession } from "store/reducers/ActionCreator";
+import { sessionSlice } from "store/reducers/sessionSlice";
+
+export const PopupComponent: React.FC = () => {
const dispatch = useAppDispatch();
const { currentCard } = useAppSelector((state) => state.cardReducer);
const [visible, setVisible] = useState({
@@ -64,8 +65,7 @@ export const Main: React.FC = () => {
animate={"show"}
exit={"hidden"}
>
-
+
)}
diff --git a/src/components/pages/ConnectPage/PopupConnect/PopupConnect.css b/src/components/pages/ConnectPage/PopupConnect/PopupConnect.css
new file mode 100644
index 0000000..d876979
--- /dev/null
+++ b/src/components/pages/ConnectPage/PopupConnect/PopupConnect.css
@@ -0,0 +1,44 @@
+
+.popup-img-container {
+ height: 94px;
+ width: 100%;
+ padding: 0 21px 16px 0;
+ margin-bottom: 32px;
+ box-sizing: border-box;
+
+}
+
+.popup-logo {
+ height: 78px;
+ width: 267px;
+ object-fit: contain;
+
+}
+
+.popup-button-container {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+}
+
+.line {
+ height: 1px;
+ background-color: #23242A;
+ width: 100%;
+}
+
+
+
+
+@media screen and (max-width: 1000px) {
+ .popup-img-container {
+ margin-bottom: 16px;
+ }
+
+}
+
+@media screen and (max-width: 640px) {
+ .popup-connect {
+ padding: 16px;
+ }
+ }
\ No newline at end of file
diff --git a/src/components/popupConnect/popupConnect.tsx b/src/components/pages/ConnectPage/PopupConnect/PopupConnect.tsx
similarity index 64%
rename from src/components/popupConnect/popupConnect.tsx
rename to src/components/pages/ConnectPage/PopupConnect/PopupConnect.tsx
index 928f6e8..f00c694 100644
--- a/src/components/popupConnect/popupConnect.tsx
+++ b/src/components/pages/ConnectPage/PopupConnect/PopupConnect.tsx
@@ -1,5 +1,7 @@
+import "./PopupConnect.css";
+
import { useHistory } from "react-router-dom";
-import "./popupConnect.css";
+
import { useTranslation } from "react-i18next";
export const PopupConnect: React.FC
= ({ onConnect, logo, isLoading }) => {
@@ -12,24 +14,25 @@ export const PopupConnect: React.FC = ({ onConnect, logo, isLoading }) => {
history.push(`/stream/${res.payload.session_id}`);
} else {
alert(res.payload);
- history.push('/')
+ history.push("/");
}
});
};
return (
-
-

+
+
+

+
-
-
);
};
diff --git a/src/components/demos/Card.css b/src/components/pages/Main/Card/Card.css
similarity index 100%
rename from src/components/demos/Card.css
rename to src/components/pages/Main/Card/Card.css
diff --git a/src/components/demos/Card.tsx b/src/components/pages/Main/Card/Card.tsx
similarity index 93%
rename from src/components/demos/Card.tsx
rename to src/components/pages/Main/Card/Card.tsx
index d81e2a3..748d60e 100644
--- a/src/components/demos/Card.tsx
+++ b/src/components/pages/Main/Card/Card.tsx
@@ -1,7 +1,7 @@
import "./Card.css";
-import "../../styles/styles.css";
import iconButton from "./iconButton.svg";
-import { useAppSelector } from "../../hooks/redux";
+
+import { useAppSelector } from "hooks/redux";
export const Card: React.FC
= ({ item, onClick }) => {
const { currentLang } = useAppSelector((state) => state.languageReducer);
diff --git a/src/components/demos/building.png b/src/components/pages/Main/Card/building.png
similarity index 100%
rename from src/components/demos/building.png
rename to src/components/pages/Main/Card/building.png
diff --git a/src/components/demos/building1.png b/src/components/pages/Main/Card/building1.png
similarity index 100%
rename from src/components/demos/building1.png
rename to src/components/pages/Main/Card/building1.png
diff --git a/src/components/demos/building2.png b/src/components/pages/Main/Card/building2.png
similarity index 100%
rename from src/components/demos/building2.png
rename to src/components/pages/Main/Card/building2.png
diff --git a/src/components/demos/iconButton.svg b/src/components/pages/Main/Card/iconButton.svg
similarity index 100%
rename from src/components/demos/iconButton.svg
rename to src/components/pages/Main/Card/iconButton.svg
diff --git a/src/components/pages/Stream/ControlButton/ControlButton.tsx b/src/components/pages/Stream/ControlButton/ControlButton.tsx
new file mode 100644
index 0000000..32c68ea
--- /dev/null
+++ b/src/components/pages/Stream/ControlButton/ControlButton.tsx
@@ -0,0 +1,42 @@
+import control from "images/icons/control.svg";
+import controlOff from "images/icons/HandOff.svg";
+
+import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+
+import { Button } from "components/shared/Button/Button";
+
+
+export const ControlButton: React.FC = ({ onClick, isSidebarWide }) => {
+ const { t } = useTranslation();
+
+ const [active, setActive] = useState(false);
+ const [button, setButton] = useState({
+ icon: control,
+ active: "request-control-btn",
+ inactive: "request-control-btn-disable",
+ type: "control",
+ });
+
+ useEffect(() => {
+ setButton({ ...button, icon: active ? control : controlOff });
+ }, [active]);
+
+ function handleClick() {
+ onClick();
+ setActive((prev) => !prev);
+ }
+
+ return (
+
+
+
+ );
+};
diff --git a/src/components/ControlPanel/ControlPanel.tsx b/src/components/pages/Stream/ControlPanel/ControlPanel.tsx
similarity index 69%
rename from src/components/ControlPanel/ControlPanel.tsx
rename to src/components/pages/Stream/ControlPanel/ControlPanel.tsx
index f2c0cf9..2c71a19 100644
--- a/src/components/ControlPanel/ControlPanel.tsx
+++ b/src/components/pages/Stream/ControlPanel/ControlPanel.tsx
@@ -1,9 +1,8 @@
-import { ControlButton } from "../ui/ControlButton/ControlButton";
-import { MicroButton } from "../ui/MicroButton/MicroButton";
-import { ShareButton } from "../ui/ShareButton/ShareButton";
-import { LanguageButton } from "../ui/LanguageButton/LanguageButton";
-import { ExitButton } from "../ui/ExitButton/ExitButton";
-import React, { useState, useEffect } from "react";
+import { ControlButton } from "components/pages/Stream/ControlButton/ControlButton";
+import { MicroButton } from "components/pages/Stream/MicroButton/MicroButton";
+import { ShareButton } from "components/pages/Stream/ShareButton/ShareButton";
+import { LanguageButton } from "components/pages/Stream/LanguageButton/LanguageButton";
+import { ExitButton } from "components/pages/Stream/ExitButton/ExitButton";
export const ControlPanel: React.FC = ({
handleOpenSharePopup,
diff --git a/src/components/ui/ExitButton/ExitButton.tsx b/src/components/pages/Stream/ExitButton/ExitButton.tsx
similarity index 52%
rename from src/components/ui/ExitButton/ExitButton.tsx
rename to src/components/pages/Stream/ExitButton/ExitButton.tsx
index 9a1f176..23e1071 100644
--- a/src/components/ui/ExitButton/ExitButton.tsx
+++ b/src/components/pages/Stream/ExitButton/ExitButton.tsx
@@ -1,7 +1,8 @@
+import exit from "images/icons/exit.svg";
+
import { useState } from "react";
-import { Button } from "../button/button";
-import exit from "../../../images/icons/exit.svg";
-import { THOC } from "../../../utils/types";
+
+import { Button } from "components/shared/Button/Button";
export const ExitButton: React.FC = ({ onClick, isSidebarWide }) => {
const [active, setActive] = useState(false);
@@ -13,14 +14,17 @@ export const ExitButton: React.FC = ({ onClick, isSidebarWide }) => {
};
function handleClick() {
- console.log("click");
setActive((prev) => !prev);
- onClick()
+ onClick();
}
return (
-
-
-
+
+
+
);
-};
\ No newline at end of file
+};
diff --git a/src/components/pages/Stream/FullscreenButton/FullscreenButton.tsx b/src/components/pages/Stream/FullscreenButton/FullscreenButton.tsx
new file mode 100644
index 0000000..4cf517b
--- /dev/null
+++ b/src/components/pages/Stream/FullscreenButton/FullscreenButton.tsx
@@ -0,0 +1,57 @@
+import fullscreen from "images/icons/fullscreen.svg";
+import fullscreenOff from "images/icons/fullscreenOff.svg";
+
+import { useState, useEffect } from "react";
+import { useTranslation } from "react-i18next";
+
+import { Button } from "components/shared/Button/Button";
+
+export const FullscreenButton: React.FC = ({ isSidebarWide }) => {
+
+ const [active, setActive] = useState(Boolean(document.fullscreenElement));
+ const [button, setButton] = useState({
+ icon: fullscreen,
+ inactive: "fullscreen-control-btn",
+ active: "fullscreen-control-btn-active",
+ type: "fullscreen",
+ });
+
+ const { t } = useTranslation();
+
+ const handleClick = () => {
+ setActive(Boolean(document.fullscreenElement));
+ if (!document.fullscreenElement) {
+ document.body.requestFullscreen();
+ } else {
+ document.exitFullscreen();
+ }
+ };
+
+ useEffect(() => {
+ setButton({
+ icon: !active ? fullscreen : fullscreenOff,
+ inactive: "fullscreen-control-btn",
+ active: "fullscreen-control-btn-active",
+ type: "fullscreen",
+ });
+ }, [active]);
+
+ useEffect(() => {
+ const onFullscreenChange = () => {
+ setActive(Boolean(document.fullscreenElement));
+ };
+ document.addEventListener("fullscreenchange", onFullscreenChange);
+ return () =>
+ document.removeEventListener("fullscreenchange", onFullscreenChange);
+ }, []);
+
+ return (
+
+
+
+ );
+};
diff --git a/src/components/ui/LanguageButton/LanguageButton.tsx b/src/components/pages/Stream/LanguageButton/LanguageButton.tsx
similarity index 83%
rename from src/components/ui/LanguageButton/LanguageButton.tsx
rename to src/components/pages/Stream/LanguageButton/LanguageButton.tsx
index e1d7828..6f52e34 100644
--- a/src/components/ui/LanguageButton/LanguageButton.tsx
+++ b/src/components/pages/Stream/LanguageButton/LanguageButton.tsx
@@ -1,8 +1,10 @@
+import microOn from "images/icons/MicroOn.svg";
+
import { useState } from "react";
-import { LanguagePopup } from "../../LanguagePopup/LanguagePopup";
-import { Button } from "../button/button";
-import microOn from "../../../images/icons/MicroOn.svg";
import { AnimatePresence, motion } from "framer-motion";
+
+import { Button } from "components/shared/Button/Button";
+
const container = {
hidden: {
opacity: 0,
@@ -45,7 +47,6 @@ export const LanguageButton: React.FC = ({ hover, setHover, isSidebarWide }
animate={"show"}
exit={"hidden"}
>
-
)}
diff --git a/src/components/pages/Stream/MicroButton/MicroButton.tsx b/src/components/pages/Stream/MicroButton/MicroButton.tsx
new file mode 100644
index 0000000..7d2527a
--- /dev/null
+++ b/src/components/pages/Stream/MicroButton/MicroButton.tsx
@@ -0,0 +1,46 @@
+import microOn from "images/icons/MicroOn.svg";
+import microOff from "images/icons/MicroOff.svg";
+
+import { useState, useEffect } from "react";
+import { useTranslation } from "react-i18next";
+
+import { Button } from "components/shared/Button/Button";
+
+export const MicroButton: React.FC = ({
+ onClick,
+ isMuted,
+ isSidebarWide,
+}) => {
+ const { t } = useTranslation();
+ const [button, setButton] = useState({
+ icon: microOn,
+ active: "mute-control-btn",
+ inactive: "mute-control-btn-disable",
+ type: "microphone",
+ });
+
+ const [active, setActive] = useState(false);
+
+ useEffect(() => {
+ setButton({ ...button, icon: active ? microOn : microOff });
+ }, [active]);
+
+ function handleClick() {
+ onClick();
+ setActive((prev) => !prev);
+ }
+
+ return (
+
+
+
+ );
+};
diff --git a/src/components/playerComponent/playerComponent.tsx b/src/components/pages/Stream/PlayerComponent/PlayerComponent.tsx
similarity index 68%
rename from src/components/playerComponent/playerComponent.tsx
rename to src/components/pages/Stream/PlayerComponent/PlayerComponent.tsx
index d793e89..93088d0 100644
--- a/src/components/playerComponent/playerComponent.tsx
+++ b/src/components/pages/Stream/PlayerComponent/PlayerComponent.tsx
@@ -1,10 +1,12 @@
-import "./playerStyles.css";
-import { useHistory, useParams } from "react-router-dom";
+import "./PlayerStyles.css";
import React, { useEffect } from "react";
-import { Sidebar } from "../sidebar/sidebar";
-import { connectSession } from "../../store/reducers/ActionCreator";
-import { useAppDispatch, useAppSelector } from "../../hooks/redux";
-import { sessionSlice } from "../../store/reducers/sessionSlice";
+import { useHistory, useParams } from "react-router-dom";
+
+import { Sidebar } from "components/pages/Stream/Sidebar/Sidebar";
+
+import { connectSession } from "store/reducers/ActionCreator";
+import { useAppDispatch, useAppSelector } from "hooks/redux";
+import { sessionSlice } from "store/reducers/sessionSlice";
type link = {
id: string;
@@ -14,13 +16,12 @@ export const PlayerComponent: React.FC = ({ closeStream }) => {
const { id } = useParams();
const dispatch = useAppDispatch();
const { cleanErrors } = sessionSlice.actions;
- const history = useHistory()
+ const history = useHistory();
useEffect(() => {
dispatch(connectSession(id)).then((res: any) => {
if (res.error) {
alert(res.payload);
- history.push('/')
}
});
return () => {
@@ -33,11 +34,13 @@ export const PlayerComponent: React.FC = ({ closeStream }) => {
return (
<>
>
diff --git a/src/components/playerComponent/playerStyles.css b/src/components/pages/Stream/PlayerComponent/PlayerStyles.css
similarity index 100%
rename from src/components/playerComponent/playerStyles.css
rename to src/components/pages/Stream/PlayerComponent/PlayerStyles.css
diff --git a/src/components/pages/Stream/PopupExit/PopupExit.css b/src/components/pages/Stream/PopupExit/PopupExit.css
new file mode 100644
index 0000000..6ea796b
--- /dev/null
+++ b/src/components/pages/Stream/PopupExit/PopupExit.css
@@ -0,0 +1,50 @@
+.exit-popup-container {
+ position: absolute;
+ display: flex;
+ flex-direction: column;
+ box-sizing: border-box;
+ background-color: #333333;
+ color: #ffffff;
+ padding: 40px;
+ top: 50%;
+ width: 400px;
+ left: 50%;
+ background: #151619;
+ transform: translate(-50%, -50%);
+
+ /* gap: 24px; */
+ justify-content: space-between;
+}
+
+.exit-popup-button-container {
+ display: flex;
+ flex-direction: column;
+ gap: 24px;
+}
+
+.exit-popup-button {
+ border-radius: 12px;
+ border: none;
+ color: white;
+ height: 60px;
+ font-style: normal;
+ font-weight: 600;
+ font-size: 16px;
+ line-height: 20px;
+ cursor: pointer;
+}
+
+.exit-popup-button_confirm {
+ background: #567ece;
+ opacity: 1;
+}
+
+.exit-popup-button_finish {
+ background: #404040;
+}
+
+
+.exit-popup-button_confirm:hover {
+ opacity: 0.7;
+ transition: 0.3s;
+}
diff --git a/src/components/pages/Stream/PopupExit/PopupExit.tsx b/src/components/pages/Stream/PopupExit/PopupExit.tsx
new file mode 100644
index 0000000..ccd74c0
--- /dev/null
+++ b/src/components/pages/Stream/PopupExit/PopupExit.tsx
@@ -0,0 +1,38 @@
+import "../PopupShare/sharePopup.css";
+import "./PopupExit.css";
+
+import { useTranslation } from "react-i18next";
+
+import { TSidebarPopup } from "utils/types";
+
+export const PopupExit: React.FC = ({ setClose, onExit }) => {
+ const { t } = useTranslation();
+
+ return (
+
+
+
+
+ {t("popup-control-exit-title")}
+
+ setClose()}
+ className="mobile-users-part-header-close-button"
+ >
+
+
+ setClose()} className="button button-primary">
+ {t("popup-control-no")}
+
+ onExit?.()}
+ className=" button button-secondary"
+ >
+ {t("popup-control-yes")}
+
+
+
+
+ );
+};
diff --git a/src/components/PopupShare/PopupShare.tsx b/src/components/pages/Stream/PopupShare/PopupShare.tsx
similarity index 66%
rename from src/components/PopupShare/PopupShare.tsx
rename to src/components/pages/Stream/PopupShare/PopupShare.tsx
index 1641b26..4558cf3 100644
--- a/src/components/PopupShare/PopupShare.tsx
+++ b/src/components/pages/Stream/PopupShare/PopupShare.tsx
@@ -1,5 +1,7 @@
import "./sharePopup.css";
+
import { useState, useEffect } from "react";
+
import { useTranslation } from "react-i18next";
export const PopupShare: React.FC = ({ setClose }) => {
@@ -20,7 +22,7 @@ export const PopupShare: React.FC = ({ setClose }) => {
const { t } = useTranslation();
return (
-
+
{t("popup-control-invite-title")}
@@ -41,12 +43,19 @@ export const PopupShare: React.FC = ({ setClose }) => {
>
-
-
-
- {copy ? t("popup-control-btn-active") : t("popup-control-btn")}
-
-
+ {!copy ? (
+
+
+
+ {copy ? t("popup-control-btn-active") : t("popup-control-btn")}
+
+
+ ) : (
+
+
+ {t("popup-control-btn-active")}
+
+ )}
);
diff --git a/src/components/pages/Stream/PopupShare/copiedIcon.svg b/src/components/pages/Stream/PopupShare/copiedIcon.svg
new file mode 100644
index 0000000..9240505
--- /dev/null
+++ b/src/components/pages/Stream/PopupShare/copiedIcon.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/components/pages/Stream/PopupShare/copyIcon.svg b/src/components/pages/Stream/PopupShare/copyIcon.svg
new file mode 100644
index 0000000..87877ad
--- /dev/null
+++ b/src/components/pages/Stream/PopupShare/copyIcon.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/components/pages/Stream/PopupShare/sharePopup.css b/src/components/pages/Stream/PopupShare/sharePopup.css
new file mode 100644
index 0000000..c2549d4
--- /dev/null
+++ b/src/components/pages/Stream/PopupShare/sharePopup.css
@@ -0,0 +1,162 @@
+.share-popup-container {
+ position: absolute;
+ display: flex;
+ flex-direction: column;
+ top: 50%;
+ left: 50%;
+ background: #151619;
+ transform: translate(-50%, -50%);
+ border-radius: 4px;
+ width: 400px;
+ color: #ffffff;
+ padding: 40px;
+ gap: 32px;
+}
+
+.share-header-popup {
+ padding-bottom: 0px;
+}
+
+.border-line {
+ width: 80%;
+ height: 1px;
+ background-color: #404040;
+}
+
+.share-popup-data-container {
+ display: flex;
+ flex-direction: column;
+ gap: 16px;
+}
+
+.share-popup-data-title {
+ font-weight: 600;
+ font-size: 18px;
+ line-height: 22px;
+ user-select: none;
+}
+
+.share-popup-data-input {
+ background: #23242a;
+
+ border: 1px solid #23242a;
+ border-radius: 4px;
+ outline: none;
+ width: 100%;
+ border: none;
+ color: #ffffff;
+ box-sizing: border-box;
+}
+
+.share-popup-copied-button-icon {
+ width: 24px;
+ height: 24px;
+ background: url("copiedIcon.svg") 50% 50% no-repeat;
+ background-size: 100% 100%;
+}
+
+.button-copy {
+ width: fit-content;
+ display: flex;
+ padding: 12px 24px 12px 16px;
+}
+
+.mobile-users-part-header-title {
+ display: flex;
+ gap: 12px;
+ align-items: flex-start;
+ font-weight: 400;
+ font-style: normal;
+ font-weight: 400;
+ font-size: 24px;
+ line-height: 125%;
+ -webkit-user-select: none;
+ user-select: none;
+}
+
+.popup-position-container {
+ position: relative;
+}
+.mobile-users-part-header-close-button {
+ top: 0;
+ right: 0;
+ position: absolute;
+ width: 15px;
+ height: 15px;
+ border: none;
+ background-color: transparent;
+ background: url(images/icons/close.svg) 50% 50% no-repeat;
+ background-size: 100% 100%;
+ cursor: pointer;
+}
+
+.share-popup-data-input.code {
+ height: 76px;
+ font-weight: 300;
+ font-size: 38px;
+ line-height: 46px;
+ letter-spacing: 0.3em;
+ text-align: center;
+ padding: 15px 0;
+}
+
+.share-popup-data-input.href {
+ height: 48px;
+ padding: 14.5px 16px;
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 19px;
+}
+
+.share-popup-copy-button {
+ display: flex;
+ box-sizing: border-box;
+ width: 176px;
+ height: 48px;
+ align-items: center;
+ justify-content: center;
+ border-radius: 12px;
+ background-color: #567ece;
+ border: none;
+ color: #ffffff;
+ font-weight: 500;
+ font-size: 16px;
+ line-height: 20px;
+ gap: 4px;
+ cursor: pointer;
+ transition: 0.3s;
+}
+
+.share-popup-copy-button:hover {
+ opacity: 0.7;
+}
+
+.share-popup-copy-button.copied {
+ background-color: #219653;
+ transition: 0.3s;
+}
+
+.share-popup-copy-button-icon {
+ width: 24px;
+ height: 24px;
+ background: url("copyIcon.svg") 50% 50% no-repeat;
+ background-size: 100% 100%;
+}
+
+.show-share-popup-enter {
+ opacity: 0;
+}
+
+.show-share-popup-enter-active {
+ opacity: 1;
+ transition: 0.3s;
+}
+
+.show-share-popup-exit {
+ opacity: 1;
+}
+
+.show-share-popup-exit-active {
+ opacity: 0;
+ transition: 0.3s;
+}
diff --git a/src/components/pages/Stream/ShareButton/ShareButton.tsx b/src/components/pages/Stream/ShareButton/ShareButton.tsx
new file mode 100644
index 0000000..8f91ff9
--- /dev/null
+++ b/src/components/pages/Stream/ShareButton/ShareButton.tsx
@@ -0,0 +1,30 @@
+import share from "images/icons/Share.svg";
+
+import { useTranslation } from "react-i18next";
+
+import { Button } from "components/shared/Button/Button";
+
+export const ShareButton: React.FC
= ({ onClick, isSidebarWide }) => {
+ const button = {
+ icon: share,
+ active: "share-contro-btn",
+ inactive: "share-contro-btn",
+ type: "share",
+ };
+
+ const { t } = useTranslation();
+
+ function handleClick() {
+ onClick();
+ }
+
+ return (
+
+
+
+ );
+};
diff --git a/src/components/sidebar/toolbar.css b/src/components/pages/Stream/Sidebar/Sidebar.css
similarity index 90%
rename from src/components/sidebar/toolbar.css
rename to src/components/pages/Stream/Sidebar/Sidebar.css
index a819941..2206512 100644
--- a/src/components/sidebar/toolbar.css
+++ b/src/components/pages/Stream/Sidebar/Sidebar.css
@@ -1,15 +1,12 @@
.toolbar-container {
+ user-select: none;
display: flex;
position: relative;
height: 100vh;
- /* width: 74px; */
- width: 64px;
padding: 0;
margin: 0;
- /* transform: translateX(-60px); */
-
- border-right: 1px solid #4f4f4f;
- background: #333333;
+ padding: 10px;
+ background: #1c1d21;
box-sizing: border-box;
}
@@ -18,7 +15,6 @@
left: 50%;
transform: translate(-50%, -50%);
position: absolute;
-
}
.toolbar-confirm-block {
@@ -29,14 +25,13 @@
.mobile-users-part-header {
display: flex;
justify-content: space-between;
- align-items: center;
- padding-bottom: 24px;
+ align-items: flex-start;
+ padding-bottom: 32px;
}
.toolbar-field {
- background: #333333;
- overflow: hidden;
- padding: 14px 15px;
+ width: 100%;
+ background: transparent;
box-sizing: border-box;
height: 100%;
display: flex;
@@ -46,11 +41,23 @@
}
.toolbar-field-part {
+ width: 100%;
display: flex;
flex-direction: column;
+ position: relative;
gap: 10px;
}
+.toolbar-button-caption {
+ color: #c5c7ce;
+ font-style: normal;
+ font-weight: 400;
+ font-size: 14px;
+ line-height: 140%;
+ white-space: nowrap;
+ position: relative;
+}
+
.toolbar-button-container {
display: flex;
flex-direction: column;
@@ -98,12 +105,13 @@
}
.toolbar-button-area {
+ cursor: pointer;
align-items: center;
position: relative;
display: flex;
gap: 8px;
- /* background-color: #333333; */
- /* border-top-left-radius: 50px solid #4f4f4f; */
+ padding: 8px;
+ background-color: transparent;
}
.toolbar-button-area.hidden {
@@ -142,17 +150,12 @@
}
.toolbar-button {
- background-color: #4f4f4f;
+ background: transparent;
position: relative;
- width: 40px;
- height: 40px;
+ width: 24px;
+ height: 24px;
border: none;
- border-radius: 50px;
- background-size: 100% 100%;
cursor: pointer;
- flex-shrink: 0;
- display: flex;
- align-items: center;
color: #ffffff;
font-weight: 400;
font-size: 14px;
@@ -165,28 +168,9 @@
background: #567ece;
}
-.user-icon {
- position: relative;
- width: 40px;
- height: 40px;
- border: none;
- border-radius: 50px;
- background-size: 100% 100%;
- background-color: #4f4f4f;
- cursor: pointer;
- flex-shrink: 0;
- display: flex;
- align-items: center;
- color: #ffffff;
- font-weight: 400;
- font-size: 14px;
- justify-content: center;
- line-height: 17px;
- padding: 0px;
-}
.toolbar-button_exit {
- background: #eb5757;
+ background: transparent;
}
.language-caption {
@@ -196,8 +180,8 @@
}
.toolbar-icon {
- object-fit: cover;
- width: 45%;
+ width: 24px;
+ height: 100%;
}
.empty__block {
@@ -244,7 +228,7 @@
margin-left: 2px;
opacity: 0;
position: absolute;
- left: 100%;
+ left: 126%;
height: 24px;
top: calc(50% - 12px);
/* background-color: #27AE60; */
@@ -256,15 +240,15 @@
box-sizing: content-box;
}
+
.toolbar-button-description-rectangle {
/* display: inline-block; */
white-space: nowrap;
/* flex-shrink: 0; */
- background-color: #333333;
+ background: #23242a;
height: 24px;
border-top-right-radius: 50px;
border-bottom-right-radius: 50px;
- border: 1px solid #4f4f4f;
border-left: none;
color: white;
display: flex;
@@ -311,9 +295,7 @@
background-color: #4f4f4f;
}
-.toolbar-button.user {
- background: url("icons/userIcon.svg") 50% 50% no-repeat;
-}
+
.toolbar-button.admin {
background-color: #2f80ed;
@@ -594,13 +576,8 @@
@media screen and (max-height: 700px) {
.toolbar-field {
- padding: 20px 14px;
}
- .toolbar-button {
- width: 44px;
- height: 44px;
- }
.toolbar-button:hover {
opacity: 1;
diff --git a/src/components/sidebar/sidebar.tsx b/src/components/pages/Stream/Sidebar/Sidebar.tsx
similarity index 51%
rename from src/components/sidebar/sidebar.tsx
rename to src/components/pages/Stream/Sidebar/Sidebar.tsx
index e94147d..7526f17 100644
--- a/src/components/sidebar/sidebar.tsx
+++ b/src/components/pages/Stream/Sidebar/Sidebar.tsx
@@ -1,14 +1,20 @@
-import "./toolbar.css";
+import "./Sidebar.css";
import React, { useState, useEffect } from "react";
-import { UserList } from "../UserList/UserList";
-import { FullscreenButton } from "../ui/FullscreenButton/FullscreenButton";
-import { PopupShare } from "../PopupShare/PopupShare";
-import { ExitPopup } from "../ExitPopup/ExitPopup";
-import { ControlPanel } from "../ControlPanel/ControlPanel";
import { AnimatePresence, motion } from "framer-motion";
-import { sidebarVariants, popupAnimation, wideSidebarVariants } from "../../utils/animationProps";
-import { WideSidebarButton } from "../ui/WideSidebarButton/WideSidebarButton";
+import { UserList } from "components/pages/Stream/UserList/UserList";
+import { FullscreenButton } from "components/pages/Stream/FullscreenButton/FullscreenButton";
+import { PopupShare } from "components/pages/Stream/PopupShare/PopupShare";
+import { PopupExit } from "components/pages/Stream/PopupExit/PopupExit";
+import { ControlPanel } from "../ControlPanel/ControlPanel";
+import { WideSidebarButton } from "components/pages/Stream/WideSidebarButton/WideSidebarButton";
+
+import {
+ sidebarVariants,
+ popupAnimation,
+ wideSidebarVariants,
+ wideSidebarAdminVariants,
+} from "utils/animationProps";
export const Sidebar: React.FC = ({ closeStream }) => {
const [open, setOpen] = useState(false);
@@ -17,8 +23,10 @@ export const Sidebar: React.FC = ({ closeStream }) => {
popup2: false,
});
+ const isAdmin = true;
+
const [selected, setSelected] = useState(false);
- const [wideSidebar, setWideSidebar] = useState(false)
+ const [wideSidebar, setWideSidebar] = useState(false);
const [isMuted, setMuted] = useState(true);
@@ -50,11 +58,9 @@ export const Sidebar: React.FC = ({ closeStream }) => {
function closeSideBar() {
setSelected(false);
setOpen(false);
- setWideSidebar(false)
+ setWideSidebar(false);
}
-
-
useEffect(() => () => unmountComponent(), []);
function unmountComponent() {
@@ -65,24 +71,42 @@ export const Sidebar: React.FC = ({ closeStream }) => {
});
}
- console.log(wideSidebar, 'wide', open, 'open')
+ const setAnimation = () => {
+ if (isAdmin) return wideSidebarAdminVariants;
+ else {
+ return wideSidebarVariants;
+ }
+ };
return (
-
+ <>
-
+
-
setWideSidebar(true)} className="toolbar-field-part">
-
+ setWideSidebar(true)}
+ className="toolbar-field-part"
+ >
+
= ({ closeStream }) => {
handleOpenExitPopup={handleOpenExitPopup}
>
- {!open &&
setOpen(true)} className="toolbar-open-button">
-
- }
+
+ {!open && (
+ setOpen(true)}
+ className="toolbar-open-button"
+ >
+
+
+ )}
+
{popup.popup1 && (
@@ -117,13 +152,13 @@ export const Sidebar: React.FC = ({ closeStream }) => {
animate={"show"}
exit={"hidden"}
>
-
+ >
)}
-
+ >
);
};
diff --git a/src/components/sidebar/closeToolbarIcon.svg b/src/components/pages/Stream/Sidebar/closeToolbarIcon.svg
similarity index 100%
rename from src/components/sidebar/closeToolbarIcon.svg
rename to src/components/pages/Stream/Sidebar/closeToolbarIcon.svg
diff --git a/src/components/sidebar/icons/adminIcon.svg b/src/components/pages/Stream/Sidebar/icons/adminIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/adminIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/adminIcon.svg
diff --git a/src/components/sidebar/icons/closeFullscreenIcon.svg b/src/components/pages/Stream/Sidebar/icons/closeFullscreenIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/closeFullscreenIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/closeFullscreenIcon.svg
diff --git a/src/components/sidebar/icons/closeIcon.svg b/src/components/pages/Stream/Sidebar/icons/closeIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/closeIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/closeIcon.svg
diff --git a/src/components/sidebar/icons/constrolOffIcon.svg b/src/components/pages/Stream/Sidebar/icons/constrolOffIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/constrolOffIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/constrolOffIcon.svg
diff --git a/src/components/sidebar/icons/constrolOnIcon.svg b/src/components/pages/Stream/Sidebar/icons/constrolOnIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/constrolOnIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/constrolOnIcon.svg
diff --git a/src/components/sidebar/icons/controlDisabledIcon.svg b/src/components/pages/Stream/Sidebar/icons/controlDisabledIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/controlDisabledIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/controlDisabledIcon.svg
diff --git a/src/components/PopupShare/copyIcon.svg b/src/components/pages/Stream/Sidebar/icons/copyIcon.svg
similarity index 100%
rename from src/components/PopupShare/copyIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/copyIcon.svg
diff --git a/src/components/sidebar/icons/descriptTiriangleIcon.svg b/src/components/pages/Stream/Sidebar/icons/descriptTiriangleIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/descriptTiriangleIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/descriptTiriangleIcon.svg
diff --git a/src/components/sidebar/icons/descriptionButtonIcon.svg b/src/components/pages/Stream/Sidebar/icons/descriptionButtonIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/descriptionButtonIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/descriptionButtonIcon.svg
diff --git a/src/components/sidebar/icons/disableFullscreenIcon.svg b/src/components/pages/Stream/Sidebar/icons/disableFullscreenIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/disableFullscreenIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/disableFullscreenIcon.svg
diff --git a/src/components/sidebar/icons/enIcon.svg b/src/components/pages/Stream/Sidebar/icons/enIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/enIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/enIcon.svg
diff --git a/src/components/sidebar/icons/exitIcon.svg b/src/components/pages/Stream/Sidebar/icons/exitIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/exitIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/exitIcon.svg
diff --git a/src/components/sidebar/icons/guestIcon.svg b/src/components/pages/Stream/Sidebar/icons/guestIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/guestIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/guestIcon.svg
diff --git a/src/components/sidebar/icons/handIcon.svg b/src/components/pages/Stream/Sidebar/icons/handIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/handIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/handIcon.svg
diff --git a/src/components/sidebar/icons/microDisabledIcon.svg b/src/components/pages/Stream/Sidebar/icons/microDisabledIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/microDisabledIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/microDisabledIcon.svg
diff --git a/src/components/sidebar/icons/microOffIcon.svg b/src/components/pages/Stream/Sidebar/icons/microOffIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/microOffIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/microOffIcon.svg
diff --git a/src/components/sidebar/icons/microOnIcon.svg b/src/components/pages/Stream/Sidebar/icons/microOnIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/microOnIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/microOnIcon.svg
diff --git a/src/components/sidebar/icons/newCaptTriangleIcon.svg b/src/components/pages/Stream/Sidebar/icons/newCaptTriangleIcon.svg
similarity index 93%
rename from src/components/sidebar/icons/newCaptTriangleIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/newCaptTriangleIcon.svg
index ace65c4..f89b536 100644
--- a/src/components/sidebar/icons/newCaptTriangleIcon.svg
+++ b/src/components/pages/Stream/Sidebar/icons/newCaptTriangleIcon.svg
@@ -3,6 +3,6 @@
-
+
diff --git a/src/components/sidebar/icons/openFullscreenIcon.svg b/src/components/pages/Stream/Sidebar/icons/openFullscreenIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/openFullscreenIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/openFullscreenIcon.svg
diff --git a/src/components/sidebar/icons/othertIcon.svg b/src/components/pages/Stream/Sidebar/icons/othertIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/othertIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/othertIcon.svg
diff --git a/src/components/sidebar/icons/ruIcon.svg b/src/components/pages/Stream/Sidebar/icons/ruIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/ruIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/ruIcon.svg
diff --git a/src/components/sidebar/icons/selfIcon.svg b/src/components/pages/Stream/Sidebar/icons/selfIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/selfIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/selfIcon.svg
diff --git a/src/components/sidebar/icons/shareIcon.svg b/src/components/pages/Stream/Sidebar/icons/shareIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/shareIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/shareIcon.svg
diff --git a/src/components/sidebar/icons/soundOffIcon.svg b/src/components/pages/Stream/Sidebar/icons/soundOffIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/soundOffIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/soundOffIcon.svg
diff --git a/src/components/sidebar/icons/soundOnIcon.svg b/src/components/pages/Stream/Sidebar/icons/soundOnIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/soundOnIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/soundOnIcon.svg
diff --git a/src/components/sidebar/icons/userIcon.svg b/src/components/pages/Stream/Sidebar/icons/userIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/userIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/userIcon.svg
diff --git a/src/components/sidebar/icons/usersIcon.svg b/src/components/pages/Stream/Sidebar/icons/usersIcon.svg
similarity index 100%
rename from src/components/sidebar/icons/usersIcon.svg
rename to src/components/pages/Stream/Sidebar/icons/usersIcon.svg
diff --git a/src/components/sidebar/openToolbarBackIcon.svg b/src/components/pages/Stream/Sidebar/openToolbarBackIcon.svg
similarity index 71%
rename from src/components/sidebar/openToolbarBackIcon.svg
rename to src/components/pages/Stream/Sidebar/openToolbarBackIcon.svg
index ee6d202..3fe80e4 100644
--- a/src/components/sidebar/openToolbarBackIcon.svg
+++ b/src/components/pages/Stream/Sidebar/openToolbarBackIcon.svg
@@ -1,7 +1,7 @@
diff --git a/src/components/sidebar/openToolbarBorderHoverIcon.svg b/src/components/pages/Stream/Sidebar/openToolbarBorderHoverIcon.svg
similarity index 100%
rename from src/components/sidebar/openToolbarBorderHoverIcon.svg
rename to src/components/pages/Stream/Sidebar/openToolbarBorderHoverIcon.svg
diff --git a/src/components/sidebar/openToolbarBorderIcon.svg b/src/components/pages/Stream/Sidebar/openToolbarBorderIcon.svg
similarity index 100%
rename from src/components/sidebar/openToolbarBorderIcon.svg
rename to src/components/pages/Stream/Sidebar/openToolbarBorderIcon.svg
diff --git a/src/components/sidebar/openToolbarIcon.svg b/src/components/pages/Stream/Sidebar/openToolbarIcon.svg
similarity index 100%
rename from src/components/sidebar/openToolbarIcon.svg
rename to src/components/pages/Stream/Sidebar/openToolbarIcon.svg
diff --git a/src/components/sidebar/pointerIcon.svg b/src/components/pages/Stream/Sidebar/pointerIcon.svg
similarity index 100%
rename from src/components/sidebar/pointerIcon.svg
rename to src/components/pages/Stream/Sidebar/pointerIcon.svg
diff --git a/src/components/pages/Stream/User/User.css b/src/components/pages/Stream/User/User.css
new file mode 100644
index 0000000..5bf1892
--- /dev/null
+++ b/src/components/pages/Stream/User/User.css
@@ -0,0 +1,78 @@
+.user-container {
+ user-select: none;
+ cursor: pointer;
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+}
+
+.user {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+}
+
+.user-name {
+ font-style: normal;
+ font-weight: 400;
+ font-size: 14px;
+ line-height: 140%;
+ color: #c5c7ce;
+ white-space: nowrap;
+}
+
+.icon-container {
+ align-items: center;
+ display: flex;
+ gap: 3px;
+ flex-direction: column;
+}
+
+.you-caption {
+ font-weight: 400;
+ font-size: 12px;
+ line-height: 130%;
+ /* identical to box height, or 16px */
+
+ /* Button_3 */
+
+ color: #73788c;
+}
+
+.user-wrapper {
+ position: relative;
+}
+
+.user-wrapper:nth-child(1) {
+ margin-top: 10px;
+}
+
+.user-button-container {
+ display: flex;
+ gap: 8px;
+ padding: 8px;
+}
+
+.icon-container {
+ cursor: pointer;
+ padding: 8px;
+}
+
+.control-circle {
+ width: 8px;
+ height: 8px;
+ background-color: #798fff;
+ border-radius: 50%;
+ margin-bottom: 5px;
+}
+
+.user-control-caption {
+ display: flex;
+ gap: 4px;
+ font-weight: 400;
+ font-size: 10px;
+ line-height: 130%;
+ align-items: center;
+ color: #798fff;
+}
diff --git a/src/components/pages/Stream/User/User.tsx b/src/components/pages/Stream/User/User.tsx
new file mode 100644
index 0000000..216ff9a
--- /dev/null
+++ b/src/components/pages/Stream/User/User.tsx
@@ -0,0 +1,155 @@
+import "./User.css";
+
+import { AnimatePresence, motion } from "framer-motion";
+import { useState, useEffect } from "react";
+
+import userPic from "images/icons/Person.svg";
+import chevronDown from "images/icons/ChevronDown.svg";
+import control from "images/icons/control.svg";
+import controlOff from "images/icons/HandOff.svg";
+import microOn from "images/icons/MicroOn.svg";
+import microOff from "images/icons/MicroOff.svg";
+
+import {
+ popupAnimation,
+ userMenuAnimation,
+ animationButton,
+ transition,
+ iconAnimation,
+} from "utils/animationProps";
+
+export const User: React.FC = ({
+ isAdmin,
+ isSidebarWide,
+ closeSidebar,
+}) => {
+ const [hover, setHover] = useState(false);
+ const [expand, setExpand] = useState(false);
+ const [mute, setMute] = useState(true);
+ const [isControl, setControl] = useState(false);
+
+ useEffect(() => {
+ setExpand(false);
+ }, [closeSidebar]);
+
+ const expandMenu = () => {
+ if (isSidebarWide) {
+ if (isAdmin) setExpand((prev) => !prev);
+ }
+ };
+
+ return (
+ <>
+
+
+
+
setHover(true)}
+ onHoverEnd={() => setHover(false)}
+ className="icon-container"
+ >
+
+
+
+ Пользователь
+
+
+ {isSidebarWide && (
+
+ {!isControl && (
+
+
+ Управление
+
+ )}
+
+ )}
+ {isAdmin && (
+
+
+
+ )}
+
+ {expand && (
+
+
+ setControl((prev) => !prev)}
+ className="button button-secondary"
+ >
+

+
+ {isControl ? "Передать управление" : "Вернуть управление"}
+
+
+ setMute((prev) => !prev)}
+ className="button button-teritary"
+ >
+

+
+
+
+ )}
+
+
+ {!isSidebarWide && hover && (
+
+
+
+ Пользователь
+
+
+ )}
+
+ >
+ );
+};
diff --git a/src/components/pages/Stream/UserList/UserList.tsx b/src/components/pages/Stream/UserList/UserList.tsx
new file mode 100644
index 0000000..de69e58
--- /dev/null
+++ b/src/components/pages/Stream/UserList/UserList.tsx
@@ -0,0 +1,10 @@
+import { User } from "components/pages/Stream/User/User";
+
+export const UserList: React.FC = ({ isSidebarWide, isAdmin, closeSidebar }) => {
+ return (
+
+ );
+};
diff --git a/src/components/pages/Stream/WideSidebarButton/Menu.svg b/src/components/pages/Stream/WideSidebarButton/Menu.svg
new file mode 100644
index 0000000..e11606a
--- /dev/null
+++ b/src/components/pages/Stream/WideSidebarButton/Menu.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/components/pages/Stream/WideSidebarButton/WideSidebarButton.tsx b/src/components/pages/Stream/WideSidebarButton/WideSidebarButton.tsx
new file mode 100644
index 0000000..fd18d42
--- /dev/null
+++ b/src/components/pages/Stream/WideSidebarButton/WideSidebarButton.tsx
@@ -0,0 +1,38 @@
+import wideButton from "./Menu.svg";
+
+import { useState } from "react";
+import { useTranslation } from "react-i18next";
+
+import { Button } from "components/shared/Button/Button";
+
+export const WideSidebarButton: React.FC = ({ close, isSidebarWide }) => {
+ const { t } = useTranslation();
+ const [active, setActive] = useState(false);
+ const [button, setButton] = useState({
+ icon: wideButton,
+ inactive: "Скрыть меню",
+ active: "Скрыть меню",
+ type: "fullscreen",
+ noHover: true,
+ });
+
+ const handleClick = () => {
+ close();
+ setActive((prev) => !prev);
+ };
+
+ return (
+ e.target.blur()}
+ onClick={handleClick}
+ className="toolbar-button-area"
+ >
+
+
+ );
+};
diff --git a/src/components/popupConnect/popupConnect.css b/src/components/popupConnect/popupConnect.css
deleted file mode 100644
index 8ea385a..0000000
--- a/src/components/popupConnect/popupConnect.css
+++ /dev/null
@@ -1,63 +0,0 @@
-.popup-connect {
- width: 100%;
-
- background: transparent;
-
- padding: 56px;
- box-sizing: border-box;
-
-}
-
-.popup-logo {
- height: 94px;
- width: 100%;
- margin-bottom: 32px;
- object-fit: contain;
-
-}
-
-.popup-button-container {
- display: flex;
- flex-direction: column;
- gap: 16px;
-}
-
-.line {
- height: 1px;
- background-color: #23242A;
- width: 100%;
-}
-
-
-.button-connect {
- color: #FFFFFF;
- font-style: normal;
- font-weight: 400;
- font-size: 16px;
- line-height: 150%;
- height: 48px;
- background: linear-gradient(180deg, #BC75FF 0%, #798FFF 100%);
- border-radius: 4px;
- padding: 12px 24px;
-}
-
-.button-back {
- padding: 8px 16px;
- border-radius: 4px;
-
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- font-size: 12px;
- line-height: 130%;
- color: #C5C7CE;
- background: #1C1D21;
- border-radius: 4px;
- height: 32px;
-}
-
-@media screen and (max-width: 640px) {
- .popup-connect {
- padding: 16px;
- }
- }
\ No newline at end of file
diff --git a/src/components/popupUser/popupUser.css b/src/components/popupUser/popupUser.css
deleted file mode 100644
index 4327071..0000000
--- a/src/components/popupUser/popupUser.css
+++ /dev/null
@@ -1,76 +0,0 @@
-.popup__user {
- position: relative;
- width: 494px;
- background: #262626;
- border-radius: 32px;
- padding: 48px;
- box-sizing: border-box;
-}
-
-.popup__user_back {
- position: absolute;
- width: 16px;
- height: 16px;
- cursor: pointer;
-}
-
-.popup__user_content {
- display: flex;
- flex-direction: column;
- gap: 24px;
- align-items: center;
-}
-
-.popup__user_picture {
- background: #219653;
- width: 198px;
- height: 198px;
- border-radius: 172px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
-}
-
-.popup__user_name {
- font-style: normal;
- font-weight: 400;
- font-size: 38px;
- line-height: 130%;
- /* or 49px */
- text-align: center;
- /* App/White */
- color: #ffffff;
- border-bottom: 1px solid #FFFFFF;
- margin: 0 0 42px;
- width: 57%;
-}
-
-.popup__button {
- display: none;
-}
-
-
-@media screen and (max-width: 639px) {
- .popup__user {
- width: 100%;
- border-radius: 0px;
- height: 100%;
- padding: 32px 10px 67px;
- height: 100vh;
-
- }
- .popup__button {
- display: flex;
- flex-direction: column;
- gap: 16px;
- }
-
- .popup__user_name {
- margin: 0 0 54px;
- }
-
- .popup__user_back {
- display: none;
- }
-}
\ No newline at end of file
diff --git a/src/components/popupUser/popupUser.tsx b/src/components/popupUser/popupUser.tsx
deleted file mode 100644
index 19b81c4..0000000
--- a/src/components/popupUser/popupUser.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import "../../styles/styles.css";
-import "./popupUser.css";
-import person from "../../images/Person.png";
-import buttonBack from "../../images/backButton.svg";
-
-export const PopupUser: React.FC = ({}) => {
- return (
-
-

-
-
-

-
-
Константин Коренецкий
-
Продолжить
-
-
-
- Выбор способа демонстрации{" "}
-
-
-
-
- );
-};
diff --git a/src/components/popupUserControl/popupUserControl.tsx b/src/components/popupUserControl/popupUserControl.tsx
deleted file mode 100644
index d8a5851..0000000
--- a/src/components/popupUserControl/popupUserControl.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import "../sidebar/toolbar.css";
-import { useState } from "react";
-import { TUserControl } from "../../utils/types";
-import { MicroButton } from "../ui/MicroButton/MicroButton";
-import iconUser from "../../images/icons/user.svg";
-import { PopupUserControlButton } from "../popupUserControlButton/PopupUserControlButton";
-
-export const PopupUserControl: React.FC = ({
- user,
- isAdmin,
- sendControlRequest,
- localUser,
- handleControl,
- setNotification,
- handleReturnControl,
- setMuted,
- isMuted,
-}) => {
- const handleMuteUser = () => {
- const element = document.getElementById(user.id) as HTMLAudioElement;
- if (isMuted) {
- console.log(element);
- element.volume = 1;
- setMuted(false);
- } else {
- element.volume = 0;
- setMuted(true);
- }
- };
-
- return (
-
-
-

-
-
-
-
- );
-};
diff --git a/src/components/popupUserControlButton/PopupUserControlButton.tsx b/src/components/popupUserControlButton/PopupUserControlButton.tsx
deleted file mode 100644
index a63f282..0000000
--- a/src/components/popupUserControlButton/PopupUserControlButton.tsx
+++ /dev/null
@@ -1,126 +0,0 @@
-import control from "../../images/icons/control.svg";
-import "../sidebar/toolbar.css";
-import { useState } from "react";
-import controlOff from "../../images/icons/control.svg";
-
-export const PopupUserControlButton: React.FC = ({
- isAdmin,
- user,
- sendControlRequest,
- localUser,
- handleControl,
- setNotification,
- handleReturnControl,
-}) => {
- const [show, setShow] = useState(false);
- const isUserAdmin = isAdmin(user);
-
- function onChangeControl() {
- handleControl(user.id);
- setShow(false);
- setNotification(false);
- }
-
- return (
-
- {!show ? (
- <>
- {" "}
- {isUserAdmin ? (
- <>
- {user.control ? (
-
handleReturnControl()}
- className="control-button"
- >
-
-
- Вернуть управление
-
-
- ) : (
-
setShow((prev) => !prev)}
- className="control-button"
- >
-
-
- Передать управление
-
-
- )}
- >
- ) : (
- <>
- {user.admin ? (
- <>
- {!user.control ? (
-
handleReturnControl()}
- className="control-button"
- >
-
-
- Вернуть управление
-
-
- ) : (
-
sendControlRequest(localUser)}
- className="control-button"
- >
-
-
- Запросить управление
-
-
- )}
- >
- ) : (
-
- )}
- >
- )}
- >
- ) : (
-
- {" "}
-
setShow((prev) => !prev)}
- className="toolbar-button no medium"
- >
-
-

-
Нет
-
-
-
-
-

-
Да
-
-
-
- )}
-
- );
-};
diff --git a/src/components/shared/Button/Button.tsx b/src/components/shared/Button/Button.tsx
new file mode 100644
index 0000000..a6a5dda
--- /dev/null
+++ b/src/components/shared/Button/Button.tsx
@@ -0,0 +1,64 @@
+import "components/pages/Stream/Sidebar/Sidebar.css";
+import { useState } from "react";
+
+import { AnimatePresence, motion } from "framer-motion";
+import { useTranslation } from "react-i18next";
+
+import { animationButton } from "utils/animationProps";
+import { useAppSelector } from "hooks/redux";
+
+export const Button: React.FC = ({ button, active, isSidebarWide }) => {
+
+ const [hover, setHover] = useState(false);
+ const { currentLang } = useAppSelector((state) => state.languageReducer);
+
+ const typeButton = button.type !== "fullscreen" && button.type !== "language";
+
+ const { t } = useTranslation();
+
+ return (
+ <>
+ setHover(true)}
+ onHoverEnd={() => setHover(false)}
+ className={
+ button.type === "exit"
+ ? "toolbar-button_exit toolbar-button"
+ : "toolbar-button"
+ }
+ >
+ {button.type === "language" ? (
+ {currentLang.toUpperCase()}
+ ) : (
+
+ )}
+
+
+ {active ? t(button.active) : t(button.inactive)}
+
+ {!button.noHover && (
+
+ {!isSidebarWide && hover && (
+
+
+
+ {active ? t(button.active) : t(button.inactive)}
+
+
+ )}
+
+ )}
+ >
+ );
+};
diff --git a/src/components/footer/footer.css b/src/components/shared/Footer/footer.css
similarity index 100%
rename from src/components/footer/footer.css
rename to src/components/shared/Footer/footer.css
diff --git a/src/components/footer/footer.tsx b/src/components/shared/Footer/footer.tsx
similarity index 100%
rename from src/components/footer/footer.tsx
rename to src/components/shared/Footer/footer.tsx
diff --git a/src/components/footer/logo.svg b/src/components/shared/Footer/logo.svg
similarity index 100%
rename from src/components/footer/logo.svg
rename to src/components/shared/Footer/logo.svg
diff --git a/src/components/footer/logoIcon.svg b/src/components/shared/Footer/logoIcon.svg
similarity index 100%
rename from src/components/footer/logoIcon.svg
rename to src/components/shared/Footer/logoIcon.svg
diff --git a/src/components/footer/phone.svg b/src/components/shared/Footer/phone.svg
similarity index 100%
rename from src/components/footer/phone.svg
rename to src/components/shared/Footer/phone.svg
diff --git a/src/components/footer/send.svg b/src/components/shared/Footer/send.svg
similarity index 100%
rename from src/components/footer/send.svg
rename to src/components/shared/Footer/send.svg
diff --git a/src/components/header/header.css b/src/components/shared/Header/Header.css
similarity index 100%
rename from src/components/header/header.css
rename to src/components/shared/Header/Header.css
diff --git a/src/components/header/header.tsx b/src/components/shared/Header/Header.tsx
similarity index 94%
rename from src/components/header/header.tsx
rename to src/components/shared/Header/Header.tsx
index 7c5fa6f..f392777 100644
--- a/src/components/header/header.tsx
+++ b/src/components/shared/Header/Header.tsx
@@ -1,11 +1,14 @@
-import React, { CSSProperties, useState } from "react";
+import "./Header.css";
+import "styles/styles.css";
+
import logo from "./logoIcon.svg";
import chevron from "./chevronIcon.svg";
-import "./header.css";
-import "../../styles/styles.css";
+
+import React, { CSSProperties, useState } from "react";
import { useLocation } from "react-router-dom";
-import { useAppSelector, useAppDispatch } from "../../hooks/redux";
-import { languageSlice } from "../../store/reducers/languageSlice";
+
+import { useAppSelector, useAppDispatch } from "hooks/redux";
+import { languageSlice } from "store/reducers/languageSlice";
export type THeader = {
language: string;
diff --git a/src/components/header/chevronIcon.svg b/src/components/shared/Header/chevronIcon.svg
similarity index 100%
rename from src/components/header/chevronIcon.svg
rename to src/components/shared/Header/chevronIcon.svg
diff --git a/src/components/Navigaton/closeIcon1.svg b/src/components/shared/Header/closeIcon1.svg
similarity index 100%
rename from src/components/Navigaton/closeIcon1.svg
rename to src/components/shared/Header/closeIcon1.svg
diff --git a/src/components/header/logoIcon.svg b/src/components/shared/Header/logoIcon.svg
similarity index 100%
rename from src/components/header/logoIcon.svg
rename to src/components/shared/Header/logoIcon.svg
diff --git a/src/components/sidebar/icons/copyIcon.svg b/src/components/sidebar/icons/copyIcon.svg
deleted file mode 100644
index 4e37371..0000000
--- a/src/components/sidebar/icons/copyIcon.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/src/components/ui/ControlButton/ControlButton.tsx b/src/components/ui/ControlButton/ControlButton.tsx
deleted file mode 100644
index d75fc23..0000000
--- a/src/components/ui/ControlButton/ControlButton.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { useState } from "react";
-import { Button } from "../button/button";
-import control from "../../../images/icons/control.svg";
-import { THOC } from "../../../utils/types";
-
-
-export const ControlButton: React.FC = ({ onClick, isSidebarWide }) => {
- const [active, setActive] = useState(false);
- const button = {
- icon: control,
- active: "request-control-btn",
- inactive: "request-control-btn-disable",
- type: "control",
- };
-
- function handleClick() {
- onClick()
- setActive(prev => !prev)
- }
-
- return
-
-
-};
diff --git a/src/components/ui/FullscreenButton/FullscreenButton.tsx b/src/components/ui/FullscreenButton/FullscreenButton.tsx
deleted file mode 100644
index 67ff5c0..0000000
--- a/src/components/ui/FullscreenButton/FullscreenButton.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { useState, useEffect } from "react";
-import { Button } from "../button/button";
-
-import fullscreen from "../../../images/icons/fullscreen.svg";
-import fullscreenOff from "../../../images/icons/fullscreenOff.svg";
-
-
-export const FullscreenButton: React.FC = ({isSidebarOpen}) => {
- const [active, setActive] = useState(Boolean(document.fullscreenElement));
- const [button, setButton] = useState({
- icon: fullscreen,
- inactive: "fullscreen-control-btn",
- active: "fullscreen-control-btn-active",
- type: "fullscreen",
- });
-
-
- const handleClick = () => {
- setActive(Boolean(document.fullscreenElement))
- if (!document.fullscreenElement) {
- document.body.requestFullscreen()
- } else {
- document.exitFullscreen()
-
- }
- }
-
- useEffect(() => {
- setButton({
- icon: active ? fullscreen : fullscreenOff,
- inactive: "fullscreen-control-btn",
- active: "fullscreen-control-btn-active",
- type: "fullscreen",
- });
-
- }, [active])
-
-
-
- useEffect(() => {
- const onFullscreenChange = () => {
- setActive(Boolean(document.fullscreenElement));
- }
- document.addEventListener('fullscreenchange', onFullscreenChange);
- return () => document.removeEventListener('fullscreenchange', onFullscreenChange);
- }, []);
-
-
- return (
-
-
-
- );
-};
diff --git a/src/components/ui/MicroButton/MicroButton.tsx b/src/components/ui/MicroButton/MicroButton.tsx
deleted file mode 100644
index 460c5d6..0000000
--- a/src/components/ui/MicroButton/MicroButton.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { Button } from "../button/button";
-import microOn from "../../../images/icons/MicroOn.svg";
-
-export const MicroButton: React.FC = ({
- onClick,
- isMuted,
- isSidebarWide
-}) => {
- const button = {
- icon: microOn,
- active: "mute-control-btn",
- inactive: "mute-control-btn-disable",
- type: "microphone",
- };
-
- function handleClick() {
- onClick();
- }
-
- return (
-
-
-
- );
-};
diff --git a/src/components/ui/ShareButton/ShareButton.tsx b/src/components/ui/ShareButton/ShareButton.tsx
deleted file mode 100644
index 47f5b22..0000000
--- a/src/components/ui/ShareButton/ShareButton.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { Button } from "../button/button";
-import share from "../../../images/icons/Share.svg";
-
-
-export const ShareButton: React.FC = ({ onClick, isSidebarWide }) => {
-
- const button = {
- icon: share,
- active: "share-contro-btn",
- inactive: "share-contro-btn",
- type: "share",
- };
-
- function handleClick() {
- onClick()
- }
-
-
-
- return (
- <>
-
-
-
-
- >
- );
-};
\ No newline at end of file
diff --git a/src/components/ui/UserButton/UserButton.tsx b/src/components/ui/UserButton/UserButton.tsx
deleted file mode 100644
index 151ef41..0000000
--- a/src/components/ui/UserButton/UserButton.tsx
+++ /dev/null
@@ -1,127 +0,0 @@
-import { PopupUserControl } from "../../popupUserControl/popupUserControl";
-import { AnimatePresence, motion } from "framer-motion";
-import { useState, useEffect } from "react";
-import { animationButton } from "../../../utils/animationProps";
-import { TUserButton } from "../../../utils/types";
-import iconUser from "../../../images/icons/user.svg";
-
-const container = {
- hidden: {
- opacity: 0,
- transition: { duration: 0.3, ease: "easeOut" },
- },
- show: {
- opacity: 1,
- transition: { delay: 0.25, duration: 0.3, ease: "easeIn" },
- },
- exit: {
- opacity: 0,
- transition: { duration: 0.3, ease: "easeOut" },
- },
-};
-
-export const UsetButton: React.FC = ({
- user,
- audio,
- selected,
- setSelected,
- isAdmin,
- localUser,
- sendControlRequest,
- handleControl,
- message,
- handleReturnControl,
-}) => {
- const [hover, setHover] = useState(false);
- const [isMuted, setMuted] = useState(false);
- const [notification, setNotification] = useState(false);
-
- const isOwn = localUser.id === user.id;
- const admin = isAdmin(user);
- console.log(admin);
-
- function handleClasses() {
- if (isOwn) {
- return "user-button user-button-you";
- } else if (user.admin) {
- return "user-button user-button-admin";
- } else {
- return "user-button user-button-default";
- }
- }
-
- useEffect(() => {
- setNotification(true);
- }, [message]);
-
- function handleSelect() {
- if (user.id === localUser.id) {
- return;
- } else {
- setSelected(user.id);
- setHover(false);
- }
- }
- return (
-
-
-
- {selected === user.id && (
-
-
-
- )}
-
-
setHover(true)}
- onHoverEnd={() => setHover(false)}
- onClick={() => handleSelect()}
- className={handleClasses()}
- >
-
-
-
- {hover && (
-
-
-
- {user.id === localUser.id ? (
- "Вы"
- ) : (
- <>{user.admin ? "Администратор" : "user"}>
- )}
-
-
- )}
-
- {notification && (
- <>
- {message === user.id && (
-
- )}
- >
- )}
-
- );
-};
diff --git a/src/components/ui/WideSidebarButton/Menu.svg b/src/components/ui/WideSidebarButton/Menu.svg
deleted file mode 100644
index 6d0f591..0000000
--- a/src/components/ui/WideSidebarButton/Menu.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/src/components/ui/WideSidebarButton/WideSidebarButton.tsx b/src/components/ui/WideSidebarButton/WideSidebarButton.tsx
deleted file mode 100644
index 2f1d93f..0000000
--- a/src/components/ui/WideSidebarButton/WideSidebarButton.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Button } from "../button/button"
-import { useState, useEffect } from "react";
-import wideButton from './Menu.svg'
-
-export const WideSidebarButton: React.FC = ({ close, isSidebarWide }) => {
-
-
- const [active, setActive] = useState(Boolean(document.fullscreenElement));
- const [button, setButton] = useState({
- icon: wideButton,
- inactive: "fullscreen-control-btn",
- active: "fullscreen-control-btn-active",
- type: "fullscreen",
- });
-
- return (
-
-
- Скрыть меню
-
- )
-}
\ No newline at end of file
diff --git a/src/components/ui/button/button.tsx b/src/components/ui/button/button.tsx
deleted file mode 100644
index 85fea36..0000000
--- a/src/components/ui/button/button.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import "../../sidebar/toolbar.css";
-import disabledImg from "../../../images/icons/line.svg";
-import { useState } from "react";
-import { AnimatePresence, motion } from "framer-motion";
-import { animationButton } from "../../../utils/animationProps";
-import { useTranslation } from "react-i18next";
-import { useAppSelector } from "../../../hooks/redux";
-export const Button: React.FC = ({ button, onClick, active, isSidebarWide }) => {
- const [hover, setHover] = useState(false);
- const { currentLang } = useAppSelector((state) => state.languageReducer);
-
- console.log(isSidebarWide)
-
- const typeButton = button.type !== "fullscreen" && button.type !== "language";
-
- function handleClick() {
- setHover(false)
- onClick();
- }
-
- const { t } = useTranslation();
-
- return (
-
-
e.target.blur()} /// disable default browser focus when key is pressed
- onHoverStart={() => setHover(true)}
- onHoverEnd={() => setHover(false)}
- className={
- button.type === "exit"
- ? "toolbar-button_exit toolbar-button"
- : "toolbar-button"
- }
- >
- {button.type === "language" ? (
- {currentLang.toUpperCase()}
- ) : (
-
- )}
- {active && typeButton && (
-
- )}
-
-
- { !isSidebarWide && hover && (
-
-
-
- {active ? t(button.active) : t(button.inactive)}
-
-
- )}
-
-
- );
-};
diff --git a/src/images/icons/ChevronDown.svg b/src/images/icons/ChevronDown.svg
new file mode 100644
index 0000000..70cc265
--- /dev/null
+++ b/src/images/icons/ChevronDown.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/images/icons/HandOff.svg b/src/images/icons/HandOff.svg
new file mode 100644
index 0000000..d5ce9a9
--- /dev/null
+++ b/src/images/icons/HandOff.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/images/icons/MicSidebar.svg b/src/images/icons/MicSidebar.svg
new file mode 100644
index 0000000..517921d
--- /dev/null
+++ b/src/images/icons/MicSidebar.svg
@@ -0,0 +1,5 @@
+
diff --git a/src/images/icons/MicroOff.svg b/src/images/icons/MicroOff.svg
new file mode 100644
index 0000000..e46b36e
--- /dev/null
+++ b/src/images/icons/MicroOff.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/images/icons/MicroOn.svg b/src/images/icons/MicroOn.svg
index 9aa1b96..aa4ce4b 100644
--- a/src/images/icons/MicroOn.svg
+++ b/src/images/icons/MicroOn.svg
@@ -1,3 +1,4 @@
-