diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/recipes/RecipesDashboard.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/components/settings/recipes/RecipesDashboard.js b/src/components/settings/recipes/RecipesDashboard.js index d08e6cbc2..90e89ffa9 100644 --- a/src/components/settings/recipes/RecipesDashboard.js +++ b/src/components/settings/recipes/RecipesDashboard.js | |||
@@ -15,6 +15,7 @@ import Appear from '../../ui/effects/Appear'; | |||
15 | import { FRANZ_SERVICE_REQUEST } from '../../../config'; | 15 | import { FRANZ_SERVICE_REQUEST } from '../../../config'; |
16 | import LimitReachedInfobox from '../../../features/serviceLimit/components/LimitReachedInfobox'; | 16 | import LimitReachedInfobox from '../../../features/serviceLimit/components/LimitReachedInfobox'; |
17 | import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; | 17 | import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; |
18 | import RecipePreview from '../../../models/RecipePreview'; | ||
18 | 19 | ||
19 | const messages = defineMessages({ | 20 | const messages = defineMessages({ |
20 | headline: { | 21 | headline: { |
@@ -39,7 +40,7 @@ const messages = defineMessages({ | |||
39 | }, | 40 | }, |
40 | nothingFound: { | 41 | nothingFound: { |
41 | id: 'settings.recipes.nothingFound', | 42 | id: 'settings.recipes.nothingFound', |
42 | defaultMessage: '!!!Sorry, but no service matched your search term.', | 43 | defaultMessage: '!!!Sorry, but no service matched your search term - but you can still probably add it using the "Custom Website" option:', |
43 | }, | 44 | }, |
44 | servicesSuccessfulAddedInfo: { | 45 | servicesSuccessfulAddedInfo: { |
45 | id: 'settings.recipes.servicesSuccessfulAddedInfo', | 46 | id: 'settings.recipes.servicesSuccessfulAddedInfo', |
@@ -106,6 +107,7 @@ const styles = { | |||
106 | export default @injectSheet(styles) @observer class RecipesDashboard extends Component { | 107 | export default @injectSheet(styles) @observer class RecipesDashboard extends Component { |
107 | static propTypes = { | 108 | static propTypes = { |
108 | recipes: MobxPropTypes.arrayOrObservableArray.isRequired, | 109 | recipes: MobxPropTypes.arrayOrObservableArray.isRequired, |
110 | customWebsiteRecipe: PropTypes.instanceOf(RecipePreview).isRequired, | ||
109 | isLoading: PropTypes.bool.isRequired, | 111 | isLoading: PropTypes.bool.isRequired, |
110 | hasLoadedRecipes: PropTypes.bool.isRequired, | 112 | hasLoadedRecipes: PropTypes.bool.isRequired, |
111 | showAddServiceInterface: PropTypes.func.isRequired, | 113 | showAddServiceInterface: PropTypes.func.isRequired, |
@@ -133,6 +135,7 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
133 | render() { | 135 | render() { |
134 | const { | 136 | const { |
135 | recipes, | 137 | recipes, |
138 | customWebsiteRecipe, | ||
136 | isLoading, | 139 | isLoading, |
137 | hasLoadedRecipes, | 140 | hasLoadedRecipes, |
138 | showAddServiceInterface, | 141 | showAddServiceInterface, |
@@ -256,12 +259,19 @@ export default @injectSheet(styles) @observer class RecipesDashboard extends Com | |||
256 | )} | 259 | )} |
257 | <div className="recipes__list"> | 260 | <div className="recipes__list"> |
258 | {hasLoadedRecipes && recipes.length === 0 && recipeFilter !== 'dev' && ( | 261 | {hasLoadedRecipes && recipes.length === 0 && recipeFilter !== 'dev' && ( |
259 | <p className="align-middle settings__empty-state"> | 262 | <div className="align-middle settings__empty-state"> |
260 | <span className="emoji"> | 263 | <span className="emoji"> |
261 | <img src="./assets/images/emoji/dontknow.png" alt="" /> | 264 | <img src="./assets/images/emoji/dontknow.png" alt="" /> |
262 | </span> | 265 | </span> |
263 | {intl.formatMessage(messages.nothingFound)} | 266 | |
264 | </p> | 267 | <p className="settings__empty-state-text">{intl.formatMessage(messages.nothingFound)}</p> |
268 | |||
269 | <RecipeItem | ||
270 | key={customWebsiteRecipe.id} | ||
271 | recipe={customWebsiteRecipe} | ||
272 | onClick={() => isLoggedIn && showAddServiceInterface({ recipeId: customWebsiteRecipe.id })} | ||
273 | /> | ||
274 | </div> | ||
265 | )} | 275 | )} |
266 | {communityRecipes.map(recipe => ( | 276 | {communityRecipes.map(recipe => ( |
267 | <RecipeItem | 277 | <RecipeItem |