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 && (
<Box sx={{ p: 2 }}>
<TableContainer component={Paper} sx={{ boxShadow: 'none', borderRadius: 0 }}> <TableContainer component={Paper} sx={{ boxShadow: 'none', borderRadius: 0 }}>
<Table> <Table>
<TableHead> <TableHead>
<TableRow> <TableRow>
{getCaptureTextColumns.map((column) => (
<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',
}}
>
Label
</TableCell>
<TableCell
sx={{
borderBottom: '1px solid',
borderColor: darkMode ? '#3a4453' : '#dee2e6',
backgroundColor: darkMode ? '#2a3441' : '#f8f9fa',
}}
>
Value
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{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} {column}
</TableCell> </TableCell>
))}
</TableRow>
</TableHead>
<TableBody>
{captureTextData.map((row, idx) => (
<TableRow
key={idx}
sx={{
borderBottom: '1px solid',
borderColor: darkMode ? '#3a4453' : '#dee2e6'
}}
>
{getCaptureTextColumns.map((column) => (
<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>
</> </>