From 54ebc487cc950926e05bc65c709b892e1ecc6551 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 21 Feb 2022 17:40:54 +0100 Subject: [PATCH] feat(ui) - assist ui - wip --- .../Assist/ChatControls/ChatControls.css | 2 +- .../Assist/ChatControls/ChatControls.tsx | 12 ++++++------ .../components/Assist/ChatWindow/ChatWindow.tsx | 7 +++---- .../components/Assist/ChatWindow/chatWindow.css | 5 +++-- .../components/AssistActions/AssistActions.tsx | 2 +- .../app/components/Session_/PlayerBlockHeader.js | 16 ++++++++-------- .../shared/SessionItem/MetaItem/MetaItem.tsx | 2 +- .../MetaMoreButton/MetaMoreButton.tsx | 2 +- .../components/ui/Confirmation/Confirmation.js | 2 +- .../app/components/ui/CountryFlag/CountryFlag.js | 5 +++-- frontend/app/styles/semantic.css | 9 +++++++++ frontend/app/svg/icons/flag-na.svg | 3 +++ 12 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 frontend/app/svg/icons/flag-na.svg diff --git a/frontend/app/components/Assist/ChatControls/ChatControls.css b/frontend/app/components/Assist/ChatControls/ChatControls.css index 7ec77f758..b5a03ed10 100644 --- a/frontend/app/components/Assist/ChatControls/ChatControls.css +++ b/frontend/app/components/Assist/ChatControls/ChatControls.css @@ -15,7 +15,7 @@ &.disabled { /* background-color: red; */ & svg { - fill: red; + fill: $red; } } } diff --git a/frontend/app/components/Assist/ChatControls/ChatControls.tsx b/frontend/app/components/Assist/ChatControls/ChatControls.tsx index 61803bc2f..fd0430282 100644 --- a/frontend/app/components/Assist/ChatControls/ChatControls.tsx +++ b/frontend/app/components/Assist/ChatControls/ChatControls.tsx @@ -28,17 +28,17 @@ function ChatControls({ stream, endCall, videoEnabled, setVideoEnabled } : Props return (
-
-
-
-
diff --git a/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx b/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx index 6da23c7e8..36bc0765b 100644 --- a/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx +++ b/frontend/app/components/Assist/ChatWindow/ChatWindow.tsx @@ -20,7 +20,6 @@ const ChatWindow: FC = function ChatWindow({ userId, incomeStream, localS const [localVideoEnabled, setLocalVideoEnabled] = useState(false) const [remoteVideoEnabled, setRemoteVideoEnabled] = useState(false) - useEffect(() => { if (!incomeStream) { return } const iid = setInterval(() => { @@ -42,9 +41,9 @@ const ChatWindow: FC = function ChatWindow({ userId, incomeStream, localS className={cn(stl.wrapper, "fixed radius bg-white shadow-xl mt-16")} style={{ width: '280px' }} > -
-
Meeting {userId}
- +
+
Talking to {userId ? userId : 'Anonymous User'}
+
diff --git a/frontend/app/components/Assist/ChatWindow/chatWindow.css b/frontend/app/components/Assist/ChatWindow/chatWindow.css index 0f1f7694b..8bb359695 100644 --- a/frontend/app/components/Assist/ChatWindow/chatWindow.css +++ b/frontend/app/components/Assist/ChatWindow/chatWindow.css @@ -1,9 +1,10 @@ .wrapper { background-color: white; - border: solid thin #000; + border: solid thin $gray-light; border-radius: 3px; position: fixed; - width: 300px; + width: 300px; + box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); } .headerTitle { diff --git a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx index d3390e47c..b9ea38f47 100644 --- a/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx +++ b/frontend/app/components/Assist/components/AssistActions/AssistActions.tsx @@ -117,7 +117,7 @@ function AssistActions({ toggleChatWindow, userId, calling, peerConnectionStatus color={ onCall ? "red" : "gray-darkest" } /> { onCall ? 'End Call' : 'Call' } */} - +
} content={ cannotCall ? "You don’t have the permissions to perform this action." : `Call ${userId ? userId : 'User'}` } diff --git a/frontend/app/components/Session_/PlayerBlockHeader.js b/frontend/app/components/Session_/PlayerBlockHeader.js index e32fd2bb6..631a3a3c8 100644 --- a/frontend/app/components/Session_/PlayerBlockHeader.js +++ b/frontend/app/components/Session_/PlayerBlockHeader.js @@ -126,6 +126,11 @@ export default class PlayerBlockHeader extends React.PureComponent { */}
+ { live && hasSessionsPath && ( +
this.props.setSessionPath('')}> + This Session is Now Continuing Live +
+ )}
- - { live && hasSessionsPath && ( -
this.props.setSessionPath('')}> - This Session is Now Continuing Live -
- )} { _live && } { !_live && ( <>
+
- + diff --git a/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx b/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx index 21a5f38f1..514192273 100644 --- a/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx +++ b/frontend/app/components/shared/SessionItem/MetaMoreButton/MetaMoreButton.tsx @@ -20,7 +20,7 @@ export default function MetaMoreButton(props: Props) { content={
{list.slice(maxLength).map(({ label, value }, index) => ( - + ))}
} diff --git a/frontend/app/components/ui/Confirmation/Confirmation.js b/frontend/app/components/ui/Confirmation/Confirmation.js index d791b7fe2..563f383eb 100644 --- a/frontend/app/components/ui/Confirmation/Confirmation.js +++ b/frontend/app/components/ui/Confirmation/Confirmation.js @@ -22,7 +22,7 @@ const Confirmation = ({ content={confirmation} header={header} className="confirmCustom" - confirmButton={} + confirmButton={} cancelButton={} onCancel={() => proceed(false)} onConfirm={() => proceed(true)} diff --git a/frontend/app/components/ui/CountryFlag/CountryFlag.js b/frontend/app/components/ui/CountryFlag/CountryFlag.js index 04cfaf38d..6bcc6672b 100644 --- a/frontend/app/components/ui/CountryFlag/CountryFlag.js +++ b/frontend/app/components/ui/CountryFlag/CountryFlag.js @@ -1,6 +1,6 @@ import cn from 'classnames'; import { countries } from 'App/constants'; -import { Popup } from 'UI'; +import { Popup, Icon } from 'UI'; import stl from './countryFlag.css'; const CountryFlag = React.memo(({ country, className, style = {}, label = false }) => { @@ -13,7 +13,8 @@ const CountryFlag = React.memo(({ country, className, style = {}, label = false - :
{ "N/A" }
+ : + // :
{ "N/A" }
} content={ countryName } inverted diff --git a/frontend/app/styles/semantic.css b/frontend/app/styles/semantic.css index 7fe14933b..0bfa64bf4 100644 --- a/frontend/app/styles/semantic.css +++ b/frontend/app/styles/semantic.css @@ -336,4 +336,13 @@ a:hover { overflow: hidden; text-overflow: ellipsis; margin-right: 15px; +} + +.ui.mini.modal>.header:not(.ui) { + padding: 10px 17px !important; + font-size: 16px !important; +} + +.ui.modal>.content { + padding: 10px 17px !important; } \ No newline at end of file diff --git a/frontend/app/svg/icons/flag-na.svg b/frontend/app/svg/icons/flag-na.svg new file mode 100644 index 000000000..ca42ac405 --- /dev/null +++ b/frontend/app/svg/icons/flag-na.svg @@ -0,0 +1,3 @@ + + +