uri to url
This commit is contained in:
parent
41d1021833
commit
64383d5787
4 changed files with 24 additions and 24 deletions
20
dist/bundle.es.js
vendored
20
dist/bundle.es.js
vendored
|
@ -1842,13 +1842,13 @@ const selectUpdatingChannel = reselect.createSelector(selectState$2, state => st
|
|||
|
||||
const selectUpdateChannelError = reselect.createSelector(selectState$2, state => state.updateChannelError);
|
||||
|
||||
const makeSelectMyStreamUrisForPage = (page = 1) => reselect.createSelector(selectMyClaimUrisWithoutChannels, uris => {
|
||||
const makeSelectMyStreamUrlsForPage = (page = 1) => reselect.createSelector(selectMyClaimUrisWithoutChannels, urls => {
|
||||
const start = (Number(page) - 1) * Number(PAGE_SIZE);
|
||||
const end = Number(page) * Number(PAGE_SIZE);
|
||||
return uris && uris.length ? uris.slice(start, end) : [];
|
||||
return urls && urls.length ? urls.slice(start, end) : [];
|
||||
});
|
||||
|
||||
const selectMyStreamUrisCount = reselect.createSelector(selectMyClaimUrisWithoutChannels, channels => channels.length);
|
||||
const selectMyStreamUrlsCount = reselect.createSelector(selectMyClaimUrisWithoutChannels, channels => channels.length);
|
||||
|
||||
function formatCredits(amount, precision, shortFormat = false) {
|
||||
let actualAmount = parseFloat(amount),
|
||||
|
@ -2714,13 +2714,13 @@ const makeSelectFileNameForUri = uri => reselect.createSelector(makeSelectFileIn
|
|||
return fileInfo && fileInfo.file_name;
|
||||
});
|
||||
|
||||
const makeSelectDownloadUrisForPage = (page = 1) => reselect.createSelector(selectDownloadedUris, uris => {
|
||||
const makeSelectDownloadUrlsForPage = (page = 1) => reselect.createSelector(selectDownloadedUris, urls => {
|
||||
const start = (Number(page) - 1) * Number(PAGE_SIZE);
|
||||
const end = Number(page) * Number(PAGE_SIZE);
|
||||
return uris && uris.length ? uris.slice(start, end) : [];
|
||||
return urls && urls.length ? urls.slice(start, end) : [];
|
||||
});
|
||||
|
||||
const selectDownloadUrisCount = reselect.createSelector(selectDownloadedUris, uris => uris.length);
|
||||
const selectDownloadUrlsCount = reselect.createSelector(selectDownloadedUris, uris => uris.length);
|
||||
|
||||
//
|
||||
|
||||
|
@ -5074,7 +5074,7 @@ exports.makeSelectContentTypeForUri = makeSelectContentTypeForUri;
|
|||
exports.makeSelectCoverForUri = makeSelectCoverForUri;
|
||||
exports.makeSelectDateForUri = makeSelectDateForUri;
|
||||
exports.makeSelectDownloadPathForUri = makeSelectDownloadPathForUri;
|
||||
exports.makeSelectDownloadUrisForPage = makeSelectDownloadUrisForPage;
|
||||
exports.makeSelectDownloadUrlsForPage = makeSelectDownloadUrlsForPage;
|
||||
exports.makeSelectDownloadingForUri = makeSelectDownloadingForUri;
|
||||
exports.makeSelectFetchingChannelClaims = makeSelectFetchingChannelClaims;
|
||||
exports.makeSelectFileInfoForUri = makeSelectFileInfoForUri;
|
||||
|
@ -5087,7 +5087,7 @@ exports.makeSelectLoadingForUri = makeSelectLoadingForUri;
|
|||
exports.makeSelectMediaTypeForUri = makeSelectMediaTypeForUri;
|
||||
exports.makeSelectMetadataForUri = makeSelectMetadataForUri;
|
||||
exports.makeSelectMetadataItemForUri = makeSelectMetadataItemForUri;
|
||||
exports.makeSelectMyStreamUrisForPage = makeSelectMyStreamUrisForPage;
|
||||
exports.makeSelectMyStreamUrlsForPage = makeSelectMyStreamUrlsForPage;
|
||||
exports.makeSelectNsfwCountForChannel = makeSelectNsfwCountForChannel;
|
||||
exports.makeSelectNsfwCountFromUris = makeSelectNsfwCountFromUris;
|
||||
exports.makeSelectPendingByUri = makeSelectPendingByUri;
|
||||
|
@ -5133,7 +5133,7 @@ exports.selectClaimsByUri = selectClaimsByUri;
|
|||
exports.selectCreateChannelError = selectCreateChannelError;
|
||||
exports.selectCreatingChannel = selectCreatingChannel;
|
||||
exports.selectCurrentChannelPage = selectCurrentChannelPage;
|
||||
exports.selectDownloadUrisCount = selectDownloadUrisCount;
|
||||
exports.selectDownloadUrlsCount = selectDownloadUrlsCount;
|
||||
exports.selectDownloadedUris = selectDownloadedUris;
|
||||
exports.selectDownloadingByOutpoint = selectDownloadingByOutpoint;
|
||||
exports.selectDownloadingFileInfos = selectDownloadingFileInfos;
|
||||
|
@ -5170,7 +5170,7 @@ exports.selectMyClaims = selectMyClaims;
|
|||
exports.selectMyClaimsOutpoints = selectMyClaimsOutpoints;
|
||||
exports.selectMyClaimsRaw = selectMyClaimsRaw;
|
||||
exports.selectMyClaimsWithoutChannels = selectMyClaimsWithoutChannels;
|
||||
exports.selectMyStreamUrisCount = selectMyStreamUrisCount;
|
||||
exports.selectMyStreamUrlsCount = selectMyStreamUrlsCount;
|
||||
exports.selectPendingById = selectPendingById;
|
||||
exports.selectPendingClaims = selectPendingClaims;
|
||||
exports.selectPlayingUri = selectPlayingUri;
|
||||
|
|
|
@ -206,8 +206,8 @@ export {
|
|||
selectCreatingChannel,
|
||||
selectCreateChannelError,
|
||||
selectChannelImportPending,
|
||||
makeSelectMyStreamUrisForPage,
|
||||
selectMyStreamUrisCount,
|
||||
makeSelectMyStreamUrlsForPage,
|
||||
selectMyStreamUrlsCount,
|
||||
} from 'redux/selectors/claims';
|
||||
|
||||
export { makeSelectCommentsForUri } from 'redux/selectors/comments';
|
||||
|
@ -232,8 +232,8 @@ export {
|
|||
makeSelectDownloadPathForUri,
|
||||
makeSelectFileNameForUri,
|
||||
makeSelectFilePartlyDownloaded,
|
||||
makeSelectDownloadUrisForPage,
|
||||
selectDownloadUrisCount,
|
||||
makeSelectDownloadUrlsForPage,
|
||||
selectDownloadUrlsCount,
|
||||
} from 'redux/selectors/file_info';
|
||||
|
||||
export {
|
||||
|
|
|
@ -592,19 +592,19 @@ export const selectUpdateChannelError = createSelector(
|
|||
state => state.updateChannelError
|
||||
);
|
||||
|
||||
export const makeSelectMyStreamUrisForPage = (page: number = 1) =>
|
||||
export const makeSelectMyStreamUrlsForPage = (page: number = 1) =>
|
||||
createSelector(
|
||||
selectMyClaimUrisWithoutChannels,
|
||||
uris => {
|
||||
urls => {
|
||||
const start = ((Number(page) - 1) * Number(PAGE_SIZE));
|
||||
const end = (Number(page) * Number(PAGE_SIZE));
|
||||
return (uris && uris.length)
|
||||
? uris.slice(start, end)
|
||||
return (urls && urls.length)
|
||||
? urls.slice(start, end)
|
||||
: [];
|
||||
}
|
||||
);
|
||||
|
||||
export const selectMyStreamUrisCount = createSelector(
|
||||
export const selectMyStreamUrlsCount = createSelector(
|
||||
selectMyClaimUrisWithoutChannels,
|
||||
channels => channels.length
|
||||
);
|
||||
|
|
|
@ -204,19 +204,19 @@ export const makeSelectFileNameForUri = uri =>
|
|||
}
|
||||
);
|
||||
|
||||
export const makeSelectDownloadUrisForPage = (page = 1) =>
|
||||
export const makeSelectDownloadUrlsForPage = (page = 1) =>
|
||||
createSelector(
|
||||
selectDownloadedUris,
|
||||
uris => {
|
||||
urls => {
|
||||
const start = ((Number(page) - 1) * Number(PAGE_SIZE));
|
||||
const end = (Number(page) * Number(PAGE_SIZE));
|
||||
return (uris && uris.length)
|
||||
? uris.slice(start, end)
|
||||
return (urls && urls.length)
|
||||
? urls.slice(start, end)
|
||||
: [];
|
||||
}
|
||||
);
|
||||
|
||||
export const selectDownloadUrisCount = createSelector(
|
||||
export const selectDownloadUrlsCount = createSelector(
|
||||
selectDownloadedUris,
|
||||
uris => uris.length
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue