Do not use block show for claim and transaction dates
This commit is contained in:
parent
c8641a0315
commit
8744b35dcc
10 changed files with 16 additions and 30 deletions
|
@ -22,6 +22,7 @@ module.name_mapper='^modal\(.*\)$' -> '<PROJECT_ROOT>/src/ui/modal\1'
|
|||
module.name_mapper='^app\(.*\)$' -> '<PROJECT_ROOT>/src/ui/app\1'
|
||||
module.name_mapper='^native\(.*\)$' -> '<PROJECT_ROOT>/src/ui/native\1'
|
||||
module.name_mapper='^analytics\(.*\)$' -> '<PROJECT_ROOT>/src/ui/analytics\1'
|
||||
module.name_mapper='^i18n\(.*\)$' -> '<PROJECT_ROOT>/src/ui/i18n\1'
|
||||
|
||||
|
||||
[strict]
|
||||
|
|
|
@ -117,8 +117,8 @@
|
|||
"jsmediatags": "^3.8.1",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#459bea2257d61003e591daf169fefe9624522680",
|
||||
"lbryinc": "lbryio/lbryinc#9665f2d1c818f1a86b2e5daab642f6879746f25f",
|
||||
"lbry-redux": "lbryio/lbry-redux#5fb6efae24205dfdfa133ca4f26bccce033570e1",
|
||||
"lbryinc": "lbryio/lbryinc#43d382d9b74d396a581a74d87e4c53105e04f845",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
"lodash-es": "^4.17.11",
|
||||
|
@ -188,7 +188,11 @@
|
|||
"yarn": "^1.3"
|
||||
},
|
||||
"lbrySettings": {
|
||||
<<<<<<< HEAD
|
||||
"lbrynetDaemonVersion": "0.37.0rc4",
|
||||
=======
|
||||
"lbrynetDaemonVersion": "0.37.0rc5",
|
||||
>>>>>>> Do not use block show for claim and transaction dates
|
||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||
"lbrynetDaemonDir": "static/daemon",
|
||||
"lbrynetDaemonFileName": "lbrynet"
|
||||
|
|
|
@ -1,16 +1,8 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { doFetchBlock, makeSelectBlockDate } from 'lbry-redux';
|
||||
import { makeSelectDateForUri } from 'lbry-redux';
|
||||
import DateTime from './view';
|
||||
|
||||
const select = (state, props) => ({
|
||||
date: !props.date && props.block ? makeSelectBlockDate(props.block)(state) : props.date,
|
||||
date: props.date || makeSelectDateForUri(props.uri)(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
fetchBlock: height => dispatch(doFetchBlock(height)),
|
||||
});
|
||||
|
||||
export default connect(
|
||||
select,
|
||||
perform
|
||||
)(DateTime);
|
||||
export default connect(select)(DateTime);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import moment from 'moment';
|
||||
import i18n from 'i18n';
|
||||
|
||||
type Props = {
|
||||
date?: number | {},
|
||||
date?: any,
|
||||
timeAgo?: boolean,
|
||||
formatOptions: {},
|
||||
show?: string,
|
||||
|
@ -30,16 +31,6 @@ class DateTime extends React.PureComponent<Props> {
|
|||
// this.refreshDate(props);
|
||||
}
|
||||
|
||||
// Removing this for performance reasons. Can be un-commented once block_show is better with large numbers of calls
|
||||
// Or the date is included in the claim
|
||||
//
|
||||
// refreshDate(props: Props) {
|
||||
// const { block, date, fetchBlock } = props;
|
||||
// if (block && date === undefined) {
|
||||
// fetchBlock(block);
|
||||
// }
|
||||
// }
|
||||
|
||||
render() {
|
||||
const { date, formatOptions, timeAgo } = this.props;
|
||||
const show = this.props.show || DateTime.SHOW_BOTH;
|
||||
|
|
|
@ -138,7 +138,7 @@ class FileCard extends React.PureComponent<Props> {
|
|||
<div className="media__subtitle">
|
||||
{pending ? <div>Pending...</div> : <UriIndicator uri={uri} link />}
|
||||
<div>
|
||||
<DateTime timeAgo block={height} />
|
||||
<DateTime timeAgo uri={uri} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="media__properties">
|
||||
|
|
|
@ -169,7 +169,7 @@ class FileTile extends React.PureComponent<Props> {
|
|||
{size !== 'small' ? (
|
||||
<div className="media__subtext">
|
||||
{__('Published to')} <UriIndicator uri={uri} link />{' '}
|
||||
<DateTime timeAgo block={height} />
|
||||
<DateTime timeAgo uri={uri} />
|
||||
</div>
|
||||
) : (
|
||||
<Fragment>
|
||||
|
|
|
@ -43,7 +43,6 @@ class TransactionListItem extends React.PureComponent<Props> {
|
|||
render() {
|
||||
const { reward, transaction, isRevokeable } = this.props;
|
||||
const { amount, claim_id: claimId, claim_name: name, date, fee, txid, type } = transaction;
|
||||
|
||||
const dateFormat = {
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
|
|
|
@ -95,7 +95,7 @@ class WalletSendTip extends React.PureComponent<Props, State> {
|
|||
<Button
|
||||
button="primary"
|
||||
label={__('Send')}
|
||||
disabled={isPending || tipError}
|
||||
disabled={isPending || tipError || !tipAmount}
|
||||
onClick={this.handleSendButtonClicked}
|
||||
/>
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@ export const CHECK_ADDRESS_IS_MINE_COMPLETED = 'CHECK_ADDRESS_IS_MINE_COMPLETED'
|
|||
export const SEND_TRANSACTION_STARTED = 'SEND_TRANSACTION_STARTED';
|
||||
export const SEND_TRANSACTION_COMPLETED = 'SEND_TRANSACTION_COMPLETED';
|
||||
export const SEND_TRANSACTION_FAILED = 'SEND_TRANSACTION_FAILED';
|
||||
export const FETCH_BLOCK_SUCCESS = 'FETCH_BLOCK_SUCCESS';
|
||||
export const SUPPORT_TRANSACTION_STARTED = 'SUPPORT_TRANSACTION_STARTED';
|
||||
export const SUPPORT_TRANSACTION_COMPLETED = 'SUPPORT_TRANSACTION_COMPLETED';
|
||||
export const SUPPORT_TRANSACTION_FAILED = 'SUPPORT_TRANSACTION_FAILED';
|
||||
|
|
|
@ -238,7 +238,7 @@ class FilePage extends React.Component<Props> {
|
|||
<div className="media__subtitle__channel">
|
||||
<UriIndicator uri={uri} link />
|
||||
</div>
|
||||
{__('Published on')} <DateTime block={height} show={DateTime.SHOW_DATE} />
|
||||
{__('Published on')} <DateTime uri={uri} show={DateTime.SHOW_DATE} />
|
||||
</div>
|
||||
|
||||
{claimIsMine && (
|
||||
|
|
Loading…
Reference in a new issue