diff options
author | 2021-08-14 15:17:27 +0530 | |
---|---|---|
committer | 2021-08-14 10:20:16 +0000 | |
commit | ae033f72650f54c5804134a2ff2a461294b7c2f5 (patch) | |
tree | 88d79ae806b7e677ba8fdeae55c8fdbfd26afe59 /src/containers | |
parent | doc: Updated Changelog [skip ci] (diff) | |
download | ferdium-app-ae033f72650f54c5804134a2ff2a461294b7c2f5.tar.gz ferdium-app-ae033f72650f54c5804134a2ff2a461294b7c2f5.tar.zst ferdium-app-ae033f72650f54c5804134a2ff2a461294b7c2f5.zip |
feat: Add buttons in the 'Advanced' section of preferences to allow the user to quickly open the Ferdi profile folder
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/RecipesScreen.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/containers/settings/RecipesScreen.js b/src/containers/settings/RecipesScreen.js index 52bf31383..526e0a1a9 100644 --- a/src/containers/settings/RecipesScreen.js +++ b/src/containers/settings/RecipesScreen.js | |||
@@ -1,5 +1,4 @@ | |||
1 | import { shell } from 'electron'; | 1 | import { readJsonSync } from 'fs-extra'; |
2 | import { ensureDirSync, readJsonSync } from 'fs-extra'; | ||
3 | import React, { Component } from 'react'; | 2 | import React, { Component } from 'react'; |
4 | import PropTypes from 'prop-types'; | 3 | import PropTypes from 'prop-types'; |
5 | import { autorun } from 'mobx'; | 4 | import { autorun } from 'mobx'; |
@@ -13,7 +12,7 @@ import UserStore from '../../stores/UserStore'; | |||
13 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; | 12 | import RecipesDashboard from '../../components/settings/recipes/RecipesDashboard'; |
14 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 13 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
15 | import { CUSTOM_WEBSITE_RECIPE_ID, FRANZ_DEV_DOCS } from '../../config'; | 14 | import { CUSTOM_WEBSITE_RECIPE_ID, FRANZ_DEV_DOCS } from '../../config'; |
16 | import { asarRecipesPath, userDataRecipesPath } from '../../environment'; | 15 | import { asarRecipesPath, openPath, userDataRecipesPath } from '../../environment'; |
17 | import { communityRecipesStore } from '../../features/communityRecipes'; | 16 | import { communityRecipesStore } from '../../features/communityRecipes'; |
18 | import RecipePreview from '../../models/RecipePreview'; | 17 | import RecipePreview from '../../models/RecipePreview'; |
19 | import AppStore from '../../stores/AppStore'; | 18 | import AppStore from '../../stores/AppStore'; |
@@ -154,13 +153,8 @@ export default @inject('stores', 'actions') @observer class RecipesScreen extend | |||
154 | serviceStatus={services.actionStatus} | 153 | serviceStatus={services.actionStatus} |
155 | recipeFilter={filter} | 154 | recipeFilter={filter} |
156 | recipeDirectory={recipeDirectory} | 155 | recipeDirectory={recipeDirectory} |
157 | openRecipeDirectory={async () => { | 156 | openRecipeDirectory={() => openPath(recipeDirectory)} |
158 | ensureDirSync(recipeDirectory); | 157 | openDevDocs={() => appActions.openExternalUrl({ url: FRANZ_DEV_DOCS })} |
159 | shell.openExternal(`file://${recipeDirectory}`); | ||
160 | }} | ||
161 | openDevDocs={() => { | ||
162 | appActions.openExternalUrl({ url: FRANZ_DEV_DOCS }); | ||
163 | }} | ||
164 | /> | 158 | /> |
165 | </ErrorBoundary> | 159 | </ErrorBoundary> |
166 | ); | 160 | ); |