Skip to content

Commit 2ee65a9

Browse files
authored
Stay Aligned UI Improvements (#1632)
1 parent d986a5e commit 2ee65a9

File tree

2 files changed

+50
-31
lines changed

2 files changed

+50
-31
lines changed

gui/public/i18n/en/translation.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ onboarding-stay_aligned-put_trackers_on-title = Put on your trackers
12771277
onboarding-stay_aligned-put_trackers_on-description = To save your resting poses, we'll use the trackers you just assigned. Put on all your trackers, you can see which are which in the figure to the right.
12781278
onboarding-stay_aligned-put_trackers_on-trackers_warning = You have fewer than 5 trackers currently connected and assigned! This is the minimum amount of trackers required for Stay Aligned to function properly.
12791279
onboarding-stay_aligned-put_trackers_on-next = I have all my trackers on
1280-
onboarding-stay_aligned-verify_mounting-title = Check your Mounting
1280+
onboarding-stay_aligned-verify_mounting-title = Mounting Reset
12811281
onboarding-stay_aligned-verify_mounting-step-0 = Stay Aligned requires good mounting. Otherwise, you won't get a good experience with Stay Aligned.
12821282
onboarding-stay_aligned-verify_mounting-step-1 = 1. Move around while standing.
12831283
onboarding-stay_aligned-verify_mounting-step-2 = 2. Sit down and move your legs and feet.

gui/src/components/onboarding/pages/stay-aligned/stay-aligned-steps/VerifyMounting.tsx

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,63 @@
11
import { Button } from '@/components/commons/Button';
22
import { Typography } from '@/components/commons/Typography';
3+
import { ResetType } from 'solarxr-protocol';
4+
import { ResetButton } from '@/components/home/ResetButton';
5+
import { useLocalization } from '@fluent/react';
6+
import { useBreakpoint } from '@/hooks/breakpoint';
37
import { VerticalStepComponentProps } from '@/components/commons/VerticalStepper';
4-
import { Localized } from '@fluent/react';
58

69
export function VerifyMountingStep({
710
nextStep,
811
prevStep,
912
}: VerticalStepComponentProps) {
13+
const { isMobile } = useBreakpoint('mobile');
14+
const { l10n } = useLocalization();
1015
return (
11-
<div className="flex flex-grow flex-col gap-4 py-2">
12-
<div className="flex flex-col gap-2">
13-
<Localized id="onboarding-stay_aligned-verify_mounting-step-0">
14-
<Typography />
15-
</Localized>
16-
<Localized id="onboarding-stay_aligned-verify_mounting-step-1">
17-
<Typography />
18-
</Localized>
19-
<Localized id="onboarding-stay_aligned-verify_mounting-step-2">
20-
<Typography />
21-
</Localized>
22-
<Localized id="onboarding-stay_aligned-verify_mounting-step-3">
23-
<Typography />
24-
</Localized>
25-
</div>
26-
<div className="flex gap-3 justify-between">
27-
<Localized id="onboarding-stay_aligned-previous_step">
28-
<Button variant="secondary" onClick={prevStep} />
29-
</Localized>
16+
<div className="flex flex-col flex-grow justify-between py-2 gap-2">
17+
<div className="flex flex-col flex-grow">
18+
<div className="flex flex-grow flex-col gap-4 max-w-sm">
19+
<div className="flex flex-col gap-2">
20+
<Typography>
21+
{l10n.getString(
22+
'onboarding-automatic_mounting-mounting_reset-step-0'
23+
)}
24+
</Typography>
25+
<Typography>
26+
{l10n.getString(
27+
'onboarding-automatic_mounting-mounting_reset-step-1'
28+
)}
29+
</Typography>
30+
</div>
31+
</div>
32+
33+
{isMobile && (
34+
<div className="flex flex-col items-center fill-background-50 justify-center">
35+
<img
36+
src="/images/mounting-reset-pose.webp"
37+
width={450}
38+
alt="mounting reset ski pose"
39+
/>
40+
</div>
41+
)}
3042

31-
<div className="flex gap-2">
32-
<Localized id="onboarding-stay_aligned-verify_mounting-redo_mounting">
33-
<Button
34-
variant={'secondary'}
35-
to="/onboarding/mounting/choose"
36-
state={{ alonePage: true }}
43+
{!isMobile && (
44+
<div className="flex flex-col pt-1 items-center fill-background-50 justify-center">
45+
<img
46+
src="/images/mounting-reset-pose.webp"
47+
width={600}
48+
alt="mounting reset ski pose"
3749
/>
38-
</Localized>
39-
<Localized id="onboarding-stay_aligned-next_step">
40-
<Button variant="primary" onClick={nextStep} />
41-
</Localized>
50+
</div>
51+
)}
52+
<div className="flex gap-3 justify-between">
53+
<Button variant={'secondary'} onClick={prevStep}>
54+
{l10n.getString('onboarding-automatic_mounting-prev_step')}
55+
</Button>
56+
<ResetButton
57+
size="small"
58+
type={ResetType.Mounting}
59+
onReseted={nextStep}
60+
/>
4261
</div>
4362
</div>
4463
</div>

0 commit comments

Comments
 (0)