diff options
author | 2017-11-21 11:53:55 +0100 | |
---|---|---|
committer | 2017-11-21 11:53:55 +0100 | |
commit | 51959acf3ed9f9963b9ecb5879b29493308e979c (patch) | |
tree | 64685eff8799cbf917fc9c0104508f8c7cee5d5e /src/components/settings | |
parent | Merge branch 'develop' into feature/add-service-request (diff) | |
download | ferdium-app-51959acf3ed9f9963b9ecb5879b29493308e979c.tar.gz ferdium-app-51959acf3ed9f9963b9ecb5879b29493308e979c.tar.zst ferdium-app-51959acf3ed9f9963b9ecb5879b29493308e979c.zip |
Add service request to recipe dashboard
Diffstat (limited to 'src/components/settings')
-rw-r--r-- | src/components/settings/recipes/RecipesDashboard.js | 57 | ||||
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 4 |
2 files changed, 37 insertions, 24 deletions
diff --git a/src/components/settings/recipes/RecipesDashboard.js b/src/components/settings/recipes/RecipesDashboard.js index 02ea04e35..b6ade5da4 100644 --- a/src/components/settings/recipes/RecipesDashboard.js +++ b/src/components/settings/recipes/RecipesDashboard.js | |||
@@ -9,6 +9,7 @@ import Infobox from '../../ui/Infobox'; | |||
9 | import RecipeItem from './RecipeItem'; | 9 | import RecipeItem from './RecipeItem'; |
10 | import Loader from '../../ui/Loader'; | 10 | import Loader from '../../ui/Loader'; |
11 | import Appear from '../../ui/effects/Appear'; | 11 | import Appear from '../../ui/effects/Appear'; |
12 | import { FRANZ_SERVICE_REQUEST } from '../../../config'; | ||
12 | 13 | ||
13 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
14 | headline: { | 15 | headline: { |
@@ -35,6 +36,10 @@ const messages = defineMessages({ | |||
35 | id: 'settings.recipes.servicesSuccessfulAddedInfo', | 36 | id: 'settings.recipes.servicesSuccessfulAddedInfo', |
36 | defaultMessage: '!!!Service successfully added', | 37 | defaultMessage: '!!!Service successfully added', |
37 | }, | 38 | }, |
39 | missingService: { | ||
40 | id: 'settings.recipes.missingService', | ||
41 | defaultMessage: '!!!Missing a service?', | ||
42 | }, | ||
38 | }); | 43 | }); |
39 | 44 | ||
40 | @observer | 45 | @observer |
@@ -96,33 +101,39 @@ export default class RecipesDashboard extends Component { | |||
96 | </Infobox> | 101 | </Infobox> |
97 | </Appear> | 102 | </Appear> |
98 | )} | 103 | )} |
99 | {!searchNeedle && ( | 104 | {/* {!searchNeedle && ( */} |
100 | <div className="recipes__navigation"> | 105 | <div className="recipes__navigation"> |
101 | <Link | 106 | <Link |
102 | to="/settings/recipes" | 107 | to="/settings/recipes" |
103 | className="badge" | 108 | className="badge" |
104 | activeClassName="badge--primary" | 109 | activeClassName={`${!searchNeedle ? 'badge--primary' : ''}`} |
105 | > | 110 | onClick={() => resetSearch()} |
106 | {intl.formatMessage(messages.mostPopularRecipes)} | 111 | > |
107 | </Link> | 112 | {intl.formatMessage(messages.mostPopularRecipes)} |
113 | </Link> | ||
114 | <Link | ||
115 | to="/settings/recipes/all" | ||
116 | className="badge" | ||
117 | activeClassName={`${!searchNeedle ? 'badge--primary' : ''}`} | ||
118 | onClick={() => resetSearch()} | ||
119 | > | ||
120 | {intl.formatMessage(messages.allRecipes)} | ||
121 | </Link> | ||
122 | {devRecipesCount > 0 && ( | ||
108 | <Link | 123 | <Link |
109 | to="/settings/recipes/all" | 124 | to="/settings/recipes/dev" |
110 | className="badge" | 125 | className="badge" |
111 | activeClassName="badge--primary" | 126 | activeClassName={`${!searchNeedle ? 'badge--primary' : ''}`} |
127 | onClick={() => resetSearch()} | ||
112 | > | 128 | > |
113 | {intl.formatMessage(messages.allRecipes)} | 129 | {intl.formatMessage(messages.devRecipes)} ({devRecipesCount}) |
114 | </Link> | 130 | </Link> |
115 | {devRecipesCount > 0 && ( | 131 | )} |
116 | <Link | 132 | <a href={FRANZ_SERVICE_REQUEST} target="_blank" className="link recipes__service-request"> |
117 | to="/settings/recipes/dev" | 133 | {intl.formatMessage(messages.missingService)} <i className="mdi mdi-open-in-new" /> |
118 | className="badge" | 134 | </a> |
119 | activeClassName="badge--primary" | 135 | </div> |
120 | > | 136 | {/* )} */} |
121 | {intl.formatMessage(messages.devRecipes)} ({devRecipesCount}) | ||
122 | </Link> | ||
123 | )} | ||
124 | </div> | ||
125 | )} | ||
126 | {isLoading ? ( | 137 | {isLoading ? ( |
127 | <Loader /> | 138 | <Loader /> |
128 | ) : ( | 139 | ) : ( |
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 941f2149e..4ce9b7ab2 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -9,6 +9,8 @@ import Button from '../../ui/Button'; | |||
9 | import Toggle from '../../ui/Toggle'; | 9 | import Toggle from '../../ui/Toggle'; |
10 | import Select from '../../ui/Select'; | 10 | import Select from '../../ui/Select'; |
11 | 11 | ||
12 | import { FRANZ_TRANSLATION } from '../../../config'; | ||
13 | |||
12 | const messages = defineMessages({ | 14 | const messages = defineMessages({ |
13 | headline: { | 15 | headline: { |
14 | id: 'settings.app.headline', | 16 | id: 'settings.app.headline', |
@@ -145,7 +147,7 @@ export default class EditSettingsForm extends Component { | |||
145 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> | 147 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> |
146 | <Select field={form.$('locale')} showLabel={false} /> | 148 | <Select field={form.$('locale')} showLabel={false} /> |
147 | <a | 149 | <a |
148 | href="http://i18n.meetfranz.com" | 150 | href={FRANZ_TRANSLATION} |
149 | target="_blank" | 151 | target="_blank" |
150 | className="link" | 152 | className="link" |
151 | > | 153 | > |