+
) : (
-
+
+
+
);
};
diff --git a/packages/main/src/components/media-chat/video/styles/videoRoom.css b/packages/main/src/components/media-chat/video/styles/videoRoom.css
new file mode 100644
index 0000000000..409422284e
--- /dev/null
+++ b/packages/main/src/components/media-chat/video/styles/videoRoom.css
@@ -0,0 +1,5 @@
+.joinBtn {
+ padding: 12px 24px;
+ font-size: 21px;
+ background-color: #20c997;
+}
\ No newline at end of file
diff --git a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
index 78be8f12a5..a4b3a87f47 100644
--- a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
+++ b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
@@ -231,7 +231,7 @@ const Sidebar = props => {
- <>
+
{
image={dmIcon}
link={`/workspace/${currentWorkspaceShort}/plugin-chat/all-dms`}
/>
-
{
{singleItems}
{categorizedItems}
- >
+
+
)}
diff --git a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
index cac94f6d4e..3931b16f3f 100644
--- a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
+++ b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
@@ -54,8 +54,12 @@
}
.subCon2 {
- height: 100%;
+ height: 90vh;
width: unset;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ gap: 20px;
}
.subCon2::-webkit-scrollbar {
@@ -266,3 +270,21 @@
display: block;
}
+.videoCall {
+ height: 50px;
+ border-top: 2px solid rgba(128, 128, 128, 0.5);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.videoCall > div {
+ width: 100%;
+}
+
+.videoCall > div > div {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: 20px;
+}
\ No newline at end of file
From d206e662f5d3d87841a723f2ff17d51697b77839 Mon Sep 17 00:00:00 2001
From: Nafiu Taiwo <69268373+taiwonaf@users.noreply.github.com>
Date: Sat, 10 Dec 2022 16:27:23 +0100
Subject: [PATCH 07/14] Moved agora uikit props to new lines
---
packages/main/src/components/media-chat/video/VideoRoom.jsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/main/src/components/media-chat/video/VideoRoom.jsx b/packages/main/src/components/media-chat/video/VideoRoom.jsx
index f976723779..9c4b72aefa 100644
--- a/packages/main/src/components/media-chat/video/VideoRoom.jsx
+++ b/packages/main/src/components/media-chat/video/VideoRoom.jsx
@@ -3,7 +3,7 @@ import AgoraUIKit from "agora-react-uikit";
import { AGORA_APP_ID, AGORA_TOKEN } from "@zuri/utilities";
import styles from "./styles/videoRoom.css";
-const VideoRoom = () => {
+const VideoRoom = ({ workspaceId }) => {
const [videoCall, setVideoCall] = useState(true);
const rtcProps = {
appId: AGORA_APP_ID,
From ee07c261d221d444c48d8af24271da0d0ed1f3f2 Mon Sep 17 00:00:00 2001
From: Nafiu Taiwo <69268373+taiwonaf@users.noreply.github.com>
Date: Sat, 10 Dec 2022 22:30:46 +0100
Subject: [PATCH 08/14] Styling: fixed the sizes of the video containers
---
.../components/media-chat/video/VideoRoom.jsx | 74 ++++++++++++++++++-
.../protected/sidebar/assets/icons/videos.svg | 4 +-
.../protected/sidebar/components/Sidebar.jsx | 13 ----
.../sidebar/styles/Sidebar.module.css | 4 +
.../pages/protected/workspace/Workspace.jsx | 9 ---
5 files changed, 79 insertions(+), 25 deletions(-)
diff --git a/packages/main/src/components/media-chat/video/VideoRoom.jsx b/packages/main/src/components/media-chat/video/VideoRoom.jsx
index 9c4b72aefa..40a56844f6 100644
--- a/packages/main/src/components/media-chat/video/VideoRoom.jsx
+++ b/packages/main/src/components/media-chat/video/VideoRoom.jsx
@@ -13,9 +13,79 @@ const VideoRoom = ({ workspaceId }) => {
const callbacks = {
EndCall: () => setVideoCall(false)
};
+
+ const styleProps = {
+ videoMode: { max: "cover" },
+ UIKitContainer: {
+ position: "relative",
+ background: "#838383",
+ overflow: "hidden"
+ },
+ minViewContainer: {
+ maxWidth: "auto",
+ maxHeight: "168px",
+ position: "absolute",
+ top: "0px",
+ right: "0px",
+ display: "flex",
+ justifyContent: "flex-end"
+ },
+ minViewStyles: {
+ maxWidth: "128px",
+ maxHeight: "128px",
+ margin: "32px 40px 0 0",
+ overflow: "hidden",
+ borderRadius: "10px",
+ boxShadow: "1px 1px 15px 3px rgba(184, 88, 32, 0.2)"
+ },
+ minViewOverlayContainer: {
+ background: "red"
+ },
+
+ maxViewContainer: {
+ position: "absolute",
+ width: "100%",
+ height: "100%"
+ },
+ maxViewStyles: {},
+ localBtnContainer: {
+ background: "#00b87c"
+ },
+ localBtnStyles: {
+ endCall: {
+ minHeight: "48px",
+ minWidth: "48px",
+ background: "rgb(220,60,60)",
+ border: "none"
+ },
+ muteLocalAudio: {
+ minHeight: "48px",
+ minWidth: "48px",
+ background: "transparent",
+ border: "none"
+ },
+ muteLocalVideo: {
+ minHeight: "48px",
+ minWidth: "48px",
+ background: "transparent",
+ border: "none"
+ }
+ }
+ };
return videoCall ? (
-
-
+
) : (
\ No newline at end of file
+
diff --git a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
index a4b3a87f47..43b1f4e7a3 100644
--- a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
+++ b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
@@ -4,13 +4,10 @@ import { useTranslation } from "react-i18next";
import videoIcon from "../assets/icons/videos.svg";
import threadIcon from "../assets/icons/thread-icon.svg";
import dmIcon from "../assets/icons/dm-icon.svg";
-import liveicon from "../assets/icons/newlive.svg";
-import phoneicon from "../assets/icons/phone.svg";
import draftIcon from "../assets/icons/draft-icon.svg";
import { subscribeToChannel } from "@zuri/utilities";
import { ACTIONS } from "../reducers/sidebar.reducer";
import Header from "./Header";
-import Room from "./Room";
import SingleRoom from "./SingleRoom";
import Category from "./Category";
import Starred from "./Starred";
@@ -246,16 +243,6 @@ const Sidebar = props => {
name={`${t("workspace_chat.drafts")}`}
image={draftIcon}
/>
-
-
{singleItems}
diff --git a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
index 3931b16f3f..d62960fd75 100644
--- a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
+++ b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
@@ -282,6 +282,10 @@
width: 100%;
}
+.videoCall img {
+ width: 24px;
+}
+
.videoCall > div > div {
display: flex;
justify-content: space-between;
diff --git a/packages/main/src/pages/protected/workspace/Workspace.jsx b/packages/main/src/pages/protected/workspace/Workspace.jsx
index 062da0cddb..7d515bf19e 100644
--- a/packages/main/src/pages/protected/workspace/Workspace.jsx
+++ b/packages/main/src/pages/protected/workspace/Workspace.jsx
@@ -6,7 +6,6 @@ import {
useLocation,
useRouteMatch
} from "react-router-dom";
-import LiveBroadcast from "../../../components/media-chat/LiveBroadcast";
import useParamHook from "./useParamHook";
import {
ExtraSidebarWrapperStyle,
@@ -25,7 +24,6 @@ import {
BsGearFill,
BsPlusCircle
} from "react-icons/bs";
-import VoiceCall from "../../../components/media-chat/VoiceCall/VoiceCall";
import VideoRoom from "../../../components/media-chat/video/VideoRoom";
import { Sidebar, TopBar } from "../../../components/protected";
import ExtraSidebar from "../../../components/protected/extra-sidebar";
@@ -98,16 +96,9 @@ export default function Index() {
Welcome to your Workspace
-
-
-
-
-
-
-
{/*
Date: Sat, 10 Dec 2022 22:48:55 +0100
Subject: [PATCH 09/14] Fixed stylings and husky version issue
---
package.json | 2 +-
yarn.lock | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/package.json b/package.json
index 21e5b6d64f..c7750459a7 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,7 @@
"eslint-plugin-css-modules": "^2.11.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-react": "^7.28.0",
- "husky": "^8.0.2",
+ "husky": "^7.0.2",
"lerna": "^4.0.0",
"lint-staged": ">=10",
"opener": "^1.5.2",
diff --git a/yarn.lock b/yarn.lock
index ceea82d535..22657598ba 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10539,11 +10539,6 @@ husky@^7.0.2:
resolved "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz"
integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==
-husky@^8.0.2:
- version "8.0.2"
- resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.2.tgz#5816a60db02650f1f22c8b69b928fd6bcd77a236"
- integrity sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==
-
hyphenate-style-name@^1.0.2, hyphenate-style-name@^1.0.3:
version "1.0.4"
resolved "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz"
From 79e35c8a0819adbe2677b22d302d15b8067ee76c Mon Sep 17 00:00:00 2001
From: Nafiu Taiwo <69268373+taiwonaf@users.noreply.github.com>
Date: Sun, 11 Dec 2022 22:22:58 +0100
Subject: [PATCH 10/14] Integrated the token generator
---
.../components/media-chat/video/VideoRoom.jsx | 23 +++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/packages/main/src/components/media-chat/video/VideoRoom.jsx b/packages/main/src/components/media-chat/video/VideoRoom.jsx
index 40a56844f6..5de9cfdb53 100644
--- a/packages/main/src/components/media-chat/video/VideoRoom.jsx
+++ b/packages/main/src/components/media-chat/video/VideoRoom.jsx
@@ -1,14 +1,29 @@
-import { useState } from "react";
+import { useState, useEffect } from "react";
import AgoraUIKit from "agora-react-uikit";
import { AGORA_APP_ID, AGORA_TOKEN } from "@zuri/utilities";
import styles from "./styles/videoRoom.css";
+import axios from "axios";
const VideoRoom = ({ workspaceId }) => {
- const [videoCall, setVideoCall] = useState(true);
+ const [videoCall, setVideoCall] = useState(false);
+ const [token, setToken] = useState(null);
+ const fetchToken = async () => {
+ const response = await fetch(
+ `https://staging.api.zuri.chat/rtc/${workspaceId}/publisher/userAccount`
+ );
+ const data = await response.json();
+ setToken(data.data.token);
+ if (response.status === 200) {
+ setVideoCall(true);
+ }
+ };
+ useEffect(() => {
+ fetchToken();
+ }, []);
const rtcProps = {
appId: AGORA_APP_ID,
- channel: "plug",
- token: AGORA_TOKEN
+ channel: workspaceId,
+ token: token
};
const callbacks = {
EndCall: () => setVideoCall(false)
From ce9e9fe95cb43994bcaa3c68818b9b874e29b951 Mon Sep 17 00:00:00 2001
From: Nafiu Taiwo <69268373+taiwonaf@users.noreply.github.com>
Date: Mon, 12 Dec 2022 09:58:33 +0100
Subject: [PATCH 11/14] Token generator integrated
---
.../main/src/components/protected/sidebar/components/Sidebar.jsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
index 43b1f4e7a3..00b430499e 100644
--- a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
+++ b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
@@ -12,6 +12,7 @@ import SingleRoom from "./SingleRoom";
import Category from "./Category";
import Starred from "./Starred";
import { storeSideBarInfo } from "../../../../utils/cache-sidebar";
+import VideoRoom from "../../../media-chat/video/VideoRoom";
const categories = [];
From 177f5075a676ed5ae0bf1aaad708f220003fcc0c Mon Sep 17 00:00:00 2001
From: Nafiu Taiwo <69268373+taiwonaf@users.noreply.github.com>
Date: Mon, 12 Dec 2022 11:00:22 +0100
Subject: [PATCH 12/14] Changed the video icon image to react icon
---
.../protected/sidebar/components/Sidebar.jsx | 21 ++++++++++++-------
.../sidebar/styles/Sidebar.module.css | 15 ++++++++-----
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
index 00b430499e..3957e45f33 100644
--- a/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
+++ b/packages/main/src/components/protected/sidebar/components/Sidebar.jsx
@@ -1,7 +1,8 @@
import { useState, useEffect, useRef, useCallback } from "react";
+import { navigateToUrl } from "single-spa";
import styles from "../styles/Sidebar.module.css";
import { useTranslation } from "react-i18next";
-import videoIcon from "../assets/icons/videos.svg";
+// import videoIcon from "../assets/icons/videos.svg";
import threadIcon from "../assets/icons/thread-icon.svg";
import dmIcon from "../assets/icons/dm-icon.svg";
import draftIcon from "../assets/icons/draft-icon.svg";
@@ -12,7 +13,7 @@ import SingleRoom from "./SingleRoom";
import Category from "./Category";
import Starred from "./Starred";
import { storeSideBarInfo } from "../../../../utils/cache-sidebar";
-import VideoRoom from "../../../media-chat/video/VideoRoom";
+import { FiVideo } from "react-icons/fi";
const categories = [];
@@ -250,12 +251,16 @@ const Sidebar = props => {
{categorizedItems}
-
-
+
+ navigateToUrl(
+ `/workspace/${currentWorkspaceShort}/video-chat`
+ )
+ }
+ >
+
+ Video call
diff --git a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
index d62960fd75..77d1d0fda7 100644
--- a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
+++ b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
@@ -274,16 +274,21 @@
height: 50px;
border-top: 2px solid rgba(128, 128, 128, 0.5);
display: flex;
- justify-content: center;
+ justify-content: flex-start;
align-items: center;
+ gap: 20px;
+ padding: 0px 20px;
}
-.videoCall > div {
- width: 100%;
+.videoCall:hover {
+ background-color: #7ed5af;
}
-.videoCall img {
- width: 24px;
+.videoCall:active {
+ background-color: #7ed5af;
+}
+.videoCall > div {
+ width: 100%;
}
.videoCall > div > div {
From f3d1ef03e794007de87314d8c3bfff3c1afa0c13 Mon Sep 17 00:00:00 2001
From: Nafiu Taiwo <69268373+taiwonaf@users.noreply.github.com>
Date: Tue, 13 Dec 2022 22:28:04 +0100
Subject: [PATCH 13/14] removed icons not in use
---
packages/main/src/assets/media/exit.svg | 1 -
packages/main/src/assets/media/mic-off.svg | 1 -
packages/main/src/assets/media/mic.svg | 1 -
packages/main/src/assets/media/video-off.svg | 1 -
packages/main/src/assets/media/video.svg | 1 -
5 files changed, 5 deletions(-)
delete mode 100644 packages/main/src/assets/media/exit.svg
delete mode 100644 packages/main/src/assets/media/mic-off.svg
delete mode 100644 packages/main/src/assets/media/mic.svg
delete mode 100644 packages/main/src/assets/media/video-off.svg
delete mode 100644 packages/main/src/assets/media/video.svg
diff --git a/packages/main/src/assets/media/exit.svg b/packages/main/src/assets/media/exit.svg
deleted file mode 100644
index e47723f00a..0000000000
--- a/packages/main/src/assets/media/exit.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/packages/main/src/assets/media/mic-off.svg b/packages/main/src/assets/media/mic-off.svg
deleted file mode 100644
index cc85332c8b..0000000000
--- a/packages/main/src/assets/media/mic-off.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/packages/main/src/assets/media/mic.svg b/packages/main/src/assets/media/mic.svg
deleted file mode 100644
index 45818c9cac..0000000000
--- a/packages/main/src/assets/media/mic.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/packages/main/src/assets/media/video-off.svg b/packages/main/src/assets/media/video-off.svg
deleted file mode 100644
index 27c37d8916..0000000000
--- a/packages/main/src/assets/media/video-off.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/packages/main/src/assets/media/video.svg b/packages/main/src/assets/media/video.svg
deleted file mode 100644
index 734a2cb3e5..0000000000
--- a/packages/main/src/assets/media/video.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
From 3a76289f3f01a22b20e1aa274708533b26441eb7 Mon Sep 17 00:00:00 2001
From: Nafiu Taiwo <69268373+taiwonaf@users.noreply.github.com>
Date: Tue, 13 Dec 2022 23:18:35 +0100
Subject: [PATCH 14/14] Changed to axios to fetching data
---
.../components/media-chat/video/VideoRoom.jsx | 21 +++++++++++--------
.../sidebar/styles/Sidebar.module.css | 1 +
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/packages/main/src/components/media-chat/video/VideoRoom.jsx b/packages/main/src/components/media-chat/video/VideoRoom.jsx
index 5de9cfdb53..5b90d61943 100644
--- a/packages/main/src/components/media-chat/video/VideoRoom.jsx
+++ b/packages/main/src/components/media-chat/video/VideoRoom.jsx
@@ -7,15 +7,18 @@ import axios from "axios";
const VideoRoom = ({ workspaceId }) => {
const [videoCall, setVideoCall] = useState(false);
const [token, setToken] = useState(null);
- const fetchToken = async () => {
- const response = await fetch(
- `https://staging.api.zuri.chat/rtc/${workspaceId}/publisher/userAccount`
- );
- const data = await response.json();
- setToken(data.data.token);
- if (response.status === 200) {
- setVideoCall(true);
- }
+ const fetchToken = () => {
+ axios
+ .get(
+ `https://staging.api.zuri.chat/rtc/${workspaceId}/publisher/userAccount`
+ )
+ .then(response => {
+ if (response.status === 200) {
+ setToken(response.data.data.token);
+ setVideoCall(true);
+ }
+ })
+ .catch(error => console.log(error));
};
useEffect(() => {
fetchToken();
diff --git a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
index 77d1d0fda7..a6607536fb 100644
--- a/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
+++ b/packages/main/src/components/protected/sidebar/styles/Sidebar.module.css
@@ -278,6 +278,7 @@
align-items: center;
gap: 20px;
padding: 0px 20px;
+ cursor: pointer;
}
.videoCall:hover {