diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2022-07-19 12:52:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 12:52:31 +0100 |
commit | 3bb1ca7825a0381ddd8dbe7f44f7dcf4a788b165 (patch) | |
tree | 6b414b9ef3be7656da1717b0d6def62e95d1fb90 /src/components/settings/settings/EditSettingsForm.jsx | |
parent | fix: remove autoHibernate (diff) | |
download | ferdium-app-3bb1ca7825a0381ddd8dbe7f44f7dcf4a788b165.tar.gz ferdium-app-3bb1ca7825a0381ddd8dbe7f44f7dcf4a788b165.tar.zst ferdium-app-3bb1ca7825a0381ddd8dbe7f44f7dcf4a788b165.zip |
Feature: Add Release Notes (#491)
Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Co-authored-by: Ricardo Cino <ricardo@cino.io>
Diffstat (limited to 'src/components/settings/settings/EditSettingsForm.jsx')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.jsx | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.jsx b/src/components/settings/settings/EditSettingsForm.jsx index cb1d261f8..a10d89570 100644 --- a/src/components/settings/settings/EditSettingsForm.jsx +++ b/src/components/settings/settings/EditSettingsForm.jsx | |||
@@ -15,6 +15,13 @@ import Input from '../../ui/Input'; | |||
15 | import ColorPickerInput from '../../ui/ColorPickerInput'; | 15 | import ColorPickerInput from '../../ui/ColorPickerInput'; |
16 | import Infobox from '../../ui/Infobox'; | 16 | import Infobox from '../../ui/Infobox'; |
17 | import { H1, H2, H3, H5 } from '../../ui/headline'; | 17 | import { H1, H2, H3, H5 } from '../../ui/headline'; |
18 | import { | ||
19 | ferdiumVersion, | ||
20 | userDataPath, | ||
21 | userDataRecipesPath, | ||
22 | } from '../../../environment-remote'; | ||
23 | |||
24 | import { updateVersionParse } from '../../../helpers/update-helpers'; | ||
18 | 25 | ||
19 | import { | 26 | import { |
20 | DEFAULT_ACCENT_COLOR, | 27 | DEFAULT_ACCENT_COLOR, |
@@ -25,11 +32,6 @@ import { | |||
25 | SPLIT_COLUMNS_MIN, | 32 | SPLIT_COLUMNS_MIN, |
26 | } from '../../../config'; | 33 | } from '../../../config'; |
27 | import { isMac, isWindows, lockFerdiumShortcutKey } from '../../../environment'; | 34 | import { isMac, isWindows, lockFerdiumShortcutKey } from '../../../environment'; |
28 | import { | ||
29 | ferdiumVersion, | ||
30 | userDataPath, | ||
31 | userDataRecipesPath, | ||
32 | } from '../../../environment-remote'; | ||
33 | import { openExternalUrl, openPath } from '../../../helpers/url-helpers'; | 35 | import { openExternalUrl, openPath } from '../../../helpers/url-helpers'; |
34 | import globalMessages from '../../../i18n/globalMessages'; | 36 | import globalMessages from '../../../i18n/globalMessages'; |
35 | import Icon from '../../ui/icon'; | 37 | import Icon from '../../ui/icon'; |
@@ -213,6 +215,10 @@ const messages = defineMessages({ | |||
213 | id: 'settings.app.buttonInstallUpdate', | 215 | id: 'settings.app.buttonInstallUpdate', |
214 | defaultMessage: 'Restart & install update', | 216 | defaultMessage: 'Restart & install update', |
215 | }, | 217 | }, |
218 | buttonShowChangelog: { | ||
219 | id: 'settings.app.buttonShowChangelog', | ||
220 | defaultMessage: 'Show changelog', | ||
221 | }, | ||
216 | updateStatusSearching: { | 222 | updateStatusSearching: { |
217 | id: 'settings.app.updateStatusSearching', | 223 | id: 'settings.app.updateStatusSearching', |
218 | defaultMessage: 'Searching for updates...', | 224 | defaultMessage: 'Searching for updates...', |
@@ -328,6 +334,7 @@ class EditSettingsForm extends Component { | |||
328 | checkForUpdates, | 334 | checkForUpdates, |
329 | installUpdate, | 335 | installUpdate, |
330 | form, | 336 | form, |
337 | updateVersion, | ||
331 | isCheckingForUpdates, | 338 | isCheckingForUpdates, |
332 | isAdaptableDarkModeEnabled, | 339 | isAdaptableDarkModeEnabled, |
333 | isUseGrayscaleServicesEnabled, | 340 | isUseGrayscaleServicesEnabled, |
@@ -1002,6 +1009,20 @@ class EditSettingsForm extends Component { | |||
1002 | loaded={!isCheckingForUpdates || !isUpdateAvailable} | 1009 | loaded={!isCheckingForUpdates || !isUpdateAvailable} |
1003 | /> | 1010 | /> |
1004 | )} | 1011 | )} |
1012 | {(isUpdateAvailable || updateIsReadyToInstall) && ( | ||
1013 | <Button | ||
1014 | className="settings__updates__changelog-button" | ||
1015 | label={intl.formatMessage( | ||
1016 | messages.buttonShowChangelog, | ||
1017 | )} | ||
1018 | onClick={() => { | ||
1019 | window.location.href = `#/releasenotes${updateVersionParse( | ||
1020 | updateVersion, | ||
1021 | )}`; | ||
1022 | }} | ||
1023 | /> | ||
1024 | )} | ||
1025 | <br /> | ||
1005 | <br /> | 1026 | <br /> |
1006 | </div> | 1027 | </div> |
1007 | <p> | 1028 | <p> |