|
@@ -33,7 +33,7 @@ interface ClassroomLayoutProps {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export const ClassroomLayout = ({ children, role }: ClassroomLayoutProps) => {
|
|
export const ClassroomLayout = ({ children, role }: ClassroomLayoutProps) => {
|
|
|
- const [showVideo, setShowVideo] = React.useState(role !== Role.Teacher);
|
|
|
|
|
|
|
+ const [showVideo, setShowVideo] = React.useState(false);
|
|
|
const [showShareLink, setShowShareLink] = React.useState(false);
|
|
const [showShareLink, setShowShareLink] = React.useState(false);
|
|
|
const [isLandscape, setIsLandscape] = React.useState(false);
|
|
const [isLandscape, setIsLandscape] = React.useState(false);
|
|
|
const {
|
|
const {
|
|
@@ -184,18 +184,18 @@ export const ClassroomLayout = ({ children, role }: ClassroomLayoutProps) => {
|
|
|
{/* 控制面板 */}
|
|
{/* 控制面板 */}
|
|
|
<div className="p-2 flex flex-col gap-3 mb-1 border-b border-gray-200">
|
|
<div className="p-2 flex flex-col gap-3 mb-1 border-b border-gray-200">
|
|
|
<div className="flex flex-wrap gap-2">
|
|
<div className="flex flex-wrap gap-2">
|
|
|
- {role === Role.Teacher && (
|
|
|
|
|
- <Button
|
|
|
|
|
- type="button"
|
|
|
|
|
- onClick={() => setShowVideo(!showVideo)}
|
|
|
|
|
- className={`p-2 rounded-full ${showVideo ? 'bg-gray-500' : 'bg-gray-300'} text-white`}
|
|
|
|
|
- title={showVideo ? '隐藏视频' : '显示视频'}
|
|
|
|
|
- size="icon"
|
|
|
|
|
- variant="ghost"
|
|
|
|
|
- >
|
|
|
|
|
- <VideoCameraIcon className="w-4 h-4" />
|
|
|
|
|
- </Button>
|
|
|
|
|
- )}
|
|
|
|
|
|
|
+ {/* {role === Role.Teacher && (
|
|
|
|
|
+ )} */}
|
|
|
|
|
+ <Button
|
|
|
|
|
+ type="button"
|
|
|
|
|
+ onClick={() => setShowVideo(!showVideo)}
|
|
|
|
|
+ className={`p-2 rounded-full ${showVideo ? 'bg-gray-500' : 'bg-gray-300'} text-white`}
|
|
|
|
|
+ title={showVideo ? '隐藏视频' : '显示视频'}
|
|
|
|
|
+ size="icon"
|
|
|
|
|
+ variant="ghost"
|
|
|
|
|
+ >
|
|
|
|
|
+ <VideoCameraIcon className="w-4 h-4" />
|
|
|
|
|
+ </Button>
|
|
|
<Button
|
|
<Button
|
|
|
type="button"
|
|
type="button"
|
|
|
onClick={toggleCamera}
|
|
onClick={toggleCamera}
|