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/AppUpdateInfoBar.tsx | |
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/AppUpdateInfoBar.tsx')
-rw-r--r-- | src/components/AppUpdateInfoBar.tsx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/components/AppUpdateInfoBar.tsx b/src/components/AppUpdateInfoBar.tsx index 48efbfb7f..3ff488b74 100644 --- a/src/components/AppUpdateInfoBar.tsx +++ b/src/components/AppUpdateInfoBar.tsx | |||
@@ -2,10 +2,10 @@ import { defineMessages, useIntl } from 'react-intl'; | |||
2 | 2 | ||
3 | import { mdiInformation } from '@mdi/js'; | 3 | import { mdiInformation } from '@mdi/js'; |
4 | import InfoBar from './ui/InfoBar'; | 4 | import InfoBar from './ui/InfoBar'; |
5 | import { GITHUB_FERDIUM_URL } from '../config'; | ||
6 | import { openExternalUrl } from '../helpers/url-helpers'; | ||
7 | import Icon from './ui/icon'; | 5 | import Icon from './ui/icon'; |
8 | 6 | ||
7 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; | ||
8 | |||
9 | const messages = defineMessages({ | 9 | const messages = defineMessages({ |
10 | updateAvailable: { | 10 | updateAvailable: { |
11 | id: 'infobar.updateAvailable', | 11 | id: 'infobar.updateAvailable', |
@@ -24,9 +24,14 @@ const messages = defineMessages({ | |||
24 | type Props = { | 24 | type Props = { |
25 | onInstallUpdate: () => void; | 25 | onInstallUpdate: () => void; |
26 | onHide: () => void; | 26 | onHide: () => void; |
27 | updateVersionParsed: string; | ||
27 | }; | 28 | }; |
28 | 29 | ||
29 | const AppUpdateInfoBar = ({ onInstallUpdate, onHide }: Props) => { | 30 | const AppUpdateInfoBar = ({ |
31 | onInstallUpdate, | ||
32 | updateVersionParsed, | ||
33 | onHide, | ||
34 | }: Props) => { | ||
30 | const intl = useIntl(); | 35 | const intl = useIntl(); |
31 | 36 | ||
32 | return ( | 37 | return ( |
@@ -41,12 +46,12 @@ const AppUpdateInfoBar = ({ onInstallUpdate, onHide }: Props) => { | |||
41 | <button | 46 | <button |
42 | className="info-bar__inline-button" | 47 | className="info-bar__inline-button" |
43 | type="button" | 48 | type="button" |
44 | onClick={() => | 49 | onClick={() => { |
45 | openExternalUrl( | 50 | window.location.href = onAuthGoToReleaseNotes( |
46 | `${GITHUB_FERDIUM_URL}/ferdium-app/blob/develop/CHANGELOG.md`, | 51 | window.location.href, |
47 | true, | 52 | updateVersionParsed, |
48 | ) | 53 | ); |
49 | } | 54 | }} |
50 | > | 55 | > |
51 | <u>{intl.formatMessage(messages.changelog)}</u> | 56 | <u>{intl.formatMessage(messages.changelog)}</u> |
52 | </button> | 57 | </button> |