Skip to content

Commit 72751c7

Browse files
authored
Merge pull request #829 from getmaxun/v1-dark-mode
wip: dark mode v1
2 parents 6145f97 + ded47fd commit 72751c7

File tree

16 files changed

+67
-1302
lines changed

16 files changed

+67
-1302
lines changed

src/components/action/ActionDescriptionBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const CustomBoxContainer = styled.div<CustomBoxContainerProps>`
1616
min-height: 100px;
1717
height: auto;
1818
border-radius: 5px;
19-
background-color: ${({ isDarkMode }) => (isDarkMode ? '#313438' : 'white')};
19+
background-color: ${({ isDarkMode }) => (isDarkMode ? '#1d1c1cff' : 'white')};
2020
color: ${({ isDarkMode }) => (isDarkMode ? 'white' : 'black')};
2121
margin: 80px 13px 25px 13px;
2222
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
@@ -31,7 +31,7 @@ const Triangle = styled.div<CustomBoxContainerProps>`
3131
height: 0;
3232
border-left: 20px solid transparent;
3333
border-right: 20px solid transparent;
34-
border-bottom: 20px solid ${({ isDarkMode }) => (isDarkMode ? '#313438' : 'white')};
34+
border-bottom: 20px solid ${({ isDarkMode }) => (isDarkMode ? '#1d1c1cff' : 'white')};
3535
`;
3636

3737
const Logo = styled.img`

src/components/browser/BrowserNavBar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ import { useThemeMode } from '../../context/theme-provider';
1414
const StyledNavBar = styled.div<{ browserWidth: number; isDarkMode: boolean }>`
1515
display: flex;
1616
padding: 12px 0px;
17-
background-color: ${({ isDarkMode }) => (isDarkMode ? '#2C2F33' : '#f6f6f6')};
17+
background-color: ${({ isDarkMode }) => (isDarkMode ? '#1d1c1cff' : '#f6f6f6')};
1818
width: ${({ browserWidth }) => browserWidth}px;
1919
border-radius: 0px 5px 0px 0px;
2020
`;
2121

2222
const IconButton = styled(NavBarButton) <{ mode: string }>`
23-
background-color: ${({ mode }) => (mode === 'dark' ? '#2C2F33' : '#f6f6f6')};
23+
background-color: ${({ mode }) => (mode === 'dark' ? '#1d1c1cff' : '#f6f6f6')};
2424
transition: background-color 0.3s ease, transform 0.1s ease;
2525
color: ${({ mode }) => (mode === 'dark' ? '#FFFFFF' : '#333')};
2626
cursor: pointer;
2727
&:hover {
28-
background-color: ${({ mode }) => (mode === 'dark' ? '#586069' : '#D0D0D0')};
28+
background-color: ${({ mode }) => (mode === 'dark' ? '#1d1c1cff' : '#D0D0D0')};
2929
}
3030
`;
3131

src/components/browser/BrowserTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const BrowserTabs = (
4949
background: 'white',
5050
borderRadius: '5px 5px 0px 0px',
5151
'&.Mui-selected': {
52-
backgroundColor: ` ${isDarkMode ? "#2a2a2a" : "#f5f5f5"}`,
52+
backgroundColor: ` ${isDarkMode ? "#121111ff" : "#f5f5f5"}`,
5353
color: '#ff00c3', // Slightly lighter text when selected
5454
},
5555
}}

src/components/dashboard/MainMenu.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import Tabs from '@mui/material/Tabs';
33
import Tab from '@mui/material/Tab';
44
import Box from '@mui/material/Box';
55
import { useNavigate, useLocation } from 'react-router-dom';
6-
import { Paper, Button, useTheme, Modal, Typography, Stack } from "@mui/material";
7-
import { AutoAwesome, VpnKey, Usb, CloudQueue, Description, Favorite, SlowMotionVideo, PlayArrow } from "@mui/icons-material";
6+
import { Paper, Button, useTheme, Modal, Typography, Stack, Divider } from "@mui/material";
7+
import { AutoAwesome, FormatListBulleted, VpnKey, Usb, CloudQueue, Description, Favorite, SlowMotionVideo } from "@mui/icons-material";
88
import { useTranslation } from 'react-i18next';
99
import { useGlobalInfoStore } from "../../context/globalInfo";
1010

