diff --git a/src/App-styles.ts b/src/App-styles.ts deleted file mode 100644 index 9774f06..0000000 --- a/src/App-styles.ts +++ /dev/null @@ -1,260 +0,0 @@ -import { Typography, Box, TextField, InputLabel } from '@mui/material'; -import { styled } from '@mui/system'; - -export const AppContainer = styled(Box)(({ theme }) => ({ - display: 'flex', - alignItems: 'center', - flexDirection: 'column', - width: '100vw', - height: '100vh', - radius: '15px', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, - overflow: 'hidden', -})); - -export const AuthenticatedContainer = styled(Box)(({ theme }) => ({ - display: 'flex', - width: '100%', - height: '100%', - justifyContent: 'space-between', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, -})); - -export const AuthenticatedContainerInnerLeft = styled(Box)(({ theme }) => ({ - display: 'flex', - alignItems: 'center', - flexDirection: 'column', - height: '100%', - width: '100%', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, -})); - -export const AuthenticatedContainerInnerRight = styled(Box)(({ theme }) => ({ - display: 'flex', - alignItems: 'center', - flexDirection: 'column', - width: '60px', - height: '100%', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, -})); - -export const AuthenticatedContainerInnerTop = styled(Box)(({ theme }) => ({ - display: 'flex', - alignItems: 'center', - justifyContent: 'flex-start', - width: '100%px', - height: '60px', - padding: '20px', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, -})); - -export const TextP = styled(Typography)(({ theme }) => ({ - fontSize: '13px', - fontWeight: 600, - fontFamily: 'Inter', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, -})); - -export const TextItalic = styled('span')(({ theme }) => ({ - fontSize: '13px', - fontWeight: 600, - fontFamily: 'Inter', - fontStyle: 'italic', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, -})); - -export const TextSpan = styled('span')(({ theme }) => ({ - fontSize: '13px', - fontFamily: 'Inter', - fontWeight: 800, - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, -})); - -export const AddressBox = styled(Box)(({ theme }) => ({ - display: 'flex', - border: `1px solid ${ - theme.palette.mode === 'dark' - ? 'rgba(255, 255, 255, 0.5)' - : 'rgba(0, 0, 0, 0.3)' - }`, - justifyContent: 'space-between', - alignItems: 'center', - width: 'auto', - height: '25px', - padding: '5px 15px', - gap: '5px', - borderRadius: '100px', - fontFamily: 'Inter', - fontSize: '12px', - fontWeight: 600, - lineHeight: '14.52px', - textAlign: 'left', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, - cursor: 'pointer', - transition: 'all 0.2s', - - '&:hover': { - backgroundColor: - theme.palette.mode === 'dark' - ? 'rgba(41, 41, 43, 1)' - : 'rgba(240, 240, 240, 1)', - color: theme.palette.mode === 'dark' ? '#fff' : '#000', - - 'svg path': { - fill: theme.palette.mode === 'dark' ? '#fff' : '#000', - }, - }, -})); - -export const CustomButton = styled(Box)(({ theme }) => ({ - boxSizing: 'border-box', - padding: '15px 20px', - gap: '10px', - - border: `0.5px solid ${ - theme.palette.mode === 'dark' - ? 'rgba(255, 255, 255, 0.5)' - : 'rgba(0, 0, 0, 0.3)' - }`, - filter: 'drop-shadow(1px 4px 10.5px rgba(0, 0, 0, 0.3))', - borderRadius: '5px', - - display: 'inline-flex', - justifyContent: 'center', - alignItems: 'center', - - width: 'fit-content', - minWidth: '160px', - cursor: 'pointer', - transition: 'all 0.2s', - - fontWeight: 600, - fontFamily: 'Inter', - textAlign: 'center', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, - - '&:hover': { - backgroundColor: - theme.palette.mode === 'dark' - ? 'rgba(41, 41, 43, 1)' - : 'rgba(230, 230, 230, 1)', - color: '#fff', - - 'svg path': { - fill: '#fff', - }, - }, -})); - -interface CustomButtonProps { - bgColor?: string; - color?: string; -} - -export const CustomButtonAccept = styled(Box)( - ({ bgColor, color, theme }) => ({ - boxSizing: 'border-box', - padding: '15px 20px', - gap: '10px', - border: `0.5px solid ${ - theme.palette.mode === 'dark' - ? 'rgba(255, 255, 255, 0.5)' - : 'rgba(0, 0, 0, 0.3)' - }`, - filter: 'drop-shadow(1px 4px 10.5px rgba(0,0,0,0.3))', - borderRadius: 5, - display: 'inline-flex', - justifyContent: 'center', - alignItems: 'center', - width: 'fit-content', - transition: 'all 0.2s', - minWidth: 160, - cursor: 'pointer', - fontWeight: 600, - fontFamily: 'Inter', - textAlign: 'center', - opacity: 0.7, - - // Color and backgroundColor with fallbacks - backgroundColor: - bgColor || (theme.palette.mode === 'dark' ? '#1d1d1d' : '#f5f5f5'), - color: color || (theme.palette.mode === 'dark' ? '#fff' : '#000'), - - '&:hover': { - opacity: 1, - backgroundColor: - bgColor || - (theme.palette.mode === 'dark' - ? 'rgba(41, 41, 43, 1)' - : 'rgba(230, 230, 230, 1)'), - color: color || '#fff', - svg: { - path: { - fill: color || '#fff', - }, - }, - }, - }) -); - -export const CustomInput = styled(TextField)(({ theme }) => ({ - width: '183px', // Adjust the width as needed - borderRadius: '5px', - // backgroundColor: "rgba(30, 30, 32, 1)", - outline: 'none', - backgroundColor: theme.palette.background.default, - color: theme.palette.text.primary, - input: { - fontSize: 10, - fontFamily: 'Inter', - fontWeight: 400, - color: 'white', - '&::placeholder': { - fontSize: 16, - color: 'rgba(255, 255, 255, 0.2)', - }, - outline: 'none', - padding: '10px', - }, - '& .MuiOutlinedInput-root': { - '& fieldset': { - border: '0.5px solid rgba(255, 255, 255, 0.5)', - }, - '&:hover fieldset': { - border: '0.5px solid rgba(255, 255, 255, 0.5)', - }, - '&.Mui-focused fieldset': { - border: '0.5px solid rgba(255, 255, 255, 0.5)', - }, - }, - '& .MuiInput-underline:before': { - borderBottom: 'none', - }, - '& .MuiInput-underline:hover:not(.Mui-disabled):before': { - borderBottom: 'none', - }, - '& .MuiInput-underline:after': { - borderBottom: 'none', - }, -})); - -export const CustomLabel = styled(InputLabel)(({ theme }) => ({ - fontWeight: 400, - fontFamily: 'Inter', - fontSize: '10px', - lineHeight: '12px', - color: - theme.palette.mode === 'dark' - ? 'rgba(255, 255, 255, 0.5)' - : 'rgba(0, 0, 0, 0.5)', -})); diff --git a/src/App.tsx b/src/App.tsx index 52d322c..aa4c016 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -34,8 +34,8 @@ import ltcLogo from './assets/ltc.png'; import PersonSearchIcon from '@mui/icons-material/PersonSearch'; import qortLogo from './assets/qort.png'; import { CopyToClipboard } from 'react-copy-to-clipboard'; -import Download from './assets/svgs/Download.svg'; -import Logout from './assets/svgs/Logout.svg'; +import { Download } from './assets/svgs/Download.tsx'; +import { Logout } from './assets/svgs/Logout.tsx'; import { Return } from './assets/svgs/Return.tsx'; import WarningIcon from '@mui/icons-material/Warning'; import Success from './assets/svgs/Success.svg'; @@ -45,7 +45,6 @@ import AccountBalanceWalletIcon from '@mui/icons-material/AccountBalanceWallet'; import PriorityHighIcon from '@mui/icons-material/PriorityHigh'; import { createAccount, - generateRandomSentence, saveFileToDisk, saveSeedPhraseToDisk, } from './utils/generateWallet/generateWallet'; @@ -61,16 +60,14 @@ import { AuthenticatedContainerInnerRight, CustomButton, CustomButtonAccept, - CustomInput, CustomLabel, TextItalic, TextP, TextSpan, -} from './App-styles'; +} from './styles/App-styles.ts'; import { Spacer } from './common/Spacer'; import { Loader } from './components/Loader'; import { PasswordField, ErrorText } from './components'; -import { ChatGroup } from './components/Chat/ChatGroup'; import { Group, requestQueueMemberNames } from './components/Group/Group'; import { TaskManager } from './components/TaskManager/TaskManger'; import { useModal } from './common/useModal'; @@ -149,7 +146,7 @@ import { BuyQortInformation } from './components/BuyQortInformation'; import { QortPayment } from './components/QortPayment'; import { GeneralNotifications } from './components/GeneralNotifications'; import { PdfViewer } from './common/PdfViewer'; -import ThemeSelector from './styles/ThemeSelector.tsx'; +import ThemeSelector from './components/Theme/ThemeSelector.tsx'; type extStates = | 'not-authenticated' @@ -1652,16 +1649,16 @@ function App() { }, }} > - { - logoutFunc(); - setIsOpenDrawerProfile(false); - }} + { + logoutFunc(); + setIsOpenDrawerProfile(false); }} /> @@ -2020,15 +2017,16 @@ function App() { }, }} > - { - setExtstate('download-wallet'); - setIsOpenDrawerProfile(false); - }} - src={Download} + { + setExtstate('download-wallet'); + setIsOpenDrawerProfile(false); }} /> @@ -2155,18 +2153,6 @@ function App() { maxWidth: '700px', }} > - {/* */} '; - inherits: true; - initial-value: transparent; -} - -.scrollable-container { - transition: --var1 0.4s; -} - -.scrollable-container:hover { - --var1: #444444; -} - -.scrollable-container::-webkit-scrollbar-thumb { - background-color: var(--var1); - border-radius: 8px; - background-clip: content-box; - border: 4px solid transparent; - opacity: 0; -} - -/* Mobile-specific scrollbar styles */ -@media only screen and (max-width: 600px) { - ::-webkit-scrollbar { - width: 8px; /* Narrower scrollbar width on mobile */ - height: 6px; /* Narrower scrollbar height on mobile */ - } - - ::-webkit-scrollbar-thumb { - border-radius: 4px; /* Adjust the radius for a narrower thumb */ - border: 2px solid transparent; /* Narrower thumb border */ - } -} - -.group-list::-webkit-scrollbar-thumb:hover { - background-color: whitesmoke; -} - -html, -body { - overscroll-behavior: none !important; -} - -.swiper { - width: 100%; -} diff --git a/src/main.tsx b/src/main.tsx index 791c63d..3f04c89 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,11 +1,10 @@ -import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App.tsx'; -import './index.css'; +import '../src/styles/index.css'; import './messaging/messagesToBackground'; import { MessageQueueProvider } from './MessageQueueContext.tsx'; import { RecoilRoot } from 'recoil'; -import { ThemeProvider } from './styles/ThemeContext.tsx'; +import { ThemeProvider } from './components/Theme/ThemeContext.tsx'; ReactDOM.createRoot(document.getElementById('root')!).render( <> diff --git a/src/styles/theme.ts b/src/styles/theme.ts index 1ae2ea8..ef414c5 100644 --- a/src/styles/theme.ts +++ b/src/styles/theme.ts @@ -102,7 +102,6 @@ const lightTheme = createTheme({ secondary: '#525252', }, }, - components: { MuiCard: { styleOverrides: {