diff options
author | 2019-04-12 13:32:52 +0200 | |
---|---|---|
committer | 2019-04-12 13:32:52 +0200 | |
commit | a24af19461d5270fc474d92521be39160377610e (patch) | |
tree | 2f7eda1ff464f020941d19e9504aebc2fd435a52 /src/components/settings | |
parent | Merge branch 'develop' into chore/streamline-dashboard (diff) | |
download | ferdium-app-a24af19461d5270fc474d92521be39160377610e.tar.gz ferdium-app-a24af19461d5270fc474d92521be39160377610e.tar.zst ferdium-app-a24af19461d5270fc474d92521be39160377610e.zip |
Fix styling issues & add premium badge
Diffstat (limited to 'src/components/settings')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 10 | ||||
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 6 | ||||
-rw-r--r-- | src/components/settings/team/TeamDashboard.js | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index ea335815c..4a73b51d9 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; | |||
3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | 3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; |
4 | import { defineMessages, intlShape } from 'react-intl'; | 4 | import { defineMessages, intlShape } from 'react-intl'; |
5 | import ReactTooltip from 'react-tooltip'; | 5 | import ReactTooltip from 'react-tooltip'; |
6 | import { ProBadge } from '@meetfranz/ui'; | ||
6 | 7 | ||
7 | import Loader from '../../ui/Loader'; | 8 | import Loader from '../../ui/Loader'; |
8 | import Button from '../../ui/Button'; | 9 | import Button from '../../ui/Button'; |
@@ -143,14 +144,6 @@ export default @observer class AccountDashboard extends Component { | |||
143 | src="./assets/images/logo.svg" | 144 | src="./assets/images/logo.svg" |
144 | alt="" | 145 | alt="" |
145 | /> | 146 | /> |
146 | {user.isPremium && ( | ||
147 | <span | ||
148 | className="account__avatar-premium emoji" | ||
149 | data-tip="Premium Supporter Account" | ||
150 | > | ||
151 | <img src="./assets/images/emoji/star.png" alt="" /> | ||
152 | </span> | ||
153 | )} | ||
154 | </div> | 147 | </div> |
155 | <div className="account__info"> | 148 | <div className="account__info"> |
156 | <h2> | 149 | <h2> |
@@ -158,6 +151,7 @@ export default @observer class AccountDashboard extends Component { | |||
158 | {user.isPremium && ( | 151 | {user.isPremium && ( |
159 | <> | 152 | <> |
160 | {' '} | 153 | {' '} |
154 | <ProBadge /> | ||
161 | <span className="badge badge--premium">{intl.formatMessage(messages.accountTypePremium)}</span> | 155 | <span className="badge badge--premium">{intl.formatMessage(messages.accountTypePremium)}</span> |
162 | </> | 156 | </> |
163 | )} | 157 | )} |
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index cab6f23d7..df4b3b3b2 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -7,6 +7,7 @@ import { ProBadge } from '@meetfranz/ui'; | |||
7 | import Link from '../../ui/Link'; | 7 | import Link from '../../ui/Link'; |
8 | import { workspaceStore } from '../../../features/workspaces'; | 8 | import { workspaceStore } from '../../../features/workspaces'; |
9 | import UIStore from '../../../stores/UIStore'; | 9 | import UIStore from '../../../stores/UIStore'; |
10 | import UserStore from '../../../stores/UserStore'; | ||
10 | 11 | ||
11 | const messages = defineMessages({ | 12 | const messages = defineMessages({ |
12 | availableServices: { | 13 | availableServices: { |
@@ -47,6 +48,7 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
47 | static propTypes = { | 48 | static propTypes = { |
48 | stores: PropTypes.shape({ | 49 | stores: PropTypes.shape({ |
49 | ui: PropTypes.instanceOf(UIStore).isRequired, | 50 | ui: PropTypes.instanceOf(UIStore).isRequired, |
51 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
50 | }).isRequired, | 52 | }).isRequired, |
51 | serviceCount: PropTypes.number.isRequired, | 53 | serviceCount: PropTypes.number.isRequired, |
52 | workspaceCount: PropTypes.number.isRequired, | 54 | workspaceCount: PropTypes.number.isRequired, |
@@ -59,6 +61,7 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
59 | render() { | 61 | render() { |
60 | const { serviceCount, workspaceCount, stores } = this.props; | 62 | const { serviceCount, workspaceCount, stores } = this.props; |
61 | const { isDarkThemeActive } = stores.ui; | 63 | const { isDarkThemeActive } = stores.ui; |
64 | const { router, user } = stores; | ||
62 | const { intl } = this.context; | 65 | const { intl } = this.context; |
63 | 66 | ||
64 | return ( | 67 | return ( |
@@ -107,6 +110,9 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
107 | activeClassName="is-active" | 110 | activeClassName="is-active" |
108 | > | 111 | > |
109 | {intl.formatMessage(messages.team)} | 112 | {intl.formatMessage(messages.team)} |
113 | {!user.data.isPremium && ( | ||
114 | <ProBadge inverted={!isDarkThemeActive && router.location.pathname === '/settings/team'} /> | ||
115 | )} | ||
110 | </Link> | 116 | </Link> |
111 | <Link | 117 | <Link |
112 | to="/settings/app" | 118 | to="/settings/app" |
diff --git a/src/components/settings/team/TeamDashboard.js b/src/components/settings/team/TeamDashboard.js index e222bb14c..3eb464d49 100644 --- a/src/components/settings/team/TeamDashboard.js +++ b/src/components/settings/team/TeamDashboard.js | |||
@@ -29,7 +29,7 @@ const messages = defineMessages({ | |||
29 | }, | 29 | }, |
30 | manageButton: { | 30 | manageButton: { |
31 | id: 'settings.team.manageAction', | 31 | id: 'settings.team.manageAction', |
32 | defaultMessage: '!!!Manage your Team', | 32 | defaultMessage: '!!!Manage your Team on meetfranz.com', |
33 | }, | 33 | }, |
34 | upgradeButton: { | 34 | upgradeButton: { |
35 | id: 'settings.team.upgradeAction', | 35 | id: 'settings.team.upgradeAction', |