aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2019-09-27 11:23:31 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2019-09-27 11:23:31 +0200
commit8f60790de89ee7fd7a150a83a8ca39b4bf76509c (patch)
tree0e35a3687da220389747d8998f3c978898fb2fd7 /src
parentBump to 5.3.4-beta.4 (diff)
downloadferdium-app-8f60790de89ee7fd7a150a83a8ca39b4bf76509c.tar.gz
ferdium-app-8f60790de89ee7fd7a150a83a8ca39b4bf76509c.tar.zst
ferdium-app-8f60790de89ee7fd7a150a83a8ca39b4bf76509c.zip
Replace "invite friends" screen with "support Ferdi" screen
Diffstat (limited to 'src')
-rw-r--r--src/app.js2
-rw-r--r--src/components/settings/navigation/SettingsNavigation.js10
-rw-r--r--src/components/settings/supportFerdi/SupportFerdiDashboard.js73
-rw-r--r--src/containers/settings/SupportScreen.js36
-rw-r--r--src/i18n/locales/defaultMessages.json76
-rw-r--r--src/i18n/locales/en-US.json7
-rw-r--r--src/i18n/messages/src/components/settings/navigation/SettingsNavigation.json6
-rw-r--r--src/i18n/messages/src/components/settings/supportFerdi/SupportFerdiDashboard.json67
-rw-r--r--src/styles/button.scss5
9 files changed, 270 insertions, 12 deletions
diff --git a/src/app.js b/src/app.js
index e16c01456..1c2f66592 100644
--- a/src/app.js
+++ b/src/app.js
@@ -30,6 +30,7 @@ import TeamScreen from './containers/settings/TeamScreen';
30import EditUserScreen from './containers/settings/EditUserScreen'; 30import EditUserScreen from './containers/settings/EditUserScreen';
31import EditSettingsScreen from './containers/settings/EditSettingsScreen'; 31import EditSettingsScreen from './containers/settings/EditSettingsScreen';
32import InviteSettingsScreen from './containers/settings/InviteScreen'; 32import InviteSettingsScreen from './containers/settings/InviteScreen';
33import SupportFerdiScreen from './containers/settings/SupportScreen';
33import WelcomeScreen from './containers/auth/WelcomeScreen'; 34import WelcomeScreen from './containers/auth/WelcomeScreen';
34import LoginScreen from './containers/auth/LoginScreen'; 35import LoginScreen from './containers/auth/LoginScreen';
35import LockedScreen from './containers/auth/LockedScreen'; 36import LockedScreen from './containers/auth/LockedScreen';
@@ -89,6 +90,7 @@ window.addEventListener('load', () => {
89 <Route path="/settings/team" component={TeamScreen} /> 90 <Route path="/settings/team" component={TeamScreen} />
90 <Route path="/settings/app" component={EditSettingsScreen} /> 91 <Route path="/settings/app" component={EditSettingsScreen} />
91 <Route path="/settings/invite" component={InviteSettingsScreen} /> 92 <Route path="/settings/invite" component={InviteSettingsScreen} />
93 <Route path="/settings/support" component={SupportFerdiScreen} />
92 </Route> 94 </Route>
93 </Route> 95 </Route>
94 <Route path="/auth" component={AuthLayoutContainer}> 96 <Route path="/auth" component={AuthLayoutContainer}>
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js
index 201819526..2711bc107 100644
--- a/src/components/settings/navigation/SettingsNavigation.js
+++ b/src/components/settings/navigation/SettingsNavigation.js
@@ -35,9 +35,9 @@ const messages = defineMessages({
35 id: 'settings.navigation.settings', 35 id: 'settings.navigation.settings',
36 defaultMessage: '!!!Settings', 36 defaultMessage: '!!!Settings',
37 }, 37 },
38 inviteFriends: { 38 supportFerdi: {
39 id: 'settings.navigation.inviteFriends', 39 id: 'settings.navigation.supportFerdi',
40 defaultMessage: '!!!Invite Friends', 40 defaultMessage: '!!!Support Ferdi',
41 }, 41 },
42 logout: { 42 logout: {
43 id: 'settings.navigation.logout', 43 id: 'settings.navigation.logout',
@@ -129,11 +129,11 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp
129 {intl.formatMessage(messages.settings)} 129 {intl.formatMessage(messages.settings)}
130 </Link> 130 </Link>
131 <Link 131 <Link
132 to="/settings/invite" 132 to="/settings/support"
133 className="settings-navigation__link" 133 className="settings-navigation__link"
134 activeClassName="is-active" 134 activeClassName="is-active"
135 > 135 >
136 {intl.formatMessage(messages.inviteFriends)} 136 {intl.formatMessage(messages.supportFerdi)}
137 </Link> 137 </Link>
138 <span className="settings-navigation__expander" /> 138 <span className="settings-navigation__expander" />
139 <Link 139 <Link
diff --git a/src/components/settings/supportFerdi/SupportFerdiDashboard.js b/src/components/settings/supportFerdi/SupportFerdiDashboard.js
new file mode 100644
index 000000000..57920a4a2
--- /dev/null
+++ b/src/components/settings/supportFerdi/SupportFerdiDashboard.js
@@ -0,0 +1,73 @@
1import React, { Component } from 'react';
2import PropTypes from 'prop-types';
3import { defineMessages, intlShape } from 'react-intl';
4
5import Button from '../../ui/Button';
6
7const messages = defineMessages({
8 headline: {
9 id: 'settings.supportFerdi.headline',
10 defaultMessage: '!!!Support Ferdi',
11 },
12 title: {
13 id: 'settings.supportFerdi.title',
14 defaultMessage: '!!!Do you like Ferdi? Spread the love!',
15 },
16 github: {
17 id: 'settings.supportFerdi.github',
18 defaultMessage: '!!!Star on GitHub',
19 },
20 share: {
21 id: 'settings.supportFerdi.share',
22 defaultMessage: '!!!Tell your Friends',
23 },
24 openCollective: {
25 id: 'settings.supportFerdi.openCollective',
26 defaultMessage: '!!!Support our Open Collective',
27 },
28});
29
30class SupportFerdiDashboard extends Component {
31 static contextTypes = {
32 intl: intlShape,
33 };
34
35 static propTypes = {
36 openLink: PropTypes.func.isRequired,
37 };
38
39 render() {
40 const { openLink } = this.props;
41 const { intl } = this.context;
42
43 return (
44 <div className="settings__main">
45 <div className="settings__header">
46 <span className="settings__header-item">
47 {intl.formatMessage(messages.headline)}
48 </span>
49 </div>
50 <div className="settings__body">
51 <h1>{intl.formatMessage(messages.title)}</h1>
52 <Button
53 label={intl.formatMessage(messages.github)}
54 className="franz-form__button--inverted franz-form__button--large"
55 onClick={() => openLink('https://github.com/getferdi/ferdi')}
56 />
57 <Button
58 label={intl.formatMessage(messages.share)}
59 className="franz-form__button--inverted franz-form__button--large"
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')}
61 />
62 <Button
63 label={intl.formatMessage(messages.openCollective)}
64 className="franz-form__button--inverted franz-form__button--large"
65 onClick={() => openLink('https://opencollective.com/getferdi')}
66 />
67 </div>
68 </div>
69 );
70 }
71}
72
73export default SupportFerdiDashboard;
diff --git a/src/containers/settings/SupportScreen.js b/src/containers/settings/SupportScreen.js
new file mode 100644
index 000000000..34dce1dae
--- /dev/null
+++ b/src/containers/settings/SupportScreen.js
@@ -0,0 +1,36 @@
1import React, { Component } from 'react';
2import { inject } from 'mobx-react';
3import PropTypes from 'prop-types';
4
5import SupportFerdi from '../../components/settings/supportFerdi/SupportFerdiDashboard';
6import ErrorBoundary from '../../components/util/ErrorBoundary';
7
8export default @inject('actions') class SupportScreen extends Component {
9 constructor(props) {
10 super(props);
11
12 this.openLink = this.openLink.bind(this);
13 }
14
15 openLink(url) {
16 this.props.actions.app.openExternalUrl({ url });
17 }
18
19 render() {
20 return (
21 <ErrorBoundary>
22 <SupportFerdi
23 openLink={this.openLink}
24 />
25 </ErrorBoundary>
26 );
27 }
28}
29
30SupportScreen.wrappedComponent.propTypes = {
31 actions: PropTypes.shape({
32 app: PropTypes.shape({
33 openExternalUrl: PropTypes.func.isRequired,
34 }).isRequired,
35 }).isRequired,
36};
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json
index e1814cc6d..8022aed3b 100644
--- a/src/i18n/locales/defaultMessages.json
+++ b/src/i18n/locales/defaultMessages.json
@@ -1730,15 +1730,15 @@
1730 } 1730 }
1731 }, 1731 },
1732 { 1732 {
1733 "defaultMessage": "!!!Invite Friends", 1733 "defaultMessage": "!!!Support Ferdi",
1734 "end": { 1734 "end": {
1735 "column": 3, 1735 "column": 3,
1736 "line": 41 1736 "line": 41
1737 }, 1737 },
1738 "file": "src/components/settings/navigation/SettingsNavigation.js", 1738 "file": "src/components/settings/navigation/SettingsNavigation.js",
1739 "id": "settings.navigation.inviteFriends", 1739 "id": "settings.navigation.supportFerdi",
1740 "start": { 1740 "start": {
1741 "column": 17, 1741 "column": 16,
1742 "line": 38 1742 "line": 38
1743 } 1743 }
1744 }, 1744 },
@@ -2779,6 +2779,76 @@
2779 { 2779 {
2780 "descriptors": [ 2780 "descriptors": [
2781 { 2781 {
2782 "defaultMessage": "!!!Support Ferdi",
2783 "end": {
2784 "column": 3,
2785 "line": 11
2786 },
2787 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
2788 "id": "settings.supportFerdi.headline",
2789 "start": {
2790 "column": 12,
2791 "line": 8
2792 }
2793 },
2794 {
2795 "defaultMessage": "!!!Do you like Ferdi? Spread the love!",
2796 "end": {
2797 "column": 3,
2798 "line": 15
2799 },
2800 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
2801 "id": "settings.supportFerdi.title",
2802 "start": {
2803 "column": 9,
2804 "line": 12
2805 }
2806 },
2807 {
2808 "defaultMessage": "!!!Star on GitHub",
2809 "end": {
2810 "column": 3,
2811 "line": 19
2812 },
2813 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
2814 "id": "settings.supportFerdi.github",
2815 "start": {
2816 "column": 10,
2817 "line": 16
2818 }
2819 },
2820 {
2821 "defaultMessage": "!!!Tell your Friends",
2822 "end": {
2823 "column": 3,
2824 "line": 23
2825 },
2826 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
2827 "id": "settings.supportFerdi.share",
2828 "start": {
2829 "column": 9,
2830 "line": 20
2831 }
2832 },
2833 {
2834 "defaultMessage": "!!!Support our Open Collective",
2835 "end": {
2836 "column": 3,
2837 "line": 27
2838 },
2839 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
2840 "id": "settings.supportFerdi.openCollective",
2841 "start": {
2842 "column": 18,
2843 "line": 24
2844 }
2845 }
2846 ],
2847 "path": "src/components/settings/supportFerdi/SupportFerdiDashboard.json"
2848 },
2849 {
2850 "descriptors": [
2851 {
2782 "defaultMessage": "!!!Team", 2852 "defaultMessage": "!!!Team",
2783 "end": { 2853 "end": {
2784 "column": 3, 2854 "column": 3,
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json
index 31e7259ca..784a0aeb5 100644
--- a/src/i18n/locales/en-US.json
+++ b/src/i18n/locales/en-US.json
@@ -262,9 +262,9 @@
262 "settings.invite.headline": "Invite Friends", 262 "settings.invite.headline": "Invite Friends",
263 "settings.navigation.account": "Account", 263 "settings.navigation.account": "Account",
264 "settings.navigation.availableServices": "Available services", 264 "settings.navigation.availableServices": "Available services",
265 "settings.navigation.inviteFriends": "Invite Friends",
266 "settings.navigation.logout": "Logout", 265 "settings.navigation.logout": "Logout",
267 "settings.navigation.settings": "Settings", 266 "settings.navigation.settings": "Settings",
267 "settings.navigation.supportFerdi": "Support Ferdi",
268 "settings.navigation.team": "Manage Team", 268 "settings.navigation.team": "Manage Team",
269 "settings.navigation.yourServices": "Your services", 269 "settings.navigation.yourServices": "Your services",
270 "settings.navigation.yourWorkspaces": "Your workspaces", 270 "settings.navigation.yourWorkspaces": "Your workspaces",
@@ -331,6 +331,11 @@
331 "settings.services.tooltip.isMuted": "All sounds are muted", 331 "settings.services.tooltip.isMuted": "All sounds are muted",
332 "settings.services.tooltip.notificationsDisabled": "Notifications are disabled", 332 "settings.services.tooltip.notificationsDisabled": "Notifications are disabled",
333 "settings.services.updatedInfo": "Your changes have been saved", 333 "settings.services.updatedInfo": "Your changes have been saved",
334 "settings.supportFerdi.github": "Star on GitHub",
335 "settings.supportFerdi.headline": "Support Ferdi",
336 "settings.supportFerdi.openCollective": "Support our Open Collective",
337 "settings.supportFerdi.share": "Tell your Friends",
338 "settings.supportFerdi.title": "Do you like Ferdi? Spread the love!",
334 "settings.team.contentHeadline": "Ferdi for Teams", 339 "settings.team.contentHeadline": "Ferdi for Teams",
335 "settings.team.copy": "Ferdi for Teams gives you the option to invite co-workers to your team by sending them email invitations and manage their subscriptions in your account’s preferences. Don’t waste time setting up subscriptions for every team member individually, forget about multiple invoices and different billing cycles - one team to rule them all!", 340 "settings.team.copy": "Ferdi for Teams gives you the option to invite co-workers to your team by sending them email invitations and manage their subscriptions in your account’s preferences. Don’t waste time setting up subscriptions for every team member individually, forget about multiple invoices and different billing cycles - one team to rule them all!",
336 "settings.team.headline": "Team", 341 "settings.team.headline": "Team",
diff --git a/src/i18n/messages/src/components/settings/navigation/SettingsNavigation.json b/src/i18n/messages/src/components/settings/navigation/SettingsNavigation.json
index 7dfb3ce04..b7309469e 100644
--- a/src/i18n/messages/src/components/settings/navigation/SettingsNavigation.json
+++ b/src/i18n/messages/src/components/settings/navigation/SettingsNavigation.json
@@ -78,12 +78,12 @@
78 } 78 }
79 }, 79 },
80 { 80 {
81 "id": "settings.navigation.inviteFriends", 81 "id": "settings.navigation.supportFerdi",
82 "defaultMessage": "!!!Invite Friends", 82 "defaultMessage": "!!!Support Ferdi",
83 "file": "src/components/settings/navigation/SettingsNavigation.js", 83 "file": "src/components/settings/navigation/SettingsNavigation.js",
84 "start": { 84 "start": {
85 "line": 38, 85 "line": 38,
86 "column": 17 86 "column": 16
87 }, 87 },
88 "end": { 88 "end": {
89 "line": 41, 89 "line": 41,
diff --git a/src/i18n/messages/src/components/settings/supportFerdi/SupportFerdiDashboard.json b/src/i18n/messages/src/components/settings/supportFerdi/SupportFerdiDashboard.json
new file mode 100644
index 000000000..bf8df6468
--- /dev/null
+++ b/src/i18n/messages/src/components/settings/supportFerdi/SupportFerdiDashboard.json
@@ -0,0 +1,67 @@
1[
2 {
3 "id": "settings.supportFerdi.headline",
4 "defaultMessage": "!!!Support Ferdi",
5 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
6 "start": {
7 "line": 8,
8 "column": 12
9 },
10 "end": {
11 "line": 11,
12 "column": 3
13 }
14 },
15 {
16 "id": "settings.supportFerdi.title",
17 "defaultMessage": "!!!Do you like Ferdi? Spread the love!",
18 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
19 "start": {
20 "line": 12,
21 "column": 9
22 },
23 "end": {
24 "line": 15,
25 "column": 3
26 }
27 },
28 {
29 "id": "settings.supportFerdi.github",
30 "defaultMessage": "!!!Star on GitHub",
31 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
32 "start": {
33 "line": 16,
34 "column": 10
35 },
36 "end": {
37 "line": 19,
38 "column": 3
39 }
40 },
41 {
42 "id": "settings.supportFerdi.share",
43 "defaultMessage": "!!!Tell your Friends",
44 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
45 "start": {
46 "line": 20,
47 "column": 9
48 },
49 "end": {
50 "line": 23,
51 "column": 3
52 }
53 },
54 {
55 "id": "settings.supportFerdi.openCollective",
56 "defaultMessage": "!!!Support our Open Collective",
57 "file": "src/components/settings/supportFerdi/SupportFerdiDashboard.js",
58 "start": {
59 "line": 24,
60 "column": 18
61 },
62 "end": {
63 "line": 27,
64 "column": 3
65 }
66 }
67] \ No newline at end of file
diff --git a/src/styles/button.scss b/src/styles/button.scss
index a66345114..38f8fd26d 100644
--- a/src/styles/button.scss
+++ b/src/styles/button.scss
@@ -61,6 +61,11 @@
61 61
62 &:disabled { opacity: .2; } 62 &:disabled { opacity: .2; }
63 63
64 &.franz-form__button--large {
65 width: 100%;
66 margin-bottom: 20px;
67 }
68
64 &.franz-form__button--secondary { 69 &.franz-form__button--secondary {
65 background: $theme-gray-lighter; 70 background: $theme-gray-lighter;
66 color: $theme-gray; 71 color: $theme-gray;