diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-14 15:17:27 +0530 |
---|---|---|
committer | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-14 10:20:16 +0000 |
commit | ae033f72650f54c5804134a2ff2a461294b7c2f5 (patch) | |
tree | 88d79ae806b7e677ba8fdeae55c8fdbfd26afe59 /src/environment.js | |
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/environment.js')
-rw-r--r-- | src/environment.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/environment.js b/src/environment.js index f2a889be4..6332ad67b 100644 --- a/src/environment.js +++ b/src/environment.js | |||
@@ -1,7 +1,9 @@ | |||
1 | import os from 'os'; | 1 | import os from 'os'; |
2 | import { join } from 'path'; | 2 | import { join } from 'path'; |
3 | import { ensureDirSync } from 'fs-extra'; | ||
3 | 4 | ||
4 | import { is, api as electronApi } from 'electron-util'; | 5 | import { is, api as electronApi } from 'electron-util'; |
6 | import { shell } from 'electron'; | ||
5 | 7 | ||
6 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; | 8 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; |
7 | 9 | ||
@@ -63,6 +65,11 @@ export function asarRecipesPath(...segments) { | |||
63 | return join(asarPath(join(__dirname, 'recipes')), ...([segments].flat())); | 65 | return join(asarPath(join(__dirname, 'recipes')), ...([segments].flat())); |
64 | } | 66 | } |
65 | 67 | ||
68 | export async function openPath(folderName) { | ||
69 | ensureDirSync(folderName); | ||
70 | shell.openPath(folderName); | ||
71 | } | ||
72 | |||
66 | export const useLiveAPI = process.env.USE_LIVE_API; | 73 | export const useLiveAPI = process.env.USE_LIVE_API; |
67 | const useLocalAPI = process.env.USE_LOCAL_API; | 74 | const useLocalAPI = process.env.USE_LOCAL_API; |
68 | 75 | ||