diff options
author | Amine <amine@mouafik.fr> | 2020-03-28 15:29:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 15:29:54 +0100 |
commit | 26894250a23127d2676a150be1a323ea2bd4ad96 (patch) | |
tree | aadaa7dd57bcc8fb20d7a0284cff158d15da8818 /src/components | |
parent | Merge pull request #498 from getferdi/fix/retry-ci (diff) | |
parent | Hide user lastname on Ferdi servers as it is not stored (diff) | |
download | ferdium-app-26894250a23127d2676a150be1a323ea2bd4ad96.tar.gz ferdium-app-26894250a23127d2676a150be1a323ea2bd4ad96.tar.zst ferdium-app-26894250a23127d2676a150be1a323ea2bd4ad96.zip |
Merge pull request #497 from getferdi/improve-premium-information
Improve information about Premium subscriptions and Teams
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 43 | ||||
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 25 | ||||
-rw-r--r-- | src/components/settings/team/TeamDashboard.js | 6 |
3 files changed, 40 insertions, 34 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 7d6bad883..5c3dc21d0 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -154,6 +154,7 @@ class AccountDashboard extends Component { | |||
154 | } | 154 | } |
155 | 155 | ||
156 | const isUsingWithoutAccount = server === LOCAL_SERVER; | 156 | const isUsingWithoutAccount = server === LOCAL_SERVER; |
157 | const isUsingFranzServer = server === 'https://api.franzinfra.com'; | ||
157 | 158 | ||
158 | return ( | 159 | return ( |
159 | <div className="settings__main"> | 160 | <div className="settings__main"> |
@@ -208,7 +209,7 @@ class AccountDashboard extends Component { | |||
208 | </div> | 209 | </div> |
209 | <div className="account__info"> | 210 | <div className="account__info"> |
210 | <H1> | 211 | <H1> |
211 | <span className="username">{`${user.firstname} ${user.lastname}`}</span> | 212 | <span className="username">{`${user.firstname} ${isUsingFranzServer ? user.lastname : ''}`}</span> |
212 | {user.isPremium && ( | 213 | {user.isPremium && ( |
213 | <> | 214 | <> |
214 | {' '} | 215 | {' '} |
@@ -243,7 +244,7 @@ class AccountDashboard extends Component { | |||
243 | )} | 244 | )} |
244 | </div> | 245 | </div> |
245 | </div> | 246 | </div> |
246 | {user.isPremium && user.isSubscriptionOwner && ( | 247 | {user.isPremium && user.isSubscriptionOwner && isUsingFranzServer && ( |
247 | <div className="account"> | 248 | <div className="account"> |
248 | <div className="account__box"> | 249 | <div className="account__box"> |
249 | <H2>{intl.formatMessage(messages.yourLicense)}</H2> | 250 | <H2>{intl.formatMessage(messages.yourLicense)}</H2> |
@@ -322,25 +323,27 @@ class AccountDashboard extends Component { | |||
322 | </> | 323 | </> |
323 | )} | 324 | )} |
324 | 325 | ||
325 | <div className="account franz-form"> | 326 | {isUsingFranzServer && ( |
326 | <div className="account__box"> | 327 | <div className="account franz-form"> |
327 | <H2>{intl.formatMessage(messages.headlineDangerZone)}</H2> | 328 | <div className="account__box"> |
328 | {!isDeleteAccountSuccessful && ( | 329 | <H2>{intl.formatMessage(messages.headlineDangerZone)}</H2> |
329 | <div className="account__subscription"> | 330 | {!isDeleteAccountSuccessful && ( |
330 | <p>{intl.formatMessage(messages.deleteInfo)}</p> | 331 | <div className="account__subscription"> |
331 | <Button | 332 | <p>{intl.formatMessage(messages.deleteInfo)}</p> |
332 | label={intl.formatMessage(messages.deleteAccount)} | 333 | <Button |
333 | buttonType="danger" | 334 | label={intl.formatMessage(messages.deleteAccount)} |
334 | onClick={() => deleteAccount()} | 335 | buttonType="danger" |
335 | loaded={!isLoadingDeleteAccount} | 336 | onClick={() => deleteAccount()} |
336 | /> | 337 | loaded={!isLoadingDeleteAccount} |
337 | </div> | 338 | /> |
338 | )} | 339 | </div> |
339 | {isDeleteAccountSuccessful && ( | 340 | )} |
340 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> | 341 | {isDeleteAccountSuccessful && ( |
341 | )} | 342 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> |
343 | )} | ||
344 | </div> | ||
342 | </div> | 345 | </div> |
343 | </div> | 346 | )} |
344 | </> | 347 | </> |
345 | )} | 348 | )} |
346 | </> | 349 | </> |
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index eb3249fa0..6b03f05be 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -105,6 +105,7 @@ export default @inject('stores', 'actions') @observer class SettingsNavigation e | |||
105 | const { intl } = this.context; | 105 | const { intl } = this.context; |
106 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); | 106 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); |
107 | const isUsingWithoutAccount = stores.settings.app.server === LOCAL_SERVER; | 107 | const isUsingWithoutAccount = stores.settings.app.server === LOCAL_SERVER; |
108 | const isUsingFranzServer = stores.settings.app.server === 'https://api.franzinfra.com'; | ||
108 | 109 | ||
109 | return ( | 110 | return ( |
110 | <div className="settings-navigation"> | 111 | <div className="settings-navigation"> |
@@ -154,17 +155,19 @@ export default @inject('stores', 'actions') @observer class SettingsNavigation e | |||
154 | > | 155 | > |
155 | {intl.formatMessage(messages.account)} | 156 | {intl.formatMessage(messages.account)} |
156 | </Link> | 157 | </Link> |
157 | <Link | 158 | {isUsingFranzServer && ( |
158 | to="/settings/team" | 159 | <Link |
159 | className="settings-navigation__link" | 160 | to="/settings/team" |
160 | activeClassName="is-active" | 161 | className="settings-navigation__link" |
161 | disabled={!isLoggedIn} | 162 | activeClassName="is-active" |
162 | > | 163 | disabled={!isLoggedIn} |
163 | {intl.formatMessage(messages.team)} | 164 | > |
164 | {!user.data.isPremium && ( | 165 | {intl.formatMessage(messages.team)} |
165 | <ProBadge inverted={!isDarkThemeActive && router.location.pathname === '/settings/team'} /> | 166 | {!user.data.isPremium && ( |
166 | )} | 167 | <ProBadge inverted={!isDarkThemeActive && router.location.pathname === '/settings/team'} /> |
167 | </Link> | 168 | )} |
169 | </Link> | ||
170 | )} | ||
168 | <Link | 171 | <Link |
169 | to="/settings/app" | 172 | to="/settings/app" |
170 | className="settings-navigation__link" | 173 | className="settings-navigation__link" |
diff --git a/src/components/settings/team/TeamDashboard.js b/src/components/settings/team/TeamDashboard.js index 3d5358d89..72358d485 100644 --- a/src/components/settings/team/TeamDashboard.js +++ b/src/components/settings/team/TeamDashboard.js | |||
@@ -20,15 +20,15 @@ const messages = defineMessages({ | |||
20 | }, | 20 | }, |
21 | contentHeadline: { | 21 | contentHeadline: { |
22 | id: 'settings.team.contentHeadline', | 22 | id: 'settings.team.contentHeadline', |
23 | defaultMessage: '!!!Ferdi for Teams', | 23 | defaultMessage: '!!!Franz Team Management', |
24 | }, | 24 | }, |
25 | intro: { | 25 | intro: { |
26 | id: 'settings.team.intro', | 26 | id: 'settings.team.intro', |
27 | defaultMessage: '!!!You and your team use Franz? You can now manage Premium subscriptions for as many colleagues, friends or family members as you want, all from within one account.', | 27 | defaultMessage: '!!!Your are currently using Franz Servers, which is why you have access to Team Management.', |
28 | }, | 28 | }, |
29 | copy: { | 29 | copy: { |
30 | id: 'settings.team.copy', | 30 | id: 'settings.team.copy', |
31 | defaultMessage: '!!!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!', | 31 | defaultMessage: '!!!Franz\'s Team Management allows you to manage Franz Subscriptions for multiple users. Please keep in mind that having a Franz Premium subscription will give you no advantages in using Ferdi: The only reason you still have access to Team Management is so you can manage your legacy Franz Teams and so that you don\'t loose any functionality in managing your account.', |
32 | }, | 32 | }, |
33 | manageButton: { | 33 | manageButton: { |
34 | id: 'settings.team.manageAction', | 34 | id: 'settings.team.manageAction', |