Skip to content

Commit

Permalink
adjust settings area styling (#140)
Browse files Browse the repository at this point in the history
* adjust settings area styling

* add privacy policy link
  • Loading branch information
aeddaqqa authored Jul 11, 2023
1 parent 575d60e commit c5cb31f
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/layout/RoutesSuite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import Settings from '../views/settings/index'
import SettingsLayout from './SettingsLayout'

export default function RoutesSuite() {

const navigate = useNavigate()
const activeNetwork = useAppSelector(getActiveNetwork)

Expand Down Expand Up @@ -74,7 +73,7 @@ export default function RoutesSuite() {
<Route path="/settings" element={<SettingsLayout />}>
<Route index element={<Settings />} />
<Route path="save-account" element={<Settings />} />
<Route path="create-multisig" element={<div>create multisig</div>} />
{/* <Route path="create-multisig" element={<div>create multisig</div>} /> */}
</Route>
</Route>
<Route path="/login" element={<LoginPage />} />
Expand Down
21 changes: 13 additions & 8 deletions src/layout/SettingsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,32 @@ const SettingsLayout = () => {
return (
<Box
sx={{
width: '100%',
height: '100%',
width: '100vw',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
}}
>
<Box
<Toolbar
sx={{
width: '100%',
borderBottom: '1px solid',
borderColor: 'rgba(145, 158, 171, 0.24)',
height: 'auto',
background: theme => theme.palette.background.paper,
flexGrow: 1,
p: '1.5rem',
zIndex: 9,
position: 'fixed',
top: '65px',
width: '100vw',
height: '61px',
display: 'flex',
justifyContent: 'center',
right: 0,
}}
>
<Toolbar sx={{ flexGrow: 1, maxWidth: '1536px', px: '0rem !important' }}>
<Links />
</Toolbar>
</Box>
<Links />
</Toolbar>
<Outlet />
</Box>
)
Expand Down
25 changes: 23 additions & 2 deletions src/views/login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ import { Link, useNavigate } from 'react-router-dom'
import { styled } from '@mui/material/styles'
import { mountAccounts } from 'wallet/mountAccounts'

const StyledExternalLink = styled('a')(({ theme }) => ({
color: theme.palette.text.primary,
textDecoration: 'underline !important',
mx: '.5rem',
}))

const StyledLink = styled(Link)(({ theme }) => ({
color: theme.palette.text.primary,
textDecoration: 'underline !important',
mx: '.5rem',
}))

const LoadAccountMenu = () => {
Expand Down Expand Up @@ -112,9 +119,23 @@ export default function LoginPage() {
</StyledLink>
<Typography variant="body2" color="text.secondary">
By using this application, you agree to the&nbsp;
<StyledLink to="/legal" style={{ textDecoration: 'none' }}>
<StyledExternalLink
href="/legal"
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
>
Terms of Use
</StyledLink>
</StyledExternalLink>
&nbsp;and&nbsp;
<StyledExternalLink
href="https://camino.network/privacy-policy/"
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: 'none' }}
>
Privacy Policy
</StyledExternalLink>
</Typography>
</Box>
</Paper>
Expand Down
41 changes: 35 additions & 6 deletions src/views/settings/Links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Tabs from '@mui/material/Tabs'
import Tab from '@mui/material/Tab'
import Box from '@mui/material/Box'
import { useNavigate } from 'react-router'
import { Typography } from '@mui/material'

function a11yProps(index: number) {
return {
Expand All @@ -21,36 +22,64 @@ export default function Links() {
display: 'flex',
cursor: 'pointer',
width: '100%',
height: '48px',
maxWidth: '1536px',
}}
>
<Tabs
value={value}
onChange={handleChange}
textColor="secondary"
sx={{ '& .MuiTabs-indicator': { display: 'none' } }}
sx={{ '& .MuiTabs-indicator': { display: 'none' }, height: '61px' }}
scrollButtons="auto"
variant="scrollable"
allowScrollButtonsMobile
>
<Tab
className="tab"
disableRipple
label="Save account"
label={
<Typography
sx={{
fontFamily: 'Inter',
fontSize: '14px',
fontStyle: 'normal',
fontWeight: '600',
lineHeight: '20px',
color: theme => theme.palette.text.primary,
}}
>
Save account
</Typography>
}
onClick={() => navigate('/settings')}
{...a11yProps(0)}
sx={{
alignItems: { xs: 'baseline', sm: 'self-start' },
display: 'flex',
padding: '10px 12px',
justifyContent: 'center',
alignItems: 'center',
position: 'relative',
height: '61px',
'&::after': {
content: '""',
display: value === 0 ? 'block' : 'none',
width: '100%',
height: '4px',
position: 'absolute',
bottom: '0px',
borderRadius: '4px 4px 0px 0px',
background: '#0085FF',
},
}}
/>
<Tab
{/* <Tab
className="tab"
disableRipple
label="Multisignature Wallet"
onClick={() => navigate('create-multisig')}
{...a11yProps(1)}
sx={{ alignItems: { xs: 'baseline', sm: 'self-start' } }}
/>
/> */}
</Tabs>
</Box>
)
Expand Down

0 comments on commit c5cb31f

Please sign in to comment.