-
Notifications
You must be signed in to change notification settings - Fork 103
/
LegalView.svelte
64 lines (58 loc) · 2.09 KB
/
LegalView.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
60
61
62
63
64
<script lang="ts">
import { Button, Checkbox, OnboardingLayout, Text } from 'shared/components'
import ConditionsOfUse from './ConditionsOfUse.svelte'
import {
lastAcceptedPrivacyPolicy,
lastAcceptedTermsOfService,
mobile,
PRIVACY_POLICY_VERSION,
TERMS_OF_SERVICE_VERSION,
} from '@core/app'
import { localize } from '@core/i18n'
import { appSetupRouter } from '@core/router'
let checked = false
let termsAccepted = false
$: termsAccepted = checked
function onContinueClick(): string {
lastAcceptedTermsOfService.set(TERMS_OF_SERVICE_VERSION)
lastAcceptedPrivacyPolicy.set(PRIVACY_POLICY_VERSION)
$appSetupRouter.next()
}
function onBackClick(): void {
$appSetupRouter.previous()
}
</script>
<OnboardingLayout {onBackClick}>
<div slot="title">
<Text type="h2">{localize('views.onboarding.appSetup.legal.title')}</Text>
</div>
<div slot="leftpane__content">
{#if !$mobile}
<Text type="p" secondary classes="mb-8">{localize('views.onboarding.appSetup.legal.body')}</Text>
{/if}
</div>
<div slot="leftpane__action" class="flex flex-col {$mobile ? 'space-y-4' : 'space-y-8'}">
<Checkbox label={localize('views.onboarding.appSetup.legal.checkbox')} bind:checked />
<Button classes="w-full" disabled={!termsAccepted} onClick={onContinueClick}>
{localize('actions.continue')}
</Button>
</div>
<div slot="rightpane" class={!$mobile && 'w-full h-full flex items-center px-40 py-20'}>
<div class="legal-content {!$mobile && 'block relative max-h-full overflow-y-auto w-full text-justify pr-10'}">
<ConditionsOfUse />
</div>
</div>
</OnboardingLayout>
<style type="text/scss">
.legal-content {
:global(ul) {
display: block;
list-style-type: disc;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
padding-inline-start: 20px;
}
}
</style>