diff --git a/app/common/lib/ledgerUtil.js b/app/common/lib/ledgerUtil.js index 36f2749ea5e..e65a4a9f311 100644 --- a/app/common/lib/ledgerUtil.js +++ b/app/common/lib/ledgerUtil.js @@ -74,7 +74,7 @@ module.exports.formattedTimeFromNow = (timestamp) => { return moment(new Date(timestamp)).fromNow() } -module.exports.formattedDateFromTimestamp = (timestamp) => { +module.exports.formattedDateFromTimestamp = (timestamp, format) => { moment.locale(navigator.language) - return moment(new Date(timestamp)).format('YYYY-MM-DD') + return moment(new Date(timestamp)).format(format) } diff --git a/app/extensions/brave/img/ledger/icon_history.svg b/app/extensions/brave/img/ledger/icon_history.svg new file mode 100644 index 00000000000..3fcdef2726e --- /dev/null +++ b/app/extensions/brave/img/ledger/icon_history.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/app/extensions/brave/img/ledger/icon_settings.svg b/app/extensions/brave/img/ledger/icon_settings.svg new file mode 100644 index 00000000000..22206ab8ae6 --- /dev/null +++ b/app/extensions/brave/img/ledger/icon_settings.svg @@ -0,0 +1,12 @@ + + + + + diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index 2ad893c0595..5f22e1e886a 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -63,8 +63,9 @@ accountBalanceLoading=loading… monthlyBudget=monthly budget status=status statusOnError=Brave Wallet can't be reached. -statusNextReconcileDate=Contribution due date is {{reconcileDate}}. -statusNextReconcileToday=Contribution due date is today. +statusNextReconcileDate={{reconcileDate}} +statusNextReconcileToday=Today +statusNextReconcileOverdue=Overdue createWallet=create wallet createWalletStatus=Click the Create Wallet button to get started. creatingWallet=creating… @@ -79,8 +80,10 @@ bitcoin=Bitcoin bitcoinAdd=Use your existing Bitcoin wallet/account bitcoinAddDescription=Use any BTC wallet that can transfer Bitcoin to your Brave wallet. bitcoinBuy=Buy Bitcoin -noPaymentHistory=Your first contribution will be {{reconcileDate}} -viewPaymentHistory=View Payment History… +lastContribution=Last contribution: +nextContribution=Next contribution: +noPaymentHistory=No previous contributions +viewPaymentHistory= {{date}} paymentHistoryTitle=Your Payment History paymentHistoryFooterText=Your next contribution is {{reconcileDate}}. paymentHistoryDueFooterText=Your next contribution is due. @@ -189,7 +192,6 @@ doNotTrackTitle=Do Not Track doNotTrack=Send a 'Do Not Track' header with browsing requests * fullscreenContent=Full Screen Content blockCanvasFingerprinting=Fingerprinting Protection (may break some sites) -advancedSettings=Advanced Settings… advancedSettingsTitle=Advanced Settings for Brave Payments ledgerRecoveryTitle=Recover your Brave wallet ledgerRecoverySubtitle=Enter your recovery keys below diff --git a/app/renderer/components/preferences/payment/enabledContent.js b/app/renderer/components/preferences/payment/enabledContent.js index b69105b378c..4c4f5163d79 100644 --- a/app/renderer/components/preferences/payment/enabledContent.js +++ b/app/renderer/components/preferences/payment/enabledContent.js @@ -6,7 +6,7 @@ const React = require('react') const {StyleSheet, css} = require('aphrodite') // util -const {btcToCurrencyString, formattedTimeFromNow} = require('../../../../common/lib/ledgerUtil') +const {btcToCurrencyString, formattedDateFromTimestamp} = require('../../../../common/lib/ledgerUtil') const {l10nErrorText} = require('../../../../common/lib/httpUtil') const {changeSetting} = require('../../../lib/settingsUtil') @@ -51,38 +51,6 @@ class EnabledContent extends ImmutableComponent { /> } - paymentHistoryButton () { - const ledgerData = this.props.ledgerData - const walletCreated = ledgerData.get('created') && !ledgerData.get('creating') - const walletTransactions = ledgerData.get('transactions') - const walletHasTransactions = walletTransactions && walletTransactions.size - const nextReconcileDateValue = this.nextReconcileDate() - let buttonText - - if (!walletCreated || !nextReconcileDateValue) { - return null - } else if (!walletHasTransactions) { - buttonText = 'noPaymentHistory' - } else { - buttonText = 'viewPaymentHistory' - } - - const l10nDataArgs = { - reconcileDate: nextReconcileDateValue - } - - const onButtonClick = this.props.showOverlay.bind(this, 'paymentHistory') - - return