chore: voice visible only to admin
This commit is contained in:
@@ -88,8 +88,8 @@ function ChannelChat({ cid = 0, dropFiles = [] }: Props) {
|
||||
</li>
|
||||
</Tippy>
|
||||
</Tooltip>
|
||||
{/* 音频 */}
|
||||
<VoiceChat context={`channel`} id={cid} />
|
||||
{/* 音频 暂时只有admin有入口 */}
|
||||
{loginUser?.is_admin && <VoiceChat context={`channel`} id={cid} />}
|
||||
<Tooltip tip={t("fav")} placement="left">
|
||||
<Tippy
|
||||
placement="left-start"
|
||||
|
||||
@@ -30,7 +30,7 @@ function HomePage() {
|
||||
const { pathname } = useLocation();
|
||||
const {
|
||||
roleChanged,
|
||||
loginUid,
|
||||
loginUser: { uid: loginUid, is_admin: isAdmin },
|
||||
guest,
|
||||
ui: {
|
||||
ready,
|
||||
@@ -39,7 +39,7 @@ function HomePage() {
|
||||
} = useAppSelector((store) => {
|
||||
return {
|
||||
ui: store.ui,
|
||||
loginUid: store.authData.user?.uid,
|
||||
loginUser: store.authData.user ?? { uid: 0, is_admin: false },
|
||||
guest: store.authData.guest,
|
||||
roleChanged: store.authData.roleChanged
|
||||
};
|
||||
@@ -68,7 +68,7 @@ function HomePage() {
|
||||
<>
|
||||
{roleChanged && <ReLoginModal />}
|
||||
{!guest && <UnreadTabTip />}
|
||||
{!guest && <Voice />}
|
||||
{!guest && isAdmin && <Voice />}
|
||||
<Manifest />
|
||||
{!guest && <Notification />}
|
||||
<div className={`vocechat-container flex w-screen h-screen bg-gray-200 dark:bg-gray-900`}>
|
||||
|
||||
Reference in New Issue
Block a user