diff options
author | 2024-05-06 14:56:26 +0100 | |
---|---|---|
committer | 2024-05-06 19:26:26 +0530 | |
commit | fd8885b869808936ab58c492e9ce602bfe3c3713 (patch) | |
tree | f71737871033539fa54f5504f4c6234829e8cd28 /src/containers/settings | |
parent | Refactor context menu to be more consistent across all contexts (#1745) (diff) | |
download | ferdium-app-fd8885b869808936ab58c492e9ce602bfe3c3713.tar.gz ferdium-app-fd8885b869808936ab58c492e9ce602bfe3c3713.tar.zst ferdium-app-fd8885b869808936ab58c492e9ce602bfe3c3713.zip |
feat: default download path as a user preference (#1746)
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/containers/settings/EditSettingsScreen.tsx b/src/containers/settings/EditSettingsScreen.tsx index fdd9bd8bc..a596e53a3 100644 --- a/src/containers/settings/EditSettingsScreen.tsx +++ b/src/containers/settings/EditSettingsScreen.tsx | |||
@@ -341,6 +341,11 @@ const messages = defineMessages({ | |||
341 | id: 'settings.app.form.keepAllWorkspacesLoaded', | 341 | id: 'settings.app.form.keepAllWorkspacesLoaded', |
342 | defaultMessage: 'Keep all workspaces loaded', | 342 | defaultMessage: 'Keep all workspaces loaded', |
343 | }, | 343 | }, |
344 | downloadFolderPath: { | ||
345 | id: 'settings.app.form.downloadFolderPath', | ||
346 | defaultMessage: | ||
347 | 'Default download folder (leave blank to be prompted for each download)', | ||
348 | }, | ||
344 | }); | 349 | }); |
345 | 350 | ||
346 | interface EditSettingsScreenProps extends StoresProps, WrappedComponentProps {} | 351 | interface EditSettingsScreenProps extends StoresProps, WrappedComponentProps {} |
@@ -430,6 +435,7 @@ class EditSettingsScreen extends Component< | |||
430 | scheduledDNDStart: settingsData.scheduledDNDStart, | 435 | scheduledDNDStart: settingsData.scheduledDNDStart, |
431 | scheduledDNDEnd: settingsData.scheduledDNDEnd, | 436 | scheduledDNDEnd: settingsData.scheduledDNDEnd, |
432 | enableGPUAcceleration: Boolean(settingsData.enableGPUAcceleration), | 437 | enableGPUAcceleration: Boolean(settingsData.enableGPUAcceleration), |
438 | downloadFolderPath: String(settingsData.downloadFolderPath), | ||
433 | enableGlobalHideShortcut: Boolean( | 439 | enableGlobalHideShortcut: Boolean( |
434 | settingsData.enableGlobalHideShortcut, | 440 | settingsData.enableGlobalHideShortcut, |
435 | ), | 441 | ), |
@@ -982,6 +988,14 @@ class EditSettingsScreen extends Component< | |||
982 | default: DEFAULT_APP_SETTINGS.userAgentPref, | 988 | default: DEFAULT_APP_SETTINGS.userAgentPref, |
983 | placeholder: defaultUserAgent(), | 989 | placeholder: defaultUserAgent(), |
984 | }, | 990 | }, |
991 | downloadFolderPath: { | ||
992 | label: intl.formatMessage(messages.downloadFolderPath), | ||
993 | value: ifUndefined<string>( | ||
994 | settings.all.app.downloadFolderPath, | ||
995 | DEFAULT_APP_SETTINGS.downloadFolderPath, | ||
996 | ), | ||
997 | default: DEFAULT_APP_SETTINGS.userAgentPref, | ||
998 | }, | ||
985 | darkMode: { | 999 | darkMode: { |
986 | label: intl.formatMessage(messages.darkMode), | 1000 | label: intl.formatMessage(messages.darkMode), |
987 | value: ifUndefined<boolean>( | 1001 | value: ifUndefined<boolean>( |