-
Notifications
You must be signed in to change notification settings - Fork 103
/
WelcomeView.svelte
59 lines (55 loc) · 2.18 KB
/
WelcomeView.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<script lang="typescript">
import { hasCompletedAppSetup } from '@core/app'
import { localize } from '@core/i18n'
import { formatProtocolName, NetworkProtocol, NetworkType } from '@core/network'
import { appSetupRouter } from '../../../../../lib/routers'
import { Button, Checkbox, Text, TextType } from 'shared/components'
import {
initialiseOnboardingProfile,
onboardingProfile,
shouldBeDeveloperProfile,
updateOnboardingProfile,
} from 'shared/lib/contexts/onboarding'
import { onMount } from 'svelte'
import { OnboardingLayout } from '../../../../../components'
import features from '@features/features'
let checked = false
function onContinueClick(): void {
hasCompletedAppSetup.set(true)
$appSetupRouter.next()
}
onMount(() => {
initialiseOnboardingProfile(
$onboardingProfile?.isDeveloperProfile ?? shouldBeDeveloperProfile(),
NetworkProtocol.Shimmer
)
if (!shouldBeDeveloperProfile()) {
updateOnboardingProfile({ networkType: NetworkType.Mainnet })
}
})
</script>
<OnboardingLayout allowBack={false} animation="welcome-desktop">
<div slot="content">
<div class="flex flex-col items-center text-center space-y-4 absolute bottom-1/4 px-8">
<Text type={TextType.h3}
>{localize('views.onboarding.appSetup.welcome.title', {
values: {
protocol: features?.onboarding?.iota?.enabled
? formatProtocolName(NetworkProtocol.IOTA)
: formatProtocolName(NetworkProtocol.Shimmer),
},
})}</Text
>
</div>
</div>
<div slot="footer" class="space-y-8">
<div class="flex flex-row items-center space-x-3">
<Checkbox bind:checked />
<Text type={TextType.p} secondary>
I agree to the
<span class="text-blue-500"> Terms of Service </span>
</Text>
</div>
<Button onClick={onContinueClick} classes="w-full">{localize('actions.continue')}</Button>
</div>
</OnboardingLayout>