@@ -116,7 +116,7 @@ export const MainMenu = ({ value = 'robots', handleChangeContent }: MainMenuProp
116116
disableRipple={true}
117117
sx={{ justifyContent: 'flex-start', textAlign: 'left', fontSize: 'medium' }} />
118118
</Tabs>
119-
<hr />
119+
<Divider sx={{ borderColor: theme.palette.mode === 'dark' ? "#080808ff" : "" }} />
120120
<Box sx={{ display: 'flex', flexDirection: 'column', textAlign: 'left' }}>
121121
<Button
122122
onClick={() => setDocModalOpen(true)}

src/components/dashboard/NavBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,11 @@ export const NavBar: React.FC<NavBarProps> = ({
598598

599599
const NavBarWrapper = styled.div<{ mode: 'light' | 'dark' }>`
600600
grid-area: navbar;
601-
background-color: ${({ mode }) => (mode === 'dark' ? '#1e2124' : '#ffffff')};
601+
background-color: ${({ mode }) => (mode === 'dark' ? '#000000ff' : '#ffffff')};
602602
padding: 5px;
603603
display: flex;
604604
justify-content: space-between;
605-
border-bottom: 1px solid ${({ mode }) => (mode === 'dark' ? '#333' : '#e0e0e0')};
605+
border-bottom: 1px solid ${({ mode }) => (mode === 'dark' ? '#000000ff' : '#e0e0e0')};
606606
`;
607607

608608
const ProjectName = styled.b<{ mode: 'light' | 'dark' }>`

src/components/recorder/RightSidePanel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
10591059

10601060
<Box>
10611061
{browserSteps.map(step => (
1062-
<Box key={step.id} onMouseEnter={() => handleMouseEnter(step.id)} onMouseLeave={() => handleMouseLeave(step.id)} sx={{ padding: '10px', margin: '11px', borderRadius: '5px', position: 'relative', background: isDarkMode ? "#1E2124" : 'white', color: isDarkMode ? "white" : 'black' }}>
1062+
<Box key={step.id} onMouseEnter={() => handleMouseEnter(step.id)} onMouseLeave={() => handleMouseLeave(step.id)} sx={{ padding: '10px', margin: '11px', borderRadius: '5px', position: 'relative', background: isDarkMode ? "#1d1c1cff" : 'white', color: isDarkMode ? "white" : 'black' }}>
10631063
{
10641064
step.type === 'text' && (
10651065
<>
@@ -1080,7 +1080,6 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
10801080
</InputAdornment>
10811081
)
10821082
}}
1083-
sx={{ background: isDarkMode ? "#1E2124" : 'white', color: isDarkMode ? "white" : 'black' }}
10841083
/>
10851084
<TextField
10861085
label={t('right_panel.fields.data')}

src/components/robot/RecordingsTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ export const RecordingsTable = ({
533533
<>
534534
<TableContainer component={Paper} sx={{ width: '100%', overflow: 'hidden', marginTop: '15px' }}>
535535
<Table stickyHeader aria-label="sticky table">
536-
<TableHead>
536+
{/* <TableHead> */}
537537
<TableRow>
538538
{columns.map((column) => (
539539
<MemoizedTableCell
@@ -544,7 +544,7 @@ export const RecordingsTable = ({
544544
</MemoizedTableCell>
545545
))}
546546
</TableRow>
547-
</TableHead>
547+
{/* </TableHead> */}
548548
<TableBody>
549549
{visibleRows.map((row) => (
550550
<TableRowMemoized

src/components/robot/RobotDuplicate.tsx

Lines changed: 0 additions & 172 deletions
This file was deleted.

0 commit comments

Comments
 (0)