From aac464fa25bb136bf4082582a6e2e9ff7c0afbbc Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Mon, 3 Apr 2023 10:42:06 +0800 Subject: [PATCH] feat: tool tips in voice --- src/routes/chat/RTCWidget.tsx | 2 +- src/routes/chat/VoiceChat/VoiceManagement.tsx | 26 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/routes/chat/RTCWidget.tsx b/src/routes/chat/RTCWidget.tsx index 8dc803a9..779b9f4c 100644 --- a/src/routes/chat/RTCWidget.tsx +++ b/src/routes/chat/RTCWidget.tsx @@ -55,7 +55,7 @@ const RTCWidget = ({ id, context = "channel" }: Props) => { {/* {voicingInfo && */}
- + {voicingInfo.deafen ? : } diff --git a/src/routes/chat/VoiceChat/VoiceManagement.tsx b/src/routes/chat/VoiceChat/VoiceManagement.tsx index c0a223fb..7124d72e 100644 --- a/src/routes/chat/VoiceChat/VoiceManagement.tsx +++ b/src/routes/chat/VoiceChat/VoiceManagement.tsx @@ -1,5 +1,7 @@ import clsx from 'clsx'; -import React from 'react'; +// import React from 'react'; +import { useTranslation } from 'react-i18next'; + import { VoicingInfo } from '../../../app/slices/voice'; import { useAppSelector } from '../../../app/store'; import Avatar from '../../../common/component/Avatar'; @@ -9,6 +11,7 @@ import IconMic from '../../../assets/icons/mic.on.svg'; import IconMicOff from '../../../assets/icons/mic.off.svg'; import StyledButton from '../../../common/component/styled/Button'; import IconCallOff from '../../../assets/icons/call.off.svg'; +import Tooltip from '../../../common/component/Tooltip'; // import User from '../../../common/component/User'; type Props = { @@ -19,6 +22,7 @@ type Props = { } const VoiceManagement = ({ info, setMute, setDeafen, leave }: Props) => { + const { t } = useTranslation("chat"); const { userData, voicingMembers } = useAppSelector(store => { return { userData: store.users.byId, @@ -71,16 +75,22 @@ const VoiceManagement = ({ info, setMute, setDeafen, leave }: Props) => {
    -
  • - {deafen ? : } -
  • -
  • - {muted ? : } + +
  • + {deafen ? : } +
  • + + +
  • + {muted ? : } -
  • + +
- + + +