feat: revamp cap text output preview ui

This commit is contained in:
Rohit
2025-07-07 22:50:34 +05:30
parent e996291ebb
commit 54a850b0f3

View File

@@ -379,49 +379,63 @@ export const InterpretationLog: React.FC<InterpretationLogProps> = ({ isOpen, se
)} )}
{(activeTab === availableTabs.findIndex(tab => tab.id === 'captureText') || singleContentType === 'captureText') && captureTextData.length > 0 && ( {(activeTab === availableTabs.findIndex(tab => tab.id === 'captureText') || singleContentType === 'captureText') && captureTextData.length > 0 && (
<TableContainer component={Paper} sx={{ boxShadow: 'none', borderRadius: 0 }}> <Box sx={{ p: 2 }}>
<Table> <TableContainer component={Paper} sx={{ boxShadow: 'none', borderRadius: 0 }}>
<TableHead> <Table>
<TableRow> <TableHead>
{getCaptureTextColumns.map((column) => ( <TableRow>
<TableCell <TableCell
key={column}
sx={{ sx={{
borderBottom: '1px solid', borderBottom: '1px solid',
borderColor: darkMode ? '#3a4453' : '#dee2e6', borderColor: darkMode ? '#3a4453' : '#dee2e6',
backgroundColor: darkMode ? '#2a3441' : '#f8f9fa' backgroundColor: darkMode ? '#2a3441' : '#f8f9fa',
}} }}
> >
{column} Label
</TableCell> </TableCell>
))} <TableCell
</TableRow> sx={{
</TableHead> borderBottom: '1px solid',
<TableBody> borderColor: darkMode ? '#3a4453' : '#dee2e6',
{captureTextData.map((row, idx) => ( backgroundColor: darkMode ? '#2a3441' : '#f8f9fa',
<TableRow }}
key={idx} >
sx={{ Value
borderBottom: '1px solid', </TableCell>
borderColor: darkMode ? '#3a4453' : '#dee2e6' </TableRow>
}} </TableHead>
> <TableBody>
{getCaptureTextColumns.map((column) => ( {getCaptureTextColumns.map((column, index) => (
<TableRow
key={column}
sx={{
borderBottom: index < getCaptureTextColumns.length - 1 ? '1px solid' : 'none',
borderColor: darkMode ? '#3a4453' : '#dee2e6'
}}
>
<TableCell
sx={{
borderBottom: 'none',
py: 2,
fontWeight: 500
}}
>
{column}
</TableCell>
<TableCell <TableCell
key={column}
sx={{ sx={{
borderBottom: 'none', borderBottom: 'none',
py: 2 py: 2
}} }}
> >
{row[column]} {captureTextData[0][column]}
</TableCell> </TableCell>
))} </TableRow>
</TableRow> ))}
))} </TableBody>
</TableBody> </Table>
</Table> </TableContainer>
</TableContainer> </Box>
)} )}
</Box> </Box>
</> </>