aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/AppUpdateInfoBar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/AppUpdateInfoBar.tsx')
-rw-r--r--src/components/AppUpdateInfoBar.tsx23
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
3import { mdiInformation } from '@mdi/js'; 3import { mdiInformation } from '@mdi/js';
4import InfoBar from './ui/InfoBar'; 4import InfoBar from './ui/InfoBar';
5import { GITHUB_FERDIUM_URL } from '../config';
6import { openExternalUrl } from '../helpers/url-helpers';
7import Icon from './ui/icon'; 5import Icon from './ui/icon';
8 6
7import { onAuthGoToReleaseNotes } from '../helpers/update-helpers';
8
9const messages = defineMessages({ 9const messages = defineMessages({
10 updateAvailable: { 10 updateAvailable: {
11 id: 'infobar.updateAvailable', 11 id: 'infobar.updateAvailable',
@@ -24,9 +24,14 @@ const messages = defineMessages({
24type Props = { 24type Props = {
25 onInstallUpdate: () => void; 25 onInstallUpdate: () => void;
26 onHide: () => void; 26 onHide: () => void;
27 updateVersionParsed: string;
27}; 28};
28 29
29const AppUpdateInfoBar = ({ onInstallUpdate, onHide }: Props) => { 30const 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>