Skip to content

Commit ae114e6

Browse files
Merge pull request #498 from mysteriumnetwork/features/clickboarding
Style facelift
2 parents 8b17818 + 386cfa1 commit ae114e6

File tree

2 files changed

+39
-8
lines changed

2 files changed

+39
-8
lines changed

src/Pages/Authenticated/Onboarding/Password/Heading.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ const Comment = styled.p`
3838
`
3939

4040
type Props = {
41-
title: string
41+
title?: string
4242
titleCenter?: boolean
4343
description: ReactNode
4444
}
4545

4646
export const Heading = ({ title, description, titleCenter }: Props) => {
4747
return (
4848
<Header>
49-
<Title $centered={titleCenter}>{title}</Title>
49+
{title && <Title $centered={titleCenter}>{title}</Title>}
5050
<Comment>{description}</Comment>
5151
</Header>
5252
)

src/Pages/Authenticated/Onboarding/PasswordChangePage.tsx

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import { WelcomePage } from './WelcomePage'
2727
import { Heading } from './Password/Heading'
2828
import { urls } from '../../../commons/urls'
2929
import routes from '../../../constants/routes'
30+
import { media } from '../../../commons/media'
31+
import { useMediaQuery } from 'react-responsive'
3032

33+
const { isMobileQuery } = media
3134
const { api } = tequila
3235

3336
const Lock = styled(LockIcon)`
@@ -128,8 +131,6 @@ const Section = styled.div`
128131
display: flex;
129132
flex-direction: column;
130133
131-
justify-content: center;
132-
133134
gap: 10px;
134135
height: 100%;
135136
max-width: 800px;
@@ -162,6 +163,30 @@ const useQuery = () => {
162163
return React.useMemo(() => new URLSearchParams(search), [search])
163164
}
164165

166+
const SectionTitle = styled.div`
167+
font-size: ${({ theme }) => theme.common.fontSizeHumongous};
168+
font-weight: 700;
169+
color: ${({ theme }) => theme.text.colorSecondary};
170+
margin-bottom: 30px;
171+
@media ${devices.tablet} {
172+
display: none;
173+
}
174+
`
175+
176+
const SectionTitleWithŽygisLogic = styled(SectionTitle)`
177+
width: 100%;
178+
text-align: center;
179+
`
180+
181+
const SS = styled.div`
182+
width: 100%;
183+
display: flex;
184+
text-align: center;
185+
@media ${devices.tablet} {
186+
text-align: left;
187+
}
188+
`
189+
165190
interface State {
166191
password: string
167192
confirmPassword: string
@@ -183,7 +208,7 @@ const INITIAL_STATE: State = {
183208
export const PasswordChangePage = () => {
184209
const query = useQuery()
185210
const mmnApiKey = query.get('mmnApiKey')
186-
211+
const isMobile = useMediaQuery(isMobileQuery)
187212
const [state, setState] = useState({
188213
...INITIAL_STATE,
189214
claim: mmnApiKey !== null,
@@ -271,6 +296,7 @@ export const PasswordChangePage = () => {
271296
</Logo>
272297
<Wrapper>
273298
<Section>
299+
<SectionTitle>Standard Onboarding</SectionTitle>
274300
<Heading
275301
title="Create Password"
276302
description="Please set your Node UI password. Your password must contain at least 10 characters."
@@ -333,10 +359,15 @@ export const PasswordChangePage = () => {
333359
</Section>
334360
<SectionSeparator />
335361
<Section>
362+
<SectionTitleWithŽygisLogic>Quick Onboarding</SectionTitleWithŽygisLogic>
336363
<Heading
337-
title="Connect Your Node"
338-
titleCenter
339-
description="The easy way to set up and start running your node. It will guide you through the onboarding, node claiming, and password-setting process with just a few clicks of a button."
364+
title={isMobile ? 'Connect Your Node' : undefined}
365+
description={
366+
<SS>
367+
The easy way to set up and start running your node. It will guide you through the onboarding, node
368+
claiming, and password-setting process with just a few clicks of a button.
369+
</SS>
370+
}
340371
/>
341372
<ButtonRow>
342373
<Button type="button" size="large" rounded label="Start" onClick={getLinkAndRedirect} />

0 commit comments

Comments
 (0)