From ecfc019bd96607806371eeba0865d450a6b6ccdc Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Mon, 7 Jan 2019 15:02:47 +0100 Subject: [PATCH 01/27] LL-678 fix translation bug in dashboard --- src/components/GenuineCheck.js | 4 ++-- static/i18n/en/app.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/GenuineCheck.js b/src/components/GenuineCheck.js index 09107831..751e8720 100644 --- a/src/components/GenuineCheck.js +++ b/src/components/GenuineCheck.js @@ -156,10 +156,10 @@ class GenuineCheck extends PureComponent { { id: 'deviceInfo', title: ( - + {'Navigate to the '} {'dashboard'} - {' app on your device'} + {' on your device'} ), icon: homeIcon, diff --git a/static/i18n/en/app.json b/static/i18n/en/app.json index 956b3c84..3b57aa53 100644 --- a/static/i18n/en/app.json +++ b/static/i18n/en/app.json @@ -142,6 +142,7 @@ "messageIfSkipped": "Your {{currencyName}} address has not been confirmed on your Ledger device. Please verify it for optimal security." }, "deviceConnect": { + "dashboard": "Navigate to the <1><0>{{managerAppName}} on your device", "step1": "Connect and unlock your <1>Ledger device", "step2": "Navigate to the <1><0>{{managerAppName}} app on your device", "step3": "Allow <1><0>Ledger Manager on your device" From 420043e0e1612fba610cfdae31657ee4e6f82a6f Mon Sep 17 00:00:00 2001 From: ledger-bot <37080477+ledger-bot@users.noreply.github.com> Date: Mon, 7 Jan 2019 17:21:46 +0100 Subject: [PATCH 02/27] New translations app.json (Chinese Simplified) --- static/i18n/zh/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/static/i18n/zh/app.json b/static/i18n/zh/app.json index be84ec2c..bcf8fb40 100644 --- a/static/i18n/zh/app.json +++ b/static/i18n/zh/app.json @@ -142,6 +142,7 @@ "messageIfSkipped": "Your {{currencyName}} address has not been confirmed on your Ledger device. Please verify it for optimal security." }, "deviceConnect": { + "dashboard": "Navigate to the <1><0>{{managerAppName}} on your device", "step1": "Connect and unlock your <1>Ledger device", "step2": "Navigate to the <1><0>{{managerAppName}} app on your device", "step3": "Allow <1><0>Ledger Manager on your device" From 9e7f6d961bb1adc31c05d7daf7532a2385b4868b Mon Sep 17 00:00:00 2001 From: ledger-bot <37080477+ledger-bot@users.noreply.github.com> Date: Mon, 7 Jan 2019 17:21:49 +0100 Subject: [PATCH 03/27] New translations app.json (French) --- static/i18n/fr/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/static/i18n/fr/app.json b/static/i18n/fr/app.json index e3c4885c..254fddc4 100644 --- a/static/i18n/fr/app.json +++ b/static/i18n/fr/app.json @@ -142,6 +142,7 @@ "messageIfSkipped": "Your {{currencyName}} address has not been confirmed on your Ledger device. Please verify it for optimal security." }, "deviceConnect": { + "dashboard": "Navigate to the <1><0>{{managerAppName}} on your device", "step1": "Connect and unlock your <1>Ledger device", "step2": "Navigate to the <1><0>{{managerAppName}} app on your device", "step3": "Allow <1><0>Ledger Manager on your device" From 13110535b57fba54211788b0d3011a7fcd6eaed9 Mon Sep 17 00:00:00 2001 From: ledger-bot <37080477+ledger-bot@users.noreply.github.com> Date: Mon, 7 Jan 2019 17:21:51 +0100 Subject: [PATCH 04/27] New translations app.json (Japanese) --- static/i18n/ja/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/static/i18n/ja/app.json b/static/i18n/ja/app.json index b6957c97..2333e40f 100644 --- a/static/i18n/ja/app.json +++ b/static/i18n/ja/app.json @@ -142,6 +142,7 @@ "messageIfSkipped": "Your {{currencyName}} address has not been confirmed on your Ledger device. Please verify it for optimal security." }, "deviceConnect": { + "dashboard": "Navigate to the <1><0>{{managerAppName}} on your device", "step1": "Connect and unlock your <1>Ledger device", "step2": "Navigate to the <1><0>{{managerAppName}} app on your device", "step3": "Allow <1><0>Ledger Manager on your device" From 91e70d3c22df258bbbb109884927109e358c444c Mon Sep 17 00:00:00 2001 From: ledger-bot <37080477+ledger-bot@users.noreply.github.com> Date: Mon, 7 Jan 2019 17:21:53 +0100 Subject: [PATCH 05/27] New translations app.json (Korean) --- static/i18n/ko/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/static/i18n/ko/app.json b/static/i18n/ko/app.json index 800006ba..2fbf6e5d 100644 --- a/static/i18n/ko/app.json +++ b/static/i18n/ko/app.json @@ -142,6 +142,7 @@ "messageIfSkipped": "Your {{currencyName}} address has not been confirmed on your Ledger device. Please verify it for optimal security." }, "deviceConnect": { + "dashboard": "Navigate to the <1><0>{{managerAppName}} on your device", "step1": "Connect and unlock your <1>Ledger device", "step2": "Navigate to the <1><0>{{managerAppName}} app on your device", "step3": "Allow <1><0>Ledger Manager on your device" From 2158a9816ff3361e865052b3460441a2c113237d Mon Sep 17 00:00:00 2001 From: ledger-bot <37080477+ledger-bot@users.noreply.github.com> Date: Mon, 7 Jan 2019 17:21:55 +0100 Subject: [PATCH 06/27] New translations app.json (Russian) --- static/i18n/ru/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/static/i18n/ru/app.json b/static/i18n/ru/app.json index 9770d5b0..db9bcb7a 100644 --- a/static/i18n/ru/app.json +++ b/static/i18n/ru/app.json @@ -142,6 +142,7 @@ "messageIfSkipped": "Your {{currencyName}} address has not been confirmed on your Ledger device. Please verify it for optimal security." }, "deviceConnect": { + "dashboard": "Navigate to the <1><0>{{managerAppName}} on your device", "step1": "Connect and unlock your <1>Ledger device", "step2": "Navigate to the <1><0>{{managerAppName}} app on your device", "step3": "Allow <1><0>Ledger Manager on your device" From 46e62d138084a66bf99a3c6225a8ae1a15d6b611 Mon Sep 17 00:00:00 2001 From: ledger-bot <37080477+ledger-bot@users.noreply.github.com> Date: Mon, 7 Jan 2019 17:21:57 +0100 Subject: [PATCH 07/27] New translations app.json (Spanish) --- static/i18n/es/app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/static/i18n/es/app.json b/static/i18n/es/app.json index e2815a60..923863d2 100644 --- a/static/i18n/es/app.json +++ b/static/i18n/es/app.json @@ -142,6 +142,7 @@ "messageIfSkipped": "Your {{currencyName}} address has not been confirmed on your Ledger device. Please verify it for optimal security." }, "deviceConnect": { + "dashboard": "Navigate to the <1><0>{{managerAppName}} on your device", "step1": "Connect and unlock your <1>Ledger device", "step2": "Navigate to the <1><0>{{managerAppName}} app on your device", "step3": "Allow <1><0>Ledger Manager on your device" From 5ae6e27a2a6aea209c071593a8eb54beef64ab43 Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Mon, 7 Jan 2019 17:16:25 +0100 Subject: [PATCH 08/27] LL-659 fix autofocus on add account modal --- src/components/base/Select/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/base/Select/index.js b/src/components/base/Select/index.js index 3551b4dc..7ae2daaf 100644 --- a/src/components/base/Select/index.js +++ b/src/components/base/Select/index.js @@ -37,6 +37,19 @@ export type Option = { } class Select extends PureComponent { + componentDidMount() { + if (this.ref) { + // $FlowFixMe + this.timeout = setTimeout(() => this.ref.focus(), 16) + } + } + + componentWillUnmount() { + if (this.timeout) { + clearTimeout(this.timeout) + } + } + handleChange = (value, { action }) => { const { onChange } = this.props if (action === 'select-option') { @@ -47,6 +60,9 @@ class Select extends PureComponent { } } + ref: * + timeout: * + render() { const { value, @@ -68,6 +84,7 @@ class Select extends PureComponent { return ( (this.ref = c)} value={value} maxMenuHeight={300} classNamePrefix="select" From d0c0c2c41564a8c7468d39356c8015eb2f268943 Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Tue, 8 Jan 2019 11:41:09 +0100 Subject: [PATCH 09/27] autofocus on input only if autoFocus prop is present --- src/components/SelectCurrency/index.js | 12 +++++++++++- src/components/base/Select/index.js | 7 ++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/SelectCurrency/index.js b/src/components/SelectCurrency/index.js index 0ba3bab4..97823765 100644 --- a/src/components/SelectCurrency/index.js +++ b/src/components/SelectCurrency/index.js @@ -18,6 +18,7 @@ type OwnProps = { currencies?: CryptoCurrency[], value?: CryptoCurrency, placeholder: string, + autoFocus?: boolean, t: T, } @@ -29,12 +30,21 @@ const mapStateToProps = (state, props: OwnProps) => ({ currencies: props.currencies || availableCurrencies(state), }) -const SelectCurrency = ({ onChange, value, t, placeholder, currencies, ...props }: Props) => { +const SelectCurrency = ({ + onChange, + value, + t, + placeholder, + currencies, + autoFocus, + ...props +}: Props) => { const options = currencies ? currencies.map(c => ({ ...c, value: c.id, label: c.name, currency: c })) : [] return ( + + ) : null} + {!isLoading ? ( - + {error ? : null} {error ? null : ( <> - - )} diff --git a/static/i18n/en/app.json b/static/i18n/en/app.json index 16f91e41..098da948 100644 --- a/static/i18n/en/app.json +++ b/static/i18n/en/app.json @@ -453,9 +453,9 @@ "title": "Repair your Ledger device", "desc": "If you encountered some issue while updating your Ledger Nano S and cannot resume the update process, you can try this option to repair your device.", "button": "Repair", - "generic": "'Bootloader'", - "0_8": "'MCU not genuine'", - "0_9": "'follow repair instruction'" + "generic": "Stuck in 'Bootloader'", + "0_8": "Stuck in 'MCU not genuine'", + "0_9": "Stuck in 'follow repair instruction'" }, "exportLogs": { "title": "Export logs", diff --git a/yarn.lock b/yarn.lock index 21e4b288..c8a291dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1725,10 +1725,10 @@ bindings "^1.3.0" nan "^2.6.2" -"@ledgerhq/live-common@4.10.0": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.10.0.tgz#4f34679cebf51cf98123c5b072a948e72ff4f566" - integrity sha512-ui/v3IWsNvih6BSnpL+65K+R92QVGR/myza9QGuyvCWChy79b2vWXYYQpydgyogUkUY+oyENvpvAiM+AnPV8fw== +"@ledgerhq/live-common@4.10.1": + version "4.10.1" + resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-4.10.1.tgz#34aa77b692a0aff268b6ef741c2e9ecc1bfcc9c0" + integrity sha512-G5oKHfb0aV+xPOC2+X6xYquvViR+u9iSRTRnC2h82koHnQujbqkI+Lt1hpeEvEwpsaunxqlT/0JV6q/ORNVbtw== dependencies: "@aeternity/ledger-app-api" "0.0.4" "@ledgerhq/hw-app-btc" "^4.32.0" From 617131a4eec437e3823f1b8e75ca5fadc0c044b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Mon, 21 Jan 2019 12:37:13 +0100 Subject: [PATCH 21/27] Polishes --- src/components/base/Modal/RepairModal.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/base/Modal/RepairModal.js b/src/components/base/Modal/RepairModal.js index b0336340..9fd2bd2e 100644 --- a/src/components/base/Modal/RepairModal.js +++ b/src/components/base/Modal/RepairModal.js @@ -147,7 +147,7 @@ class RepairModal extends PureComponent { } onChange = selectedOption => { - this.setState({ selectedOption }) + this.setState({ selectedOption: selectedOption || options[0] }) } renderOption = option => (option && this.props.t(`settings.repairDevice.${option.value}`)) || null @@ -193,8 +193,10 @@ class RepairModal extends PureComponent { )} {!isLoading && !error ? ( - +