From f72c3d58c483e2f07cd9fb358ead99b8c98b7e77 Mon Sep 17 00:00:00 2001 From: meriadec Date: Wed, 4 Jul 2018 17:32:24 +0200 Subject: [PATCH 1/3] Rename About => Help --- .../SettingsPage/ReleaseNotesButton.js | 2 +- src/components/SettingsPage/index.js | 8 ++++---- .../sections/{About.js => Help.js} | 20 +++++++++---------- static/i18n/en/app.yml | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) rename src/components/SettingsPage/sections/{About.js => Help.js} (77%) diff --git a/src/components/SettingsPage/ReleaseNotesButton.js b/src/components/SettingsPage/ReleaseNotesButton.js index d6864d05..336d8e52 100644 --- a/src/components/SettingsPage/ReleaseNotesButton.js +++ b/src/components/SettingsPage/ReleaseNotesButton.js @@ -32,7 +32,7 @@ class ReleaseNotesButton extends PureComponent { openModal(MODAL_RELEASES_NOTES, version) }} > - {t('app:settings.about.releaseNotesBtn')} + {t('app:settings.help.releaseNotesBtn')} ) } diff --git a/src/components/SettingsPage/index.js b/src/components/SettingsPage/index.js index 51faedbf..a4f31813 100644 --- a/src/components/SettingsPage/index.js +++ b/src/components/SettingsPage/index.js @@ -13,7 +13,7 @@ import Pills from 'components/base/Pills' import Box from 'components/base/Box' import SectionDisplay from './sections/Display' import SectionCurrencies from './sections/Currencies' -import SectionAbout from './sections/About' +import SectionHelp from './sections/Help' import SectionTools from './sections/Tools' const mapStateToProps = state => ({ @@ -48,9 +48,9 @@ class SettingsPage extends PureComponent { value: SectionCurrencies, }, { - key: 'about', - label: props.t('app:settings.tabs.about'), - value: SectionAbout, + key: 'help', + label: props.t('app:settings.tabs.help'), + value: SectionHelp, }, ] diff --git a/src/components/SettingsPage/sections/About.js b/src/components/SettingsPage/sections/Help.js similarity index 77% rename from src/components/SettingsPage/sections/About.js rename to src/components/SettingsPage/sections/Help.js index 4e89356e..583523ae 100644 --- a/src/components/SettingsPage/sections/About.js +++ b/src/components/SettingsPage/sections/Help.js @@ -25,23 +25,23 @@ type Props = { t: T, } -class SectionAbout extends PureComponent { +class SectionHelp extends PureComponent { render() { const { t } = this.props const version = __APP_VERSION__ return (
- +
} - title={t('app:settings.tabs.about')} - desc={t('app:settings.about.desc')} + title={t('app:settings.tabs.help')} + desc={t('app:settings.help.desc')} /> - + @@ -65,14 +65,14 @@ class SectionAbout extends PureComponent { @@ -81,4 +81,4 @@ class SectionAbout extends PureComponent { } } -export default translate()(SectionAbout) +export default translate()(SectionHelp) diff --git a/static/i18n/en/app.yml b/static/i18n/en/app.yml index 2edb6b3c..2871d629 100644 --- a/static/i18n/en/app.yml +++ b/static/i18n/en/app.yml @@ -310,7 +310,7 @@ settings: # Always ensure descriptions carry full stops (.) display: General currencies: Currencies profile: Profile - about: Help + help: Help display: desc: Change settings that affect Ledger Live in general. language: Display language @@ -354,7 +354,7 @@ settings: # Always ensure descriptions carry full stops (.) analyticsDesc: Enable analytics of anonymous data to help Ledger improve the user experience. This includes the operating system, language, firmware versions and the number of added accounts. reportErrors: Report bugs reportErrorsDesc: Share anonymous usage and diagnostics data to help improve Ledger products, services and security features. - about: + help: desc: Learn about Ledger Live features or get help. version: Version releaseNotesBtn: Details # Close button instead of continue. From a689e41c720d2a5c0091bcce223456cf15c92154 Mon Sep 17 00:00:00 2001 From: meriadec Date: Wed, 4 Jul 2018 17:50:01 +0200 Subject: [PATCH 2/3] Add About section in Settings, and move some items --- .../SettingsPage/SettingsSection.js | 4 +- src/components/SettingsPage/index.js | 6 ++ src/components/SettingsPage/sections/About.js | 57 +++++++++++++++++++ src/components/SettingsPage/sections/Help.js | 12 ---- static/i18n/en/app.yml | 3 + 5 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 src/components/SettingsPage/sections/About.js diff --git a/src/components/SettingsPage/SettingsSection.js b/src/components/SettingsPage/SettingsSection.js index 03d9678c..de34dee1 100644 --- a/src/components/SettingsPage/SettingsSection.js +++ b/src/components/SettingsPage/SettingsSection.js @@ -24,8 +24,8 @@ const RoundIconContainer = styled(Box).attrs({ bg: p => rgba(p.theme.colors.wallet, 0.2), color: 'wallet', })` - height: 30px; - width: 30px; + height: 34px; + width: 34px; border-radius: 50%; ` diff --git a/src/components/SettingsPage/index.js b/src/components/SettingsPage/index.js index a4f31813..dd8ed640 100644 --- a/src/components/SettingsPage/index.js +++ b/src/components/SettingsPage/index.js @@ -14,6 +14,7 @@ import Box from 'components/base/Box' import SectionDisplay from './sections/Display' import SectionCurrencies from './sections/Currencies' import SectionHelp from './sections/Help' +import SectionAbout from './sections/About' import SectionTools from './sections/Tools' const mapStateToProps = state => ({ @@ -47,6 +48,11 @@ class SettingsPage extends PureComponent { label: props.t('app:settings.tabs.currencies'), value: SectionCurrencies, }, + { + key: 'about', + label: props.t('app:settings.tabs.about'), + value: SectionAbout, + }, { key: 'help', label: props.t('app:settings.tabs.help'), diff --git a/src/components/SettingsPage/sections/About.js b/src/components/SettingsPage/sections/About.js new file mode 100644 index 00000000..14592b54 --- /dev/null +++ b/src/components/SettingsPage/sections/About.js @@ -0,0 +1,57 @@ +// @flow + +import React, { PureComponent } from 'react' +import { translate } from 'react-i18next' + +import type { T } from 'types/common' + +import TrackPage from 'analytics/TrackPage' +import { urls } from 'config/support' +import IconLoader from 'icons/Loader' + +import ReleaseNotesButton from '../ReleaseNotesButton' +import AboutRowItem from '../AboutRowItem' + +import { + SettingsSection as Section, + SettingsSectionHeader as Header, + SettingsSectionBody as Body, + SettingsSectionRow as Row, +} from '../SettingsSection' + +type Props = { + t: T, +} + +class SectionHelp extends PureComponent { + render() { + const { t } = this.props + const version = __APP_VERSION__ + + return ( +
+ + +
} + title={t('app:settings.tabs.about')} + desc={t('app:settings.about.desc')} + /> + + + + + + + + +
+ ) + } +} + +export default translate()(SectionHelp) diff --git a/src/components/SettingsPage/sections/Help.js b/src/components/SettingsPage/sections/Help.js index 583523ae..cfd1ceb6 100644 --- a/src/components/SettingsPage/sections/Help.js +++ b/src/components/SettingsPage/sections/Help.js @@ -11,7 +11,6 @@ import { urls } from 'config/support' import ExportLogsBtn from 'components/ExportLogsBtn' import CleanButton from '../CleanButton' import ResetButton from '../ResetButton' -import ReleaseNotesButton from '../ReleaseNotesButton' import AboutRowItem from '../AboutRowItem' import { @@ -28,7 +27,6 @@ type Props = { class SectionHelp extends PureComponent { render() { const { t } = this.props - const version = __APP_VERSION__ return (
@@ -41,10 +39,6 @@ class SectionHelp extends PureComponent { /> - - - - { desc={t('app:settings.help.faqDesc')} url={urls.faq} /> - -
) diff --git a/static/i18n/en/app.yml b/static/i18n/en/app.yml index 2871d629..a2fc5c8e 100644 --- a/static/i18n/en/app.yml +++ b/static/i18n/en/app.yml @@ -311,6 +311,7 @@ settings: # Always ensure descriptions carry full stops (.) currencies: Currencies profile: Profile help: Help + about: About display: desc: Change settings that affect Ledger Live in general. language: Display language @@ -354,6 +355,8 @@ settings: # Always ensure descriptions carry full stops (.) analyticsDesc: Enable analytics of anonymous data to help Ledger improve the user experience. This includes the operating system, language, firmware versions and the number of added accounts. reportErrors: Report bugs reportErrorsDesc: Share anonymous usage and diagnostics data to help improve Ledger products, services and security features. + about: + desc: Learn about Ledger Live features help: desc: Learn about Ledger Live features or get help. version: Version From 79b6f1fafae33e013db9f8c48df56cca9e6e6a15 Mon Sep 17 00:00:00 2001 From: meriadec Date: Wed, 4 Jul 2018 18:12:21 +0200 Subject: [PATCH 3/3] Update settings icons --- src/icons/Currencies.js | 2 +- src/icons/Display.js | 2 +- src/icons/Help.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/icons/Currencies.js b/src/icons/Currencies.js index 58f168b7..21e10243 100644 --- a/src/icons/Currencies.js +++ b/src/icons/Currencies.js @@ -5,7 +5,7 @@ import React from 'react' const path = ( ) diff --git a/src/icons/Display.js b/src/icons/Display.js index c0dd7402..5ff99c26 100644 --- a/src/icons/Display.js +++ b/src/icons/Display.js @@ -5,7 +5,7 @@ import React from 'react' const path = ( ) diff --git a/src/icons/Help.js b/src/icons/Help.js index e3f2251d..d739c9b8 100644 --- a/src/icons/Help.js +++ b/src/icons/Help.js @@ -5,7 +5,7 @@ import React from 'react' const path = ( )