@@ -0,0 +1,75 @@
1+import React, { useCallback } from 'react';
2+import cn from 'classnames';
3+import * as ob from 'urbit-ob';
4+import { Grid, Text, LinkButton } from 'indigo-react';
5+
6+import { useLocalRouter } from 'lib/LocalRouter';
7+
8+import useWasGreeted from 'lib/useWasGreeted';
9+import useCurrentPermissions from 'lib/useCurrentPermissions';
10+
11+const TEXT_STYLE = 'f5';
12+
13+export default function ActivateDisclaimer({ point }) {
14+ const { push, names } = useLocalRouter();
15+
16+ const [wasGreeted, setWasGreeted] = useWasGreeted();
17+ const { isActiveOwner } = useCurrentPermissions();
18+
19+ const pointName = ob.patp(point);
20+
21+ const dismiss = useCallback(async () => {
22+ setWasGreeted(true);
23+ }, [setWasGreeted]);
24+
25+ const goInvite = useCallback(() => push(names.INVITE), [push, names]);
26+
27+ return (
28+ !wasGreeted && (
29+ <Grid gap={4} className="mb10">
30+ <Grid.Item full>
31+ <Text className={cn(TEXT_STYLE, 'block mb4')}>
32+ Welcome <code>{pointName}</code>,
33+ </Text>
34+
35+ <Text className={cn(TEXT_STYLE, 'block mb2')}>
36+ As of this very moment, you own an Urbit identity – a digital
37+ identity that you can keep for the rest of your life. Use the Master
38+ Ticket included in your Passport to access your Urbit identity at
39+ any time. Right now you can:
40+ </Text>
41+ </Grid.Item>
42+
43+ {isActiveOwner && (
44+ <Grid.Item
45+ full
46+ as={LinkButton}
47+ onClick={goInvite}
48+ className={'yellow4'}>
49+ <Text className={cn(TEXT_STYLE, 'block mb2')}>
50+ Invite your friends
51+ </Text>
52+ </Grid.Item>
53+ )}
54+
55+ <Grid.Item
56+ full
57+ as={LinkButton}
58+ href="https://urbit.org/docs/getting-started/">
59+ <Text className={cn(TEXT_STYLE, 'block mb2')}>
60+ Boot your computer
61+ </Text>
62+ </Grid.Item>
63+
64+ <Grid.Item full>
65+ <Text className={cn(TEXT_STYLE, 'block mb4')}>
66+ Welcome to Urbit. See you online.
67+ </Text>
68+ </Grid.Item>
69+ <Grid.Item full as={LinkButton} onClick={dismiss}>
70+ Close
71+ </Grid.Item>
72+ </Grid>
73+ )
74+ );
75+}