Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

poc processing panel

jonmatthis53de774dcfeb
diff --git a/freemocap-ui/src/components/processing-pipeline-panel/ProcessingPipelinePanel.tsx b/freemocap-ui/src/components/processing-pipeline-panel/ProcessingPipelinePanel.tsx
new file mode 100644
index 00000000..66813ec3
--- /dev/null
+++ b/freemocap-ui/src/components/processing-pipeline-panel/ProcessingPipelinePanel.tsx
@@ -0,0 +1,86 @@
+// skellycam-ui/src/components/available-cameras-panel/AvailableCamerasView.tsx
+import {Accordion, AccordionDetails, Box, Paper, Stack, Typography, useTheme,} from "@mui/material";
+import * as React from "react";
+import AccordionSummary from "@mui/material/AccordionSummary";
+import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
+import {CameraConfigPanel} from "@/components/available-cameras-panel/CameraConfigPanel";
+import {CameraListItem} from "@/components/available-cameras-panel/CameraListItem";
+import {useAppDispatch} from "@/store/AppStateStore";
+import {ConnectToCamerasButton} from "@/components/available-cameras-panel/ConnectToCamerasButton";
+import {CloseCamerasButton} from "@/components/available-cameras-panel/CloseCamerasButton";
+import {ApplyCameraConfigsButton} from "@/components/available-cameras-panel/ApplyCameraConfigsButton";
+import {PauseUnpauseButton} from "../PauseUnpauseButton";
+import LanIcon from '@mui/icons-material/Lan';
+
+export const ProcessingPipelinePanel = () => {
+ const theme = useTheme();
+ const dispatch = useAppDispatch();
+
+
+
+
+ return (
+ <Accordion
+ defaultExpanded
+ sx={{
+ borderRadius: 2,
+ "&:before": {display: "none"},
+ boxShadow: theme.shadows[3],
+ justifyContent: "left",
+ }}
+ >
+ <Box
+ sx={{
+ display: "flex",
+ alignItems: "center",
+ backgroundColor: theme.palette.primary.main,
+ borderTopLeftRadius: 8,
+ borderBottomLeftRadius: 8,
+ }}
+ >
+ <AccordionSummary
+ expandIcon={
+ <ExpandMoreIcon
+ sx={{color: theme.palette.primary.contrastText}}
+ />
+ }
+ sx={{
+ flex: 1,
+ color: theme.palette.primary.contrastText,
+ "&:hover": {
+ backgroundColor: theme.palette.primary.light,
+ },
+ }}
+ >
+ <Stack direction="row" alignItems="center" spacing={1}>
+ <LanIcon sx={{ transform: 'scaleY(-1.3) scaleX(1.25)' }} />
+ <Typography variant="subtitle1" fontWeight="medium">
+ Processing Pipeline
+ </Typography>
+ </Stack>
+ </AccordionSummary>
+
+ </Box>
+
+ <AccordionDetails sx={{bgcolor: "background.default"}}>
+ <Paper
+ elevation={0}
+ sx={{
+ borderRadius: 2,
+ overflow: "hidden",
+ }}
+ >
+ <Box
+ sx={{
+ p: 2,
+ }}
+ >
+ <Typography variant="body2" color="textSecondary">
+ Processing pipeline steps will be listed here.
+ </Typography>
+ </Box>
+ </Paper>
+ </AccordionDetails>
+ </Accordion>
+ );
+};
diff --git a/freemocap-ui/src/components/recording-info-panel/RecordingInfoPanel.tsx b/freemocap-ui/src/components/recording-info-panel/RecordingInfoPanel.tsx
index 6b868846..c46e98a0 100644
--- a/freemocap-ui/src/components/recording-info-panel/RecordingInfoPanel.tsx
+++ b/freemocap-ui/src/components/recording-info-panel/RecordingInfoPanel.tsx
@@ -13,7 +13,6 @@ import {
useTheme
} from '@mui/material';
import SettingsIcon from '@mui/icons-material/Settings';
-import VideocamIcon from '@mui/icons-material/Videocam';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import {useAppDispatch, useAppSelector} from "@/store/AppStateStore";
import {
@@ -34,6 +33,7 @@ import {
import {RecordingNamePreview} from "@/components/recording-info-panel/recording-subcomponents/RecordingNamePreview";
import {startRecording, stopRecording} from "@/store/thunks/start-stop-recording-thunks";
import {setRecordingInfo} from "@/store/slices/recordingInfoSlice";
+import VideoLibraryIcon from '@mui/icons-material/VideoLibrary';
export const RecordingInfoPanel: React.FC = () => {
const theme = useTheme();
@@ -81,7 +81,7 @@ useEffect(() => {
const getTimestampString = (): string => {
const now = new Date();
-
+
// Format date in local time with timezone info
const dateOptions: Intl.DateTimeFormatOptions = {
year: 'numeric',
@@ -93,20 +93,20 @@ useEffect(() => {
hour12: false,
timeZoneName: 'shortOffset'
};
-
+
// Get formatted parts
const formatter = new Intl.DateTimeFormat('en-US', dateOptions);
const parts = formatter.formatToParts(now);
-
+
// Create a map of the parts for easy access
const partMap: Record<string, string> = {};
parts.forEach(part => {
partMap[part.type] = part.value;
});
-
+
// Build the timestamp string in a filename-friendly format
const timestamp = `${partMap.year}-${partMap.month}-${partMap.day}_${partMap.hour}-${partMap.minute}-${partMap.second}_${partMap.timeZoneName.replace(':', '')}`;
-
+
return timestamp;
};
@@ -192,7 +192,7 @@ useEffect(() => {
}}
>
<Stack direction="row" alignItems="center" spacing={1}>
- <VideocamIcon />
+ <VideoLibraryIcon />
<Typography variant="subtitle1" fontWeight="medium">
{recordingInfo.isRecording ? 'Recording in Progress...' : 'Record Videos'}
</Typography>
diff --git a/freemocap-ui/src/components/ui-components/LeftSidePanelContent.tsx b/freemocap-ui/src/components/ui-components/LeftSidePanelContent.tsx
index 8c3eb921..85c518d8 100644
--- a/freemocap-ui/src/components/ui-components/LeftSidePanelContent.tsx
+++ b/freemocap-ui/src/components/ui-components/LeftSidePanelContent.tsx
@@ -12,6 +12,7 @@ import VideocamIcon from '@mui/icons-material/Videocam';
import VideoLibraryIcon from '@mui/icons-material/VideoLibrary';
import DirectionsRunIcon from '@mui/icons-material/DirectionsRun';
import {VideoFolderPanel} from "@/components/video-folder-panel/VideoFolderPanel";
+import {ProcessingPipelinePanel} from "@/components/processing-pipeline-panel/ProcessingPipelinePanel";
// Extract reusable scrollbar styles
const scrollbarStyles = {
'&::-webkit-scrollbar': {
@@ -127,10 +128,11 @@ export const LeftSidePanelContent = () => {
overflowX: 'hidden',
...scrollbarStyles
}}>
- <RecordingInfoPanel/>
<AvailableCamerasPanel/>
- </Box>
+ <RecordingInfoPanel/>
+ <ProcessingPipelinePanel/>
+ </Box>
{location.pathname === '/videos' && (
<Box sx={{
@@ -140,8 +142,11 @@ export const LeftSidePanelContent = () => {
...scrollbarStyles
}}>
<VideoFolderPanel/>
+ <ProcessingPipelinePanel/>
+
</Box>
)}
+
</Box>
);
}