commit
adff7230d9
14 changed files with 36 additions and 45 deletions
|
@ -3,9 +3,7 @@ import React from 'react';
|
|||
const ChannelInfoDisplay = ({name, longId, shortId}) => {
|
||||
return (
|
||||
<div>
|
||||
<h2>channel name: {name}</h2>
|
||||
<p className={'text--secondary'}>full channel id: {longId}</p>
|
||||
<p className={'text--secondary'}>short channel id: {shortId}</p>
|
||||
<h2>{name}:{shortId}</h2>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
import React from 'react';
|
||||
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
import HorizontalSplit from '@components/HorizontalSplit';
|
||||
/*
|
||||
This component shouldn't be necessary after pagination is reworked,
|
||||
though it might be useful for channel_mine situations.
|
||||
*/
|
||||
|
||||
class BlockedLeft extends React.PureComponent {
|
||||
render () {
|
||||
return (
|
||||
|
@ -19,7 +16,7 @@ class BlockedRight extends React.PureComponent {
|
|||
render () {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<p>In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications.</p>
|
||||
<p>In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content.</p>
|
||||
<p><a href={'https://lbry.io/faq/dmca'} >Click here</a> for more information.</p>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
@ -53,6 +50,6 @@ class AssetBlocked extends React.Component {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default AssetBlocked;
|
||||
|
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import Row from '@components/Row';
|
||||
import ProgressBar from '@components/ProgressBar';
|
||||
import { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from '../../constants/asset_display_states';
|
||||
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
|
||||
class AvailableContent extends React.Component {
|
||||
render () {
|
||||
|
@ -95,6 +95,6 @@ class AssetDisplay extends React.Component {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default AssetDisplay;
|
||||
|
|
|
@ -7,7 +7,7 @@ import AssetShareButtons from '@components/AssetShareButtons';
|
|||
import ClickToCopy from '@components/ClickToCopy';
|
||||
import HorizontalSplit from '@components/HorizontalSplit';
|
||||
import siteConfig from '@config/siteConfig.json';
|
||||
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
import AssetInfoFooter from '../../components/AssetInfoFooter/index';
|
||||
import { createPermanentURI } from '@clientutils/createPermanentURI';
|
||||
|
||||
|
@ -109,7 +109,7 @@ class AssetInfo extends React.Component {
|
|||
) : (
|
||||
<ClickToCopy
|
||||
id={'embed-text-image'}
|
||||
value={`<img src="${assetCanonicalUrl}.${fileExt}"/>`}
|
||||
value={`<img alt="${name}" src="${assetCanonicalUrl}.${fileExt}" />`}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { selectFile, updateError, clearFile } from '../../actions/publish';
|
|||
import { selectAsset } from '../../selectors/show';
|
||||
import View from './view';
|
||||
import siteConfig from '@config/siteConfig.json';
|
||||
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
|
||||
const { assetDefaults: { thumbnail: defaultThumbnail } } = siteConfig;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import { NavLink, withRouter } from 'react-router-dom';
|
||||
import NavBarChannelOptionsDropdown from '@components/NavBarChannelOptionsDropdown';
|
||||
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
|
||||
const VIEW = 'VIEW';
|
||||
const LOGOUT = 'LOGOUT';
|
||||
|
|
|
@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
|||
import createPageTitle from '../../utils/createPageTitle';
|
||||
import createMetaTags from '../../utils/createMetaTags';
|
||||
import oEmbed from '../../utils/oEmbed.js';
|
||||
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
|
||||
import siteConfig from '@config/siteConfig.json';
|
||||
const { details: { host } } = siteConfig;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import siteConfig from '@config/siteConfig.json';
|
||||
import determineContentTypeFromExtension from './determineContentTypeFromExtension';
|
||||
import createMetaTagsArray from './createMetaTagsArray';
|
||||
import createCanonicalLink from '../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
|
||||
const {
|
||||
details: {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import siteConfig from '@config/siteConfig.json';
|
||||
import determineContentTypeFromExtension from './determineContentTypeFromExtension';
|
||||
import createMetaTagsArray from './createMetaTagsArray';
|
||||
import createCanonicalLink from '../../../utils/createCanonicalLink';
|
||||
import createCanonicalLink from '@globalutils/createCanonicalLink';
|
||||
|
||||
const {
|
||||
details: {
|
||||
|
|
|
@ -3,7 +3,7 @@ const logger = require('winston');
|
|||
const { details: { host }, publishing: { disabled, disabledMessage } } = require('@config/siteConfig');
|
||||
|
||||
const { sendGATimingEvent } = require('../../../../utils/googleAnalytics.js');
|
||||
const isApprovedChannel = require('../../../../../utils/isApprovedChannel');
|
||||
const isApprovedChannel = require('@globalutils/isApprovedChannel');
|
||||
const { publishing: { publishOnlyApproved, approvedChannels } } = require('@config/siteConfig');
|
||||
|
||||
const { handleErrorResponse } = require('../../../utils/errorHandlers.js');
|
||||
|
@ -18,7 +18,7 @@ const parsePublishApiRequestFiles = require('./parsePublishApiRequestFiles.js');
|
|||
const authenticateUser = require('./authentication.js');
|
||||
|
||||
const chainquery = require('chainquery').default;
|
||||
const createCanonicalLink = require('../../../../../utils/createCanonicalLink');
|
||||
const createCanonicalLink = require('@globalutils/createCanonicalLink');
|
||||
|
||||
const CLAIM_TAKEN = 'CLAIM_TAKEN';
|
||||
const UNAPPROVED_CHANNEL = 'UNAPPROVED_CHANNEL';
|
||||
|
@ -115,7 +115,7 @@ const claimPublish = ({ body, files, headers, ip, originalUrl, user, tor }, res)
|
|||
if (channelName) {
|
||||
return chainquery.claim.queries.getShortClaimIdFromLongClaimId(claimData.certificateId, channelName);
|
||||
} else {
|
||||
return chainquery.claim.queries.getShortClaimIdFromLongClaimId(claimId, name, claimData).catch(error => {
|
||||
return chainquery.claim.queries.getShortClaimIdFromLongClaimId(claimId, name, claimData).catch(() => {
|
||||
return claimId.slice(0, 1);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ const parsePublishApiRequestFiles = require('../publish/parsePublishApiRequestFi
|
|||
const authenticateUser = require('../publish/authentication.js');
|
||||
const createThumbnailPublishParams = require('../publish/createThumbnailPublishParams.js');
|
||||
const chainquery = require('chainquery').default;
|
||||
const createCanonicalLink = require('../../../../../utils/createCanonicalLink');
|
||||
const createCanonicalLink = require('@globalutils/createCanonicalLink');
|
||||
|
||||
/*
|
||||
route to update a claim through the daemon
|
||||
|
@ -153,7 +153,7 @@ const claimUpdate = ({ body, files, headers, ip, originalUrl, user, tor }, res)
|
|||
if (channelName) {
|
||||
return chainquery.claim.queries.getShortClaimIdFromLongClaimId(result.certificateId, channelName);
|
||||
} else {
|
||||
return chainquery.claim.queries.getShortClaimIdFromLongClaimId(result.claimId, name, result).catch(error => {
|
||||
return chainquery.claim.queries.getShortClaimIdFromLongClaimId(result.claimId, name, result).catch(() => {
|
||||
return result.claimId.slice(0, 1);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ const {
|
|||
const { sessionKey } = require('@private/authConfig.json');
|
||||
|
||||
// configure.js doesn't handle new keys in config.json files yet. Make sure it doens't break.
|
||||
let bLE;
|
||||
let finalBlockListEndpoint;
|
||||
|
||||
function Server () {
|
||||
this.initialize = () => {
|
||||
|
@ -176,30 +176,29 @@ function Server () {
|
|||
return;
|
||||
}
|
||||
if (blockListEndpoint) {
|
||||
bLE = blockListEndpoint;
|
||||
finalBlockListEndpoint = blockListEndpoint;
|
||||
} else if (!blockListEndpoint) {
|
||||
if (typeof (blockListEndpoint) !== 'string') {
|
||||
logger.warn('blockListEndpoint is null due to outdated siteConfig file. \n' +
|
||||
'Continuing with default LBRY blocklist api endpoint. \n ' +
|
||||
'(Specify /"blockListEndpoint" : ""/ to disable.')
|
||||
bLE = 'https://api.lbry.io/file/list_blocked';
|
||||
'(Specify /"blockListEndpoint" : ""/ to disable.');
|
||||
finalBlockListEndpoint = 'https://api.lbry.io/file/list_blocked';
|
||||
}
|
||||
}
|
||||
logger.info(`Peforming updates...`);
|
||||
if (!bLE) {
|
||||
logger.info('Configured for no Block List')
|
||||
if (!finalBlockListEndpoint) {
|
||||
logger.info('Configured for no Block List');
|
||||
db.Tor.refreshTable().then((updatedTorList) => {
|
||||
logger.info('Tor list updated, length:', updatedTorList.length);
|
||||
});
|
||||
} else {
|
||||
|
||||
return Promise.all([
|
||||
db.Blocked.refreshTable(bLE),
|
||||
db.Blocked.refreshTable(finalBlockListEndpoint),
|
||||
db.Tor.refreshTable()])
|
||||
.then(([updatedBlockedList, updatedTorList]) => {
|
||||
logger.info('Blocked list updated, length:', updatedBlockedList.length);
|
||||
logger.info('Tor list updated, length:', updatedTorList.length);
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
this.start = () => {
|
||||
|
|
|
@ -12,10 +12,8 @@ import * as httpContext from 'express-http-context';
|
|||
import Reducers from '@reducers';
|
||||
import GAListener from '@components/GAListener';
|
||||
import App from '@app';
|
||||
import Sagas from '@sagas';
|
||||
import Actions from '@actions';
|
||||
|
||||
const createCanonicalLink = require('../../utils/createCanonicalLink');
|
||||
const createCanonicalLink = require('@globalutils/createCanonicalLink');
|
||||
|
||||
const getCanonicalUrlFromShow = show => {
|
||||
const requestId = show.requestList[show.request.id];
|
||||
|
@ -56,7 +54,6 @@ export default (req, res) => {
|
|||
|
||||
const runSaga = (action !== false && saga !== false);
|
||||
const renderPage = (store) => {
|
||||
|
||||
// Workaround, remove when a solution for async httpContext exists
|
||||
const showState = store.getState().show;
|
||||
const assetKeys = Object.keys(showState.assetList);
|
||||
|
@ -128,7 +125,7 @@ export default (req, res) => {
|
|||
res.redirect(canonicalUrl);
|
||||
}
|
||||
|
||||
return renderPage(store)
|
||||
return renderPage(store);
|
||||
});
|
||||
} else {
|
||||
const store = createStore(Reducers);
|
||||
|
|
|
@ -18,7 +18,7 @@ async function getMediaDimensions (fileType, filePath) {
|
|||
[ height, width ] = await getVideoHeightAndWidth(filePath);
|
||||
break;
|
||||
default:
|
||||
logger.error('unable to create File data for unspported file type:', fileType);
|
||||
logger.error('unable to create File dimension data for unspported file type:', fileType);
|
||||
break;
|
||||
}
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue