aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings/supportFerdi/SupportFerdiDashboard.js
blob: f6fc7c171ccab32bf95ea8529ade412f9fcb039b (plain) (blame)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
import React, { Component } from 'react';
import { defineMessages, FormattedHTMLMessage, intlShape } from 'react-intl';
import { remote } from 'electron';
import InfoBar from '../../ui/InfoBar';

const { BrowserWindow } = remote;

const messages = defineMessages({
  headline: {
    id: 'settings.supportFerdi.headline',
    defaultMessage: '!!!About Ferdi',
  },
  title: {
    id: 'settings.supportFerdi.title',
    defaultMessage: '!!!Do you like Ferdi?',
  },
  aboutIntro: {
    id: 'settings.supportFerdi.aboutIntro',
    defaultMessage: '!!!<p>Ferdi is an open-source and a community-lead application.</p><p>Thanks to the people who make this possbile:</p>',
  },
  textListContributors: {
    id: 'settings.supportFerdi.textListContributors',
    defaultMessage: '!!!Full list of contributor',
  },
  textListContributorsHere: {
    id: 'settings.supportFerdi.textListContributorsHere',
    defaultMessage: '!!!here',
  },
  textVolunteers: {
    id: 'settings.supportFerdi.textVolunteers',
    defaultMessage: '!!!The development of Ferdi is done by volunteers. People who use Ferdi like you. They maintain, fix, and improve Ferdi in their spare time.',
  },
  textSupportWelcome: {
    id: 'settings.supportFerdi.textSupportWelcome',
    defaultMessage: '!!!Support is always welcome. You can find a list of the help we need',
  },
  textSupportWelcomeHere: {
    id: 'settings.supportFerdi.textSupportWelcomeHere',
    defaultMessage: '!!!here',
  },
  textExpenses: {
    id: 'settings.supportFerdi.textExpenses',
    defaultMessage: '!!!While volunteers do most of the work, we still need to pay for servers and certificates. As a community, we are fully transparent on funds we collect and spend - see our',
  },
  textOpenCollective: {
    id: 'settings.supportFerdi.textOpenCollective',
    defaultMessage: '!!!Open Collective',
  },
  textDonation: {
    id: 'settings.supportFerdi.textDonation',
    defaultMessage: '!!!If you feel like supporting Ferdi development with a donation, you can do so on both,',
  },
  textDonationAnd: {
    id: 'settings.supportFerdi.textDonationAnd',
    defaultMessage: '!!!and',
  },
  textGitHubSponsors: {
    id: 'settings.supportFerdi.textGitHubSponsors',
    defaultMessage: '!!!GitHub Sponsors',
  },
  openSurvey: {
    id: 'settings.supportFerdi.openSurvey',
    defaultMessage: '!!!Open Survey',
  },
  bannerText: {
    id: 'settings.supportFerdi.bannerText',
    defaultMessage: '!!!Do you want to help us improve Ferdi?',
  },
});

class SupportFerdiDashboard extends Component {
  static contextTypes = {
    intl: intlShape,
  };

  openSurveyWindow() {
    let win = new BrowserWindow({ width: 670, height: 400 });
    win.on('closed', () => {
      win = null;
    });

    win.loadURL('https://rp28.typeform.com/to/E3phJT');
  }

  render() {
    const { intl } = this.context;

    return (
      <div className="settings__main">
        <div className="settings__header">
          <span className="settings__header-item">
            {intl.formatMessage(messages.headline)}
          </span>
        </div>
        <div className="settings__body">
          <h1>{intl.formatMessage(messages.title)}</h1>
          <div>
            <p className="settings__support-badges">
              <a href="https://github.com/getferdi/ferdi" target="_blank"><img alt="GitHub Stars" src="https://img.shields.io/github/stars/getferdi/ferdi?style=social" /></a>
              <a href="https://twitter.com/getferdi/" target="_blank"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/getferdi?label=Follow&style=social" /></a>
              <a href="https://opencollective.com/getferdi#section-contributors" target="_blank"><img alt="Open Collective backers" src="https://img.shields.io/opencollective/backers/getferdi?logo=open-collective" /></a>
              <a href="https://opencollective.com/getferdi#section-contributors" target="_blank"><img alt="Open Collective sponsors" src="https://img.shields.io/opencollective/sponsors/getferdi?logo=open-collective" /></a>
            </p>
            <FormattedHTMLMessage {...messages.aboutIntro} />
            <br />
            <br />
            <p>
              <a href="#contributors-via-opencollective">
                <img alt="GitHub contributors (non-exhaustive)" width="100%" src="https://opencollective.com/getferdi/contributors.svg?width=642&button=false" />
              </a>
            </p>
            <p>
              {intl.formatMessage(messages.textListContributors)}
              <a href="https://github.com/getferdi/ferdi#contributors-" target="_blank" className="link">
                {' '}
                {intl.formatMessage(messages.textListContributorsHere)}
                <i className="mdi mdi-open-in-new" />
              </a>
              <br />
              <br />
            </p>
            <p>
              {intl.formatMessage(messages.textVolunteers)}
            </p>
            <p>
              {intl.formatMessage(messages.textSupportWelcome)}
              <a href="https://help.getferdi.com/general/support" target="_blank" className="link">
                {' '}
                {intl.formatMessage(messages.textSupportWelcomeHere)}
                <i className="mdi mdi-open-in-new" />
              </a>
            </p>
            <p>
              {intl.formatMessage(messages.textExpenses)}
              <a href="https://opencollective.com/getferdi#section-budget" target="_blank" className="link">
                {' '}
                {intl.formatMessage(messages.textOpenCollective)}
                <i className="mdi mdi-open-in-new" />
              </a>
            </p>
            <p>
              {intl.formatMessage(messages.textDonation)}
              <a href="https://opencollective.com/getferdi#section-contribute" target="_blank" className="link">
                {' '}
                {intl.formatMessage(messages.textOpenCollective)}
                <i className="mdi mdi-open-in-new" />
              </a>
              {' '}
              {intl.formatMessage(messages.textDonationAnd)}
              <a href="https://github.com/sponsors/getferdi" target="_blank" className="link">
                {' '}
                {intl.formatMessage(messages.textGitHubSponsors)}
                <i className="mdi mdi-open-in-new" />
              </a>
            </p>
          </div>
        </div>
        <InfoBar
          sticky
          type="primary"
          ctaLabel={intl.formatMessage(messages.openSurvey)}
          onClick={this.openSurveyWindow}
        >
          {intl.formatMessage(messages.bannerText)}
        </InfoBar>
      </div>
    );
  }
}

export default SupportFerdiDashboard;