From 74daa50c4c1a2b083f9c1fe0177bd216855505f9 Mon Sep 17 00:00:00 2001 From: Bennett Date: Sun, 11 Oct 2020 17:10:17 +0200 Subject: Merge #722 --- .../settings/navigation/SettingsNavigation.js | 2 +- .../settings/supportFerdi/SupportFerdiDashboard.js | 164 ++++++++++++++++----- 2 files changed, 132 insertions(+), 34 deletions(-) (limited to 'src/components/settings') 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({ }, supportFerdi: { id: 'settings.navigation.supportFerdi', - defaultMessage: '!!!Support Ferdi', + defaultMessage: '!!!About Ferdi', }, logout: { 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 @@ import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import { defineMessages, intlShape } from 'react-intl'; +import { defineMessages, FormattedHTMLMessage, intlShape } from 'react-intl'; +import { remote } from 'electron'; +import InfoBar from '../../ui/InfoBar'; -import Button from '../../ui/Button'; +const { BrowserWindow } = remote; const messages = defineMessages({ headline: { id: 'settings.supportFerdi.headline', - defaultMessage: '!!!Support Ferdi', + defaultMessage: '!!!About Ferdi', }, title: { id: 'settings.supportFerdi.title', - defaultMessage: '!!!Do you like Ferdi? Spread the love!', + defaultMessage: '!!!Do you like Ferdi?', }, - github: { - id: 'settings.supportFerdi.github', - defaultMessage: '!!!Star on GitHub', + aboutIntro: { + id: 'settings.supportFerdi.aboutIntro', + defaultMessage: '!!!

Ferdi is an open-source and a community-lead application.

Thanks to the people who make this possbile:

', }, - share: { - id: 'settings.supportFerdi.share', - defaultMessage: '!!!Tell your Friends', + textListContributors: { + id: 'settings.supportFerdi.textListContributors', + defaultMessage: '!!!Full list of contributor', }, - openCollective: { - id: 'settings.supportFerdi.openCollective', - defaultMessage: '!!!Support our Open Collective', + 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?', }, }); @@ -32,12 +73,16 @@ class SupportFerdiDashboard extends Component { intl: intlShape, }; - static propTypes = { - openLink: PropTypes.func.isRequired, - }; + openSurveyWindow() { + let win = new BrowserWindow({ width: 670, height: 400 }); + win.on('closed', () => { + win = null; + }); + + win.loadURL('https://rp28.typeform.com/to/E3phJT'); + } render() { - const { openLink } = this.props; const { intl } = this.context; return ( @@ -49,22 +94,75 @@ class SupportFerdiDashboard extends Component {

{intl.formatMessage(messages.title)}

-
+ + {intl.formatMessage(messages.bannerText)} + ); } -- cgit v1.2.3-54-g00ecf