diff --git a/src/components/SettingsPage/sections/About.js b/src/components/SettingsPage/sections/About.js index 13e972f2..5b5502b0 100644 --- a/src/components/SettingsPage/sections/About.js +++ b/src/components/SettingsPage/sections/About.js @@ -2,11 +2,16 @@ import React, { PureComponent } from 'react' import { shell } from 'electron' +import { connect } from 'react-redux' import type { T } from 'types/common' import IconHelp from 'icons/Help' import IconExternalLink from 'icons/ExternalLink' +import Button from 'components/base/Button' + +import { openModal } from 'reducers/modals' +import { MODAL_RELEASES_NOTES } from 'config/constants' import { SettingsSection as Section, @@ -17,13 +22,20 @@ import { type Props = { t: T, + openModal: Function, +} + +const mapDispatchToProps = { + openModal, } class SectionAbout extends PureComponent { handleOpenLink = (url: string) => () => shell.openExternal(url) render() { - const { t } = this.props + const { t, openModal } = this.props + const version = __APP_VERSION__ + return (
{ desc="Lorem ipsum dolor sit amet" /> + + + { } } -export default SectionAbout +export default connect( + null, + mapDispatchToProps, +)(SectionAbout) diff --git a/src/components/modals/ReleaseNotes.js b/src/components/modals/ReleaseNotes.js index 5d2c9ace..69e7a123 100644 --- a/src/components/modals/ReleaseNotes.js +++ b/src/components/modals/ReleaseNotes.js @@ -156,6 +156,10 @@ class ReleaseNotes extends PureComponent { fetchNotes = version => { if (!this.state.loading) { + this.setState({ + loading: true, + }) + axios .get(`https://api.github.com/repos/LedgerHQ/ledger-live-desktop/releases/tags/v${version}`) .then(response => { diff --git a/src/reducers/settings.js b/src/reducers/settings.js index 07d0b5b4..fbe330f6 100644 --- a/src/reducers/settings.js +++ b/src/reducers/settings.js @@ -74,7 +74,7 @@ const INITIAL_STATE: SettingsState = { loaded: false, shareAnalytics: false, sentryLogs: false, - lastUsedVersion: '0.1.0-alpha.7', // Temp hack to show release notes on update to alpha 8, should ne replaced by __APP_VERSION__ + lastUsedVersion: __APP_VERSION__, } function asCryptoCurrency(c: Currency): ?CryptoCurrency {