feat: configure overview camera per curriculum week
This commit is contained in:
@@ -522,7 +522,7 @@ function LocalPcWorkspaceMockup({
|
||||
const visualizationHostInstanceId = useRef(`${platformId}:${Math.random().toString(36).slice(2)}`).current
|
||||
const [powerActionModalOpen, setPowerActionModalOpen] = useState(false)
|
||||
const [cameraOpen, setCameraOpen] = useState(false)
|
||||
useEffect(() => { setCameraOpen(false) }, [platformId, workspaceVisible])
|
||||
useEffect(() => { setCameraOpen(false) }, [platformId, workspaceVisible, courseKey, weekNumber])
|
||||
const [controlCountdownNow, setControlCountdownNow] = useState(Date.now())
|
||||
const {
|
||||
qaMode,
|
||||
@@ -3424,7 +3424,8 @@ function LocalPcWorkspaceMockup({
|
||||
return (
|
||||
<div ref={workspaceRootRef} className={['relative h-full min-h-0 overflow-hidden', surface].join(' ')}>
|
||||
{cameraOpen && workspaceVisible && <WorkspaceCameraPanel
|
||||
camera={platformOptions.find((platform) => platform.id === platformId)?.camera}
|
||||
key={`${courseKey}:${weekNumber}`}
|
||||
camera={curriculumWeek.detail.camera}
|
||||
dark={dark}
|
||||
onClose={() => setCameraOpen(false)}
|
||||
/>}
|
||||
|
||||
@@ -41,6 +41,7 @@ export type CurriculumWeek = {
|
||||
duration: string
|
||||
github: string
|
||||
detail: {
|
||||
camera?: { url: string; password: string } | null
|
||||
overview: string
|
||||
learningSteps?: LearningStep[]
|
||||
topicDetails: string[]
|
||||
|
||||
@@ -34,7 +34,6 @@ export type VehicleRuntimeProfile = {
|
||||
}
|
||||
|
||||
export type PlatformOption = {
|
||||
camera?: { url: string; password: string } | null
|
||||
id: string
|
||||
platformKey: string
|
||||
title: string
|
||||
|
||||
Reference in New Issue
Block a user