cleanup
This commit is contained in:
parent
3721dcd474
commit
53402c2d5b
12 changed files with 28 additions and 32 deletions
|
@ -127,7 +127,7 @@
|
|||
"husky": "^0.14.3",
|
||||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#7563da014678eafca411c5b17808fbd331e5717a",
|
||||
"lbry-redux": "lbryio/lbry-redux#861880a029a748bb4300bec9b16b7136ac51c5c3",
|
||||
"lbryinc": "lbryio/lbryinc#f962cdf31a4c36f7bdb8b71fc403a3377d58a460",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
// @flow
|
||||
import * as ICONS from 'constants/icons';
|
||||
import * as PAGES from 'constants/pages';
|
||||
import { LATEST_PAGE_SIZE } from 'constants/claim';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import classnames from 'classnames';
|
||||
import analytics from 'analytics';
|
||||
import { buildURI, parseURI } from 'lbry-redux';
|
||||
import { buildURI, parseURI, TX_LIST } from 'lbry-redux';
|
||||
import Router from 'component/router/index';
|
||||
import ModalRouter from 'modal/modalRouter';
|
||||
import ReactModal from 'react-modal';
|
||||
|
@ -32,7 +31,7 @@ type Props = {
|
|||
location: { pathname: string, hash: string },
|
||||
history: { push: string => void },
|
||||
fetchRewards: () => void,
|
||||
fetchTransactions: (page, pageSize) => void,
|
||||
fetchTransactions: (number, number) => void,
|
||||
fetchAccessToken: () => void,
|
||||
fetchChannelListMine: () => void,
|
||||
signIn: () => void,
|
||||
|
@ -102,7 +101,7 @@ function App(props: Props) {
|
|||
|
||||
// @if TARGET='app'
|
||||
fetchRewards();
|
||||
fetchTransactions(1, LATEST_PAGE_SIZE);
|
||||
fetchTransactions(1, TX_LIST.LATEST_PAGE_SIZE);
|
||||
fetchChannelListMine(); // This needs to be done for web too...
|
||||
// @endif
|
||||
}, [fetchRewards, fetchTransactions, fetchAccessToken, fetchChannelListMine]);
|
||||
|
|
|
@ -25,9 +25,6 @@ export default function FileProperties(props: Props) {
|
|||
{isSubscribed && <Icon tooltip icon={icons.SUBSCRIBE} />}
|
||||
{!claimIsMine && downloaded && <Icon tooltip icon={icons.DOWNLOAD} />}
|
||||
{isRewardContent && <Icon tooltip icon={icons.FEATURED} />}
|
||||
trending group:{claim.meta.trending_group}
|
||||
trending mixed:{claim.meta.trending_mixed}
|
||||
{claim.meta.support_amount}
|
||||
<FilePrice hideFree uri={uri} />
|
||||
<VideoDuration className="media__subtitle" uri={uri} />
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// @flow
|
||||
import * as ICONS from 'constants/icons';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { regexInvalidURI } from 'lbry-redux';
|
||||
import FileSelector from 'component/common/file-selector';
|
||||
import Button from 'component/button';
|
||||
|
@ -32,12 +32,6 @@ function PublishFile(props: Props) {
|
|||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (currentFile) {
|
||||
updatePublishForm();
|
||||
}
|
||||
}, [currentFile]);
|
||||
|
||||
function handleFileChange(file: WebFile) {
|
||||
// if electron, we'll set filePath to the path string because SDK is handling publishing.
|
||||
// if web, we set the filePath (dumb name) to the File() object
|
||||
|
@ -58,7 +52,6 @@ function PublishFile(props: Props) {
|
|||
// @endif
|
||||
const publishFormParams: { filePath: string | WebFile, name?: string } = {
|
||||
filePath: file.path || file,
|
||||
name: '',
|
||||
};
|
||||
// Strip off extention and replace invalid characters
|
||||
let fileName = file.name.substr(0, file.name.lastIndexOf('.')) || file.name;
|
||||
|
|
|
@ -26,7 +26,7 @@ import Card from 'component/common/card';
|
|||
type Props = {
|
||||
disabled: boolean,
|
||||
tags: Array<Tag>,
|
||||
publish: string => void,
|
||||
publish: (?string) => void,
|
||||
filePath: ?string,
|
||||
bid: ?number,
|
||||
editingURI: ?string,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
import TransactionList from 'component/transactionList';
|
||||
import { LATEST_PAGE_SIZE } from 'constants/claim';
|
||||
import { TX_LIST } from 'lbry-redux';
|
||||
|
||||
type Props = {
|
||||
fetchTransactions: (page, pageSize) => void,
|
||||
fetchTransactions: (number, number) => void,
|
||||
fetchingTransactions: boolean,
|
||||
hasTransactions: boolean,
|
||||
transactions: Array<Transaction>,
|
||||
|
@ -14,7 +14,7 @@ class TransactionListRecent extends React.PureComponent<Props> {
|
|||
componentDidMount() {
|
||||
const { fetchTransactions } = this.props;
|
||||
|
||||
fetchTransactions(1, LATEST_PAGE_SIZE);
|
||||
fetchTransactions(1, TX_LIST.LATEST_PAGE_SIZE);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// @flow
|
||||
import React, { PureComponent } from 'react';
|
||||
import Button from 'component/button';
|
||||
import { LATEST_PAGE_SIZE } from 'constants/claim';
|
||||
import { TX_LIST } from 'lbry-redux';
|
||||
|
||||
type Props = {
|
||||
fetchTransactions: () => void,
|
||||
fetchTransactions: (?number, ?number) => void,
|
||||
fetchingTransactions: boolean,
|
||||
slim: boolean,
|
||||
};
|
||||
|
@ -29,9 +29,9 @@ class TransactionRefreshButton extends PureComponent<Props, State> {
|
|||
// The fetchTransactions call will be super fast most of the time.
|
||||
// Instead of showing a loading spinner for 100ms, change the label and show as "Refreshed!"
|
||||
if (slim) {
|
||||
fetchTransactions(1, LATEST_PAGE_SIZE);
|
||||
fetchTransactions(1, TX_LIST.LATEST_PAGE_SIZE);
|
||||
} else {
|
||||
fetchTransactions(1, 999999);
|
||||
fetchTransactions();
|
||||
}
|
||||
|
||||
this.setState({ label: __('Refreshed!'), disabled: true });
|
||||
|
|
|
@ -3,7 +3,6 @@ export const MINIMUM_PUBLISH_BID = 0.00000001;
|
|||
export const CHANNEL_ANONYMOUS = 'anonymous';
|
||||
export const CHANNEL_NEW = 'new';
|
||||
export const PAGE_SIZE = 20;
|
||||
export const LATEST_PAGE_SIZE = 20;
|
||||
|
||||
export const INVALID_NAME_ERROR =
|
||||
__('LBRY names cannot contain spaces or reserved symbols') + ' ' + '($#@;/"<>%{}|^~[]`)';
|
||||
|
|
|
@ -16,7 +16,7 @@ const select = (state, props) => {
|
|||
};
|
||||
|
||||
const perform = dispatch => ({
|
||||
fetchTransactions: (page, pageSize) => dispatch(doFetchTransactions(page, pageSize)),
|
||||
fetchTransactions: () => dispatch(doFetchTransactions()),
|
||||
});
|
||||
|
||||
export default withRouter(
|
||||
|
|
|
@ -4,7 +4,7 @@ import TransactionList from 'component/transactionList';
|
|||
import Page from 'component/page';
|
||||
|
||||
type Props = {
|
||||
fetchTransactions: (page, pageSize) => void,
|
||||
fetchTransactions: () => void,
|
||||
fetchingTransactions: boolean,
|
||||
filteredTransactionPage: Array<{}>,
|
||||
filteredTransactionsCount: number,
|
||||
|
@ -14,7 +14,7 @@ class TransactionHistoryPage extends React.PureComponent<Props> {
|
|||
componentDidMount() {
|
||||
const { fetchTransactions } = this.props;
|
||||
|
||||
fetchTransactions(1, 999999);
|
||||
fetchTransactions();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
@ -849,5 +849,13 @@
|
|||
"help guide": "help guide",
|
||||
"If you are having issues, checkout our %help% or email us at %email%.": "If you are having issues, checkout our %help% or email us at %email%.",
|
||||
"Wrong password for %email%": "Wrong password for %email%",
|
||||
"Legacy Licences": "Legacy Licences"
|
||||
"Legacy Licences": "Legacy Licences",
|
||||
"Latest Transactions": "Latest Transactions",
|
||||
"Looks like you don't have any transactions.": "Looks like you don't have any transactions.",
|
||||
"If Sync is on, LBRY will backup your wallet and preferences. If disabled, you are responsible for keeping a backup.": "If Sync is on, LBRY will backup your wallet and preferences. If disabled, you are responsible for keeping a backup.",
|
||||
"View My Publishes": "View My Publishes",
|
||||
"Your %publishMessage% pending on LBRY. It will take a few minutes to appear for other users.": "Your %publishMessage% pending on LBRY. It will take a few minutes to appear for other users.",
|
||||
"Upload will continue in the background, please do not shut down immediately. Leaving the app running helps the network, thank you!": "Upload will continue in the background, please do not shut down immediately. Leaving the app running helps the network, thank you!",
|
||||
"Are you sure want to revoke this claim?": "Are you sure want to revoke this claim?",
|
||||
"This will prevent others from resolving and accessing the content you published. It will return the LBC to your spendable balance, less a small transaction fee.": "This will prevent others from resolving and accessing the content you published. It will return the LBC to your spendable balance, less a small transaction fee."
|
||||
}
|
|
@ -6843,9 +6843,9 @@ lazy-val@^1.0.3, lazy-val@^1.0.4:
|
|||
yargs "^13.2.2"
|
||||
zstd-codec "^0.1.1"
|
||||
|
||||
lbry-redux@lbryio/lbry-redux#7563da014678eafca411c5b17808fbd331e5717a:
|
||||
lbry-redux@lbryio/lbry-redux#861880a029a748bb4300bec9b16b7136ac51c5c3:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/7563da014678eafca411c5b17808fbd331e5717a"
|
||||
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/861880a029a748bb4300bec9b16b7136ac51c5c3"
|
||||
dependencies:
|
||||
proxy-polyfill "0.1.6"
|
||||
reselect "^3.0.0"
|
||||
|
|
Loading…
Reference in a new issue