[redesign] groundwork

This commit is contained in:
Sean Yesmunt 2018-01-22 17:21:43 -08:00
parent b461c684b1
commit 5c3088d5ef
7 changed files with 1167 additions and 883 deletions

View file

@ -49,7 +49,6 @@ class FileCard extends React.PureComponent<Props> {
rewardedContentClaimIds,
obscureNsfw,
} = this.props;
const uri = normalizeURI(this.props.uri);
const title = metadata && metadata.title ? metadata.title : uri;
const thumbnail = metadata && metadata.thumbnail ? metadata.thumbnail : null;

View file

@ -2,8 +2,8 @@
import React from 'react';
import Button from 'component/link';
import { buildURI } from 'lbryURI';
import { Icon } from 'component/common';
import classnames from 'classnames';
import Icon from 'component/common/icon';
type Props = {
isResolvingUri: boolean,
@ -69,6 +69,14 @@ class UriIndicator extends React.PureComponent<Props> {
modifier = 'invalid';
}
// {!signatureIsValid ? (
// <Icon
// icon={icon}
// className={`channel-indicator__icon channel-indicator__icon--${modifier}`}
// />
// ) : (
// ''
// )}
const inner = (
<span>
<span
@ -78,14 +86,6 @@ class UriIndicator extends React.PureComponent<Props> {
>
{channelName}
</span>{' '}
{!signatureIsValid ? (
<Icon
icon={icon}
className={`channel-indicator__icon channel-indicator__icon--${modifier}`}
/>
) : (
''
)}
</span>
);

View file

@ -1,5 +1,5 @@
import { connect } from 'react-redux';
import { normalizeURI } from 'lbryURI.js';
import { normalizeURI } from 'lbryURI';
import { selectState as selectSearch, selectWunderBarAddress } from 'redux/selectors/search';
import { doNavigate } from 'redux/actions/navigation';
import { updateSearchQuery, getSearchSuggestions } from 'redux/actions/search';

View file

@ -279,9 +279,7 @@ export function doLoadVideo(uri) {
});
dispatch(
doAlertError(
`Failed to download ${
uri
}, please try again. If this problem persists, visit https://lbry.io/faq/support for support.`
`Failed to download ${uri}, please try again. If this problem persists, visit https://lbry.io/faq/support for support.`
)
);
});

View file

@ -1,5 +1,5 @@
import * as ACTIONS from 'constants/action_types';
import { buildURI } from 'lbryURI';
import { normalizeURI } from 'lbryURI';
import { doResolveUri } from 'redux/actions/content';
import { doNavigate } from 'redux/actions/navigation';
import { selectCurrentPage } from 'redux/selectors/navigation';
@ -98,7 +98,7 @@ export const getSearchSuggestions = value => dispatch => {
// If it's not a valid uri, then add a "search for {query}" result
const searchLabel = `Search for "${value}"`;
try {
const uri = Lbryuri.normalize(value);
const uri = normalizeURI(value);
formattedSuggestions.unshift(
{ label: uri, value: uri },
{ label: searchLabel, value: `${value}?search` }

View file

@ -68,11 +68,12 @@ export function doUpdateIsNight() {
const momentNow = moment();
return {
type: ACTIONS.UPDATE_IS_NIGHT,
data: { isNight: () => {
const startNightMoment = moment('19:00', 'HH:mm');
const endNightMoment = moment('8:00', 'HH:mm');
return !(momentNow.isAfter(endNightMoment) && momentNow.isBefore(startNightMoment));
}
data: {
isNight: () => {
const startNightMoment = moment('19:00', 'HH:mm');
const endNightMoment = moment('8:00', 'HH:mm');
return !(momentNow.isAfter(endNightMoment) && momentNow.isBefore(startNightMoment));
},
},
};
}

2010
yarn.lock

File diff suppressed because it is too large Load diff