summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components/Launch.tsx
blob: e5a59df23bd7d799e04a27688e70bad1dcec6008 (plain)
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
import * as React from 'react';
import { Component, Styles, Text, View } from 'reactxp';
import { colors } from '../../config.json';
import { messages } from '../../shared/gettext';
import { SettingsBarButton } from './HeaderBar';
import ImageView from './ImageView';
import { Container, Header, Layout } from './Layout';

const styles = {
  container: Styles.createViewStyle({
    flex: 1,
    flexDirection: 'column',
    alignItems: 'center',
    justifyContent: 'center',
    marginTop: -150,
  }),
  logo: Styles.createViewStyle({
    marginBottom: 4,
  }),
  title: Styles.createTextStyle({
    fontFamily: 'DINPro',
    fontSize: 24,
    fontWeight: '900',
    lineHeight: 30,
    letterSpacing: -0.5,
    color: colors.white60,
    marginBottom: 4,
  }),
  subtitle: Styles.createTextStyle({
    fontFamily: 'Open Sans',
    fontSize: 14,
    lineHeight: 20,
    color: colors.white40,
  }),
};

interface IProps {
  openSettings: () => void;
}

export default class Launch extends Component<IProps> {
  public render() {
    return (
      <Layout>
        <Header>
          <SettingsBarButton onPress={this.props.openSettings} />
        </Header>
        <Container>
          <View style={styles.container}>
            <ImageView height={120} width={120} source="logo-icon" style={styles.logo} />
            <Text style={styles.title}>{messages.pgettext('launch-view', 'MULLVAD VPN')}</Text>
            <Text style={styles.subtitle}>
              {messages.pgettext('launch-view', 'Connecting to daemon...')}
            </Text>
          </View>
        </Container>
      </Layout>
    );
  }
}