diff options
author | Bennett <hello@vantezzen.io> | 2020-10-11 17:10:17 +0200 |
---|---|---|
committer | Bennett <hello@vantezzen.io> | 2020-10-11 17:10:17 +0200 |
commit | 74daa50c4c1a2b083f9c1fe0177bd216855505f9 (patch) | |
tree | ffbb5186d979cb42119120583d682e0442030074 /src/components | |
parent | Minify images using ImageOptim (lossless compression) (#1012) (diff) | |
download | ferdium-app-74daa50c4c1a2b083f9c1fe0177bd216855505f9.tar.gz ferdium-app-74daa50c4c1a2b083f9c1fe0177bd216855505f9.tar.zst ferdium-app-74daa50c4c1a2b083f9c1fe0177bd216855505f9.zip |
Merge #722
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 2 | ||||
-rw-r--r-- | src/components/settings/supportFerdi/SupportFerdiDashboard.js | 164 |
2 files changed, 132 insertions, 34 deletions
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index 6b03f05be..0220731b9 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -40,7 +40,7 @@ const messages = defineMessages({ | |||
40 | }, | 40 | }, |
41 | supportFerdi: { | 41 | supportFerdi: { |
42 | id: 'settings.navigation.supportFerdi', | 42 | id: 'settings.navigation.supportFerdi', |
43 | defaultMessage: '!!!Support Ferdi', | 43 | defaultMessage: '!!!About Ferdi', |
44 | }, | 44 | }, |
45 | logout: { | 45 | logout: { |
46 | id: 'settings.navigation.logout', | 46 | id: 'settings.navigation.logout', |
diff --git a/src/components/settings/supportFerdi/SupportFerdiDashboard.js b/src/components/settings/supportFerdi/SupportFerdiDashboard.js index 57920a4a2..f6fc7c171 100644 --- a/src/components/settings/supportFerdi/SupportFerdiDashboard.js +++ b/src/components/settings/supportFerdi/SupportFerdiDashboard.js | |||
@@ -1,29 +1,70 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import { defineMessages, FormattedHTMLMessage, intlShape } from 'react-intl'; |
3 | import { defineMessages, intlShape } from 'react-intl'; | 3 | import { remote } from 'electron'; |
4 | import InfoBar from '../../ui/InfoBar'; | ||
4 | 5 | ||
5 | import Button from '../../ui/Button'; | 6 | const { BrowserWindow } = remote; |
6 | 7 | ||
7 | const messages = defineMessages({ | 8 | const messages = defineMessages({ |
8 | headline: { | 9 | headline: { |
9 | id: 'settings.supportFerdi.headline', | 10 | id: 'settings.supportFerdi.headline', |
10 | defaultMessage: '!!!Support Ferdi', | 11 | defaultMessage: '!!!About Ferdi', |
11 | }, | 12 | }, |
12 | title: { | 13 | title: { |
13 | id: 'settings.supportFerdi.title', | 14 | id: 'settings.supportFerdi.title', |
14 | defaultMessage: '!!!Do you like Ferdi? Spread the love!', | 15 | defaultMessage: '!!!Do you like Ferdi?', |
15 | }, | 16 | }, |
16 | github: { | 17 | aboutIntro: { |
17 | id: 'settings.supportFerdi.github', | 18 | id: 'settings.supportFerdi.aboutIntro', |
18 | defaultMessage: '!!!Star on GitHub', | 19 | defaultMessage: '!!!<p>Ferdi is an open-source and a community-lead application.</p><p>Thanks to the people who make this possbile:</p>', |
19 | }, | 20 | }, |
20 | share: { | 21 | textListContributors: { |
21 | id: 'settings.supportFerdi.share', | 22 | id: 'settings.supportFerdi.textListContributors', |
22 | defaultMessage: '!!!Tell your Friends', | 23 | defaultMessage: '!!!Full list of contributor', |
23 | }, | 24 | }, |
24 | openCollective: { | 25 | textListContributorsHere: { |
25 | id: 'settings.supportFerdi.openCollective', | 26 | id: 'settings.supportFerdi.textListContributorsHere', |
26 | defaultMessage: '!!!Support our Open Collective', | 27 | defaultMessage: '!!!here', |
28 | }, | ||
29 | textVolunteers: { | ||
30 | id: 'settings.supportFerdi.textVolunteers', | ||
31 | 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.', | ||
32 | }, | ||
33 | textSupportWelcome: { | ||
34 | id: 'settings.supportFerdi.textSupportWelcome', | ||
35 | defaultMessage: '!!!Support is always welcome. You can find a list of the help we need', | ||
36 | }, | ||
37 | textSupportWelcomeHere: { | ||
38 | id: 'settings.supportFerdi.textSupportWelcomeHere', | ||
39 | defaultMessage: '!!!here', | ||
40 | }, | ||
41 | textExpenses: { | ||
42 | id: 'settings.supportFerdi.textExpenses', | ||
43 | 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', | ||
44 | }, | ||
45 | textOpenCollective: { | ||
46 | id: 'settings.supportFerdi.textOpenCollective', | ||
47 | defaultMessage: '!!!Open Collective', | ||
48 | }, | ||
49 | textDonation: { | ||
50 | id: 'settings.supportFerdi.textDonation', | ||
51 | defaultMessage: '!!!If you feel like supporting Ferdi development with a donation, you can do so on both,', | ||
52 | }, | ||
53 | textDonationAnd: { | ||
54 | id: 'settings.supportFerdi.textDonationAnd', | ||
55 | defaultMessage: '!!!and', | ||
56 | }, | ||
57 | textGitHubSponsors: { | ||
58 | id: 'settings.supportFerdi.textGitHubSponsors', | ||
59 | defaultMessage: '!!!GitHub Sponsors', | ||
60 | }, | ||
61 | openSurvey: { | ||
62 | id: 'settings.supportFerdi.openSurvey', | ||
63 | defaultMessage: '!!!Open Survey', | ||
64 | }, | ||
65 | bannerText: { | ||
66 | id: 'settings.supportFerdi.bannerText', | ||
67 | defaultMessage: '!!!Do you want to help us improve Ferdi?', | ||
27 | }, | 68 | }, |
28 | }); | 69 | }); |
29 | 70 | ||
@@ -32,12 +73,16 @@ class SupportFerdiDashboard extends Component { | |||
32 | intl: intlShape, | 73 | intl: intlShape, |
33 | }; | 74 | }; |
34 | 75 | ||
35 | static propTypes = { | 76 | openSurveyWindow() { |
36 | openLink: PropTypes.func.isRequired, | 77 | let win = new BrowserWindow({ width: 670, height: 400 }); |
37 | }; | 78 | win.on('closed', () => { |
79 | win = null; | ||
80 | }); | ||
81 | |||
82 | win.loadURL('https://rp28.typeform.com/to/E3phJT'); | ||
83 | } | ||
38 | 84 | ||
39 | render() { | 85 | render() { |
40 | const { openLink } = this.props; | ||
41 | const { intl } = this.context; | 86 | const { intl } = this.context; |
42 | 87 | ||
43 | return ( | 88 | return ( |
@@ -49,22 +94,75 @@ class SupportFerdiDashboard extends Component { | |||
49 | </div> | 94 | </div> |
50 | <div className="settings__body"> | 95 | <div className="settings__body"> |
51 | <h1>{intl.formatMessage(messages.title)}</h1> | 96 | <h1>{intl.formatMessage(messages.title)}</h1> |
52 | <Button | 97 | <div> |
53 | label={intl.formatMessage(messages.github)} | 98 | <p className="settings__support-badges"> |
54 | className="franz-form__button--inverted franz-form__button--large" | 99 | <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> |
55 | onClick={() => openLink('https://github.com/getferdi/ferdi')} | 100 | <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> |
56 | /> | 101 | <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> |
57 | <Button | 102 | <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> |
58 | label={intl.formatMessage(messages.share)} | 103 | </p> |
59 | className="franz-form__button--inverted franz-form__button--large" | 104 | <FormattedHTMLMessage {...messages.aboutIntro} /> |
60 | onClick={() => openLink('https://twitter.com/intent/tweet?text=Ferdi%3A%20A%20messaging%20browser%20that%20allows%20you%20to%20combine%20your%20favourite%20messaging%20services%20into%20one%20application.%0A%0ACheck%20out%20Ferdi%20at%20https%3A//getferdi.com')} | 105 | <br /> |
61 | /> | 106 | <br /> |
62 | <Button | 107 | <p> |
63 | label={intl.formatMessage(messages.openCollective)} | 108 | <a href="#contributors-via-opencollective"> |
64 | className="franz-form__button--inverted franz-form__button--large" | 109 | <img alt="GitHub contributors (non-exhaustive)" width="100%" src="https://opencollective.com/getferdi/contributors.svg?width=642&button=false" /> |
65 | onClick={() => openLink('https://opencollective.com/getferdi')} | 110 | </a> |
66 | /> | 111 | </p> |
112 | <p> | ||
113 | {intl.formatMessage(messages.textListContributors)} | ||
114 | <a href="https://github.com/getferdi/ferdi#contributors-" target="_blank" className="link"> | ||
115 | {' '} | ||
116 | {intl.formatMessage(messages.textListContributorsHere)} | ||
117 | <i className="mdi mdi-open-in-new" /> | ||
118 | </a> | ||
119 | <br /> | ||
120 | <br /> | ||
121 | </p> | ||
122 | <p> | ||
123 | {intl.formatMessage(messages.textVolunteers)} | ||
124 | </p> | ||
125 | <p> | ||
126 | {intl.formatMessage(messages.textSupportWelcome)} | ||
127 | <a href="https://help.getferdi.com/general/support" target="_blank" className="link"> | ||
128 | {' '} | ||
129 | {intl.formatMessage(messages.textSupportWelcomeHere)} | ||
130 | <i className="mdi mdi-open-in-new" /> | ||
131 | </a> | ||
132 | </p> | ||
133 | <p> | ||
134 | {intl.formatMessage(messages.textExpenses)} | ||
135 | <a href="https://opencollective.com/getferdi#section-budget" target="_blank" className="link"> | ||
136 | {' '} | ||
137 | {intl.formatMessage(messages.textOpenCollective)} | ||
138 | <i className="mdi mdi-open-in-new" /> | ||
139 | </a> | ||
140 | </p> | ||
141 | <p> | ||
142 | {intl.formatMessage(messages.textDonation)} | ||
143 | <a href="https://opencollective.com/getferdi#section-contribute" target="_blank" className="link"> | ||
144 | {' '} | ||
145 | {intl.formatMessage(messages.textOpenCollective)} | ||
146 | <i className="mdi mdi-open-in-new" /> | ||
147 | </a> | ||
148 | {' '} | ||
149 | {intl.formatMessage(messages.textDonationAnd)} | ||
150 | <a href="https://github.com/sponsors/getferdi" target="_blank" className="link"> | ||
151 | {' '} | ||
152 | {intl.formatMessage(messages.textGitHubSponsors)} | ||
153 | <i className="mdi mdi-open-in-new" /> | ||
154 | </a> | ||
155 | </p> | ||
156 | </div> | ||
67 | </div> | 157 | </div> |
158 | <InfoBar | ||
159 | sticky | ||
160 | type="primary" | ||
161 | ctaLabel={intl.formatMessage(messages.openSurvey)} | ||
162 | onClick={this.openSurveyWindow} | ||
163 | > | ||
164 | {intl.formatMessage(messages.bannerText)} | ||
165 | </InfoBar> | ||
68 | </div> | 166 | </div> |
69 | ); | 167 | ); |
70 | } | 168 | } |