diff --git a/react/src/components/dashboard/qrModal/qrModal.js b/react/src/components/dashboard/qrModal/qrModal.js index 3387e20..278da73 100755 --- a/react/src/components/dashboard/qrModal/qrModal.js +++ b/react/src/components/dashboard/qrModal/qrModal.js @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import Store from '../../../store'; import { translate } from '../../../translate/translate'; -import QrReader from 'react-qr-reader' +import QrReader from 'react-qr-reader'; import { QRModalRender, QRModalReaderRender, @@ -72,15 +72,11 @@ class QRModal extends React.Component { const a = document.getElementById('saveModalImage' + this.props.content); a.href = dataURL; - a.download = this.props.content; + a.download = this.props.fileName || this.props.content; } render() { - if (this.props.mode === 'scan') { - return QRModalReaderRender.call(this); - } else { - return QRModalRender.call(this); - } + return this.props.mode === 'scan' ? QRModalReaderRender.call(this) : QRModalRender.call(this); } } diff --git a/react/src/components/dashboard/qrModal/qrModal.render.js b/react/src/components/dashboard/qrModal/qrModal.render.js index f4ed8a2..23ba8c1 100644 --- a/react/src/components/dashboard/qrModal/qrModal.render.js +++ b/react/src/components/dashboard/qrModal/qrModal.render.js @@ -14,7 +14,7 @@ export const QRModalRender = function() {
-
+
-

{ translate('INDEX.SCAN_QR_CODE') }

+

{ this.props.title || translate('INDEX.SCAN_QR_CODE') }

} - { this.state.loginPassphrase && this.state.enableEncryptSeed &&
@@ -369,7 +374,9 @@ const LoginRender = function() { + onClick={ () => this.copyPassPhraseToClipboard() }> + { translate('INDEX.COPY') } + { translate('INDEX.WEAK_SEED') }

{ translate('INDEX.YOUR_SEED_MUST_CONTAIN') }
@@ -400,6 +407,16 @@ const LoginRender = function() { +