add dark mode changes

This commit is contained in:
Henry
2023-11-16 23:23:41 +00:00
parent a7b34848cd
commit 0cc68e5625
3 changed files with 20 additions and 13 deletions
@@ -43,7 +43,6 @@ const StyledMenu = styled((props) => (
borderRadius: 6, borderRadius: 6,
marginTop: theme.spacing(1), marginTop: theme.spacing(1),
minWidth: 180, minWidth: 180,
color: theme.palette.mode === 'light' ? 'rgb(55, 65, 81)' : theme.palette.grey[300],
boxShadow: boxShadow:
'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px', 'rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px',
'& .MuiMenu-list': { '& .MuiMenu-list': {
@@ -52,7 +52,7 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
Category Category
</StyledTableCell> </StyledTableCell>
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '30%' }} key='2'> <StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '30%' }} key='2'>
Nodes (Showing first 5) Nodes
</StyledTableCell> </StyledTableCell>
<StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '15%' }} key='3'> <StyledTableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} style={{ width: '15%' }} key='3'>
Last Modified Date Last Modified Date
@@ -134,9 +134,6 @@ export const FlowListTable = ({ data, images, filterFunction, updateFlowsApi })
</TableCell> </TableCell>
<TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='4'> <TableCell sx={{ display: { xs: 'none', sm: 'table-cell' } }} key='4'>
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={1} justifyContent='center' alignItems='center'> <Stack direction={{ xs: 'column', sm: 'row' }} spacing={1} justifyContent='center' alignItems='center'>
{/*<Button sx={{ marginRight: '10px' }} onClick={() => goToCanvas(row)}>*/}
{/* OPEN*/}
{/*</Button>*/}
<FlowListMenu chatflow={row} updateFlowsApi={updateFlowsApi} /> <FlowListMenu chatflow={row} updateFlowsApi={updateFlowsApi} />
</Stack> </Stack>
</TableCell> </TableCell>
+19 -8
View File
@@ -23,7 +23,7 @@ import useApi from 'hooks/useApi'
import { baseURL } from 'store/constant' import { baseURL } from 'store/constant'
// icons // icons
import { IconPlus, IconSearch, IconLayoutCards, IconLayoutColumns } from '@tabler/icons' import { IconPlus, IconSearch, IconLayoutGrid, IconList } from '@tabler/icons'
import * as React from 'react' import * as React from 'react'
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup' import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'
import { FlowListTable } from '../../ui-component/table/FlowListTable' import { FlowListTable } from '../../ui-component/table/FlowListTable'
@@ -138,7 +138,7 @@ const Chatflows = () => {
<h1>Chatflows</h1> <h1>Chatflows</h1>
<TextField <TextField
size='small' size='small'
sx={{ display: { xs: 'none', sm: 'block' }, marginLeft: 3 }} sx={{ display: { xs: 'none', sm: 'block' }, ml: 3 }}
variant='outlined' variant='outlined'
placeholder='Search name or category' placeholder='Search name or category'
onChange={onSearchChange} onChange={onSearchChange}
@@ -151,19 +151,30 @@ const Chatflows = () => {
}} }}
/> />
<Box sx={{ flexGrow: 1 }} /> <Box sx={{ flexGrow: 1 }} />
<ButtonGroup disableElevation variant='contained' aria-label='outlined primary button group'> <ButtonGroup sx={{ maxHeight: 40 }} disableElevation variant='contained' aria-label='outlined primary button group'>
<ButtonGroup <ButtonGroup
sx={{ display: { xs: 'none', sm: 'block' } }} sx={{ display: { xs: 'none', sm: 'block' } }}
disableElevation disableElevation
variant='contained' variant='contained'
aria-label='outlined primary button group' aria-label='outlined primary button group'
> >
<ToggleButtonGroup value={view} color='primary' exclusive onChange={handleChange}> <ToggleButtonGroup sx={{ maxHeight: 40 }} value={view} color='primary' exclusive onChange={handleChange}>
<ToggleButton variant='contained' value='card' selectedColor='#00abc0'> <ToggleButton
<IconLayoutCards /> sx={{ color: theme?.customization?.isDarkMode ? 'white' : 'inherit' }}
variant='contained'
value='card'
title='Card View'
selectedColor='#00abc0'
>
<IconLayoutGrid />
</ToggleButton> </ToggleButton>
<ToggleButton variant='contained' value='list'> <ToggleButton
<IconLayoutColumns /> sx={{ color: theme?.customization?.isDarkMode ? 'white' : 'inherit' }}
variant='contained'
value='list'
title='List View'
>
<IconList />
</ToggleButton> </ToggleButton>
</ToggleButtonGroup> </ToggleButtonGroup>
</ButtonGroup> </ButtonGroup>