From dbaf7b85ae84beadf0c6da33a98492fd257ac11f Mon Sep 17 00:00:00 2001 From: Eunseo Sim <55528304+simeunseo@users.noreply.github.com> Date: Wed, 4 Dec 2024 03:11:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=85=B9=EC=9D=8C=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=EC=9D=80=20=EB=B0=A9=EC=9E=A5=EC=97=90=EA=B2=8C=EB=A7=8C=20?= =?UTF-8?q?=EB=B3=B4=EC=97=AC=EC=A3=BC=EB=8F=84=EB=A1=9D=20=EB=B6=84?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/live/ControlBar/index.tsx | 6 ++++- .../components/live/SettingDialog/index.tsx | 27 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/apps/web/src/components/live/ControlBar/index.tsx b/apps/web/src/components/live/ControlBar/index.tsx index c4b273d8..2260be99 100644 --- a/apps/web/src/components/live/ControlBar/index.tsx +++ b/apps/web/src/components/live/ControlBar/index.tsx @@ -143,7 +143,11 @@ const ControlBar = ({ isOwner, onTicleEnd }: ControlBarProps) => { /> )} {isOpenSettingModal && ( - + )} ); diff --git a/apps/web/src/components/live/SettingDialog/index.tsx b/apps/web/src/components/live/SettingDialog/index.tsx index 48f71da8..41f32282 100644 --- a/apps/web/src/components/live/SettingDialog/index.tsx +++ b/apps/web/src/components/live/SettingDialog/index.tsx @@ -1,4 +1,5 @@ import { cva } from 'class-variance-authority'; +import { i } from 'node_modules/@repo/mediasoup/dist/index-uthNRcro'; import { useState } from 'react'; import { Dialog } from '@/components/common/Dialog'; @@ -23,10 +24,12 @@ const listVariants = cva( const SIDEBAR_ITEMS = [ { + onlyForOwner: false, title: '오디오 및 비디오', Component: SelectMedia, }, { + onlyForOwner: true, title: 'AI 음성 요약', Component: AiSummary, }, @@ -35,9 +38,10 @@ const SIDEBAR_ITEMS = [ interface SettingDialogProps { isOpen: boolean; onClose: () => void; + isOwner: boolean; } -function SettingDialog({ isOpen, onClose }: SettingDialogProps) { +function SettingDialog({ isOpen, onClose, isOwner }: SettingDialogProps) { const [activeIndex, setActiveIndex] = useState(0); const Component = SIDEBAR_ITEMS[activeIndex]?.Component; @@ -48,15 +52,18 @@ function SettingDialog({ isOpen, onClose }: SettingDialogProps) {
    - {SIDEBAR_ITEMS.map((item, index) => ( -
  • setActiveIndex(index)} - > - {item.title} -
  • - ))} + {SIDEBAR_ITEMS.map( + (item, index) => + (item.onlyForOwner ? isOwner : true) && ( +
  • setActiveIndex(index)} + > + {item.title} +
  • + ) + )}
{Component && }