prettier #2383
19 changed files with 102 additions and 102 deletions
|
@ -67,7 +67,7 @@ mainInstance.waitUntilValid(() => {
|
|||
|
||||
const child = proc.spawn(electron, ['./dist/electron/webpack/main.js']);
|
||||
|
||||
child.stdout.on('data', (data) => {
|
||||
child.stdout.on('data', data => {
|
||||
console.log(data.toString());
|
||||
});
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ if (isDev) {
|
|||
process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true;
|
||||
}
|
||||
|
||||
const startDaemon = async() => {
|
||||
const startDaemon = async () => {
|
||||
let isDaemonRunning = false;
|
||||
|
||||
await Lbry.status()
|
||||
|
@ -118,7 +118,7 @@ if (!gotSingleInstanceLock) {
|
|||
}
|
||||
});
|
||||
|
||||
app.on('ready', async() => {
|
||||
app.on('ready', async () => {
|
||||
startDaemon();
|
||||
startSandbox();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require('@babel/register');
|
||||
require("@babel/polyfill");
|
||||
require('@babel/polyfill');
|
||||
|
||||
require('./startSandbox.js')();
|
||||
|
|
|
@ -16,7 +16,7 @@ export default async function startSandbox() {
|
|||
const port = 5278;
|
||||
const sandbox = express();
|
||||
|
||||
sandbox.get('/set/:outpoint', async(req, res) => {
|
||||
sandbox.get('/set/:outpoint', async (req, res) => {
|
||||
const { outpoint } = req.params;
|
||||
|
||||
const resolvedPath = await unpackByOutpoint(Lbry, outpoint);
|
||||
|
|
|
@ -262,19 +262,19 @@ class CategoryList extends PureComponent<Props, State> {
|
|||
const showScrollButtons = isCommunityTopBids ? !obscureNsfw : true;
|
||||
|
||||
return (
|
||||
<section className='media-group--row'>
|
||||
<header className='media-group__header'>
|
||||
<div className='media-group__header-title'>
|
||||
<section className="media-group--row">
|
||||
<header className="media-group__header">
|
||||
<div className="media-group__header-title">
|
||||
{categoryLink ? (
|
||||
<div className='channel-info__actions'>
|
||||
<div className='channel-info__actions__group'>
|
||||
<div className="channel-info__actions">
|
||||
<div className="channel-info__actions__group">
|
||||
<Button
|
||||
label={category}
|
||||
navigate='/show'
|
||||
navigate="/show"
|
||||
navigateParams={{ uri: categoryLink, page: 1 }}
|
||||
/>
|
||||
<SubscribeButton
|
||||
button='alt'
|
||||
button="alt"
|
||||
showSnackBarOnSubscribe
|
||||
uri={`lbry://${categoryLink}`}
|
||||
/>
|
||||
|
@ -285,7 +285,7 @@ class CategoryList extends PureComponent<Props, State> {
|
|||
)}
|
||||
{isCommunityTopBids && (
|
||||
<ToolTip
|
||||
direction='top'
|
||||
direction="top"
|
||||
label={__("What's this?")}
|
||||
body={__(
|
||||
'Community Content is a public space where anyone can share content with the rest of the LBRY community. Bid on the names from "one" to "ten" to put your content here!'
|
||||
|
@ -294,7 +294,7 @@ class CategoryList extends PureComponent<Props, State> {
|
|||
)}
|
||||
</div>
|
||||
{showScrollButtons && (
|
||||
<nav className='media-group__header-navigation'>
|
||||
<nav className="media-group__header-navigation">
|
||||
<Button
|
||||
disabled={!canScrollPrevious}
|
||||
onClick={this.handleScrollPrevious}
|
||||
|
@ -309,14 +309,14 @@ class CategoryList extends PureComponent<Props, State> {
|
|||
)}
|
||||
</header>
|
||||
{obscureNsfw && isCommunityTopBids ? (
|
||||
<p className='media__message help--warning'>
|
||||
<p className="media__message help--warning">
|
||||
{__(
|
||||
'The community top bids section is only visible if you allow mature content in the app. You can change your content viewing preferences'
|
||||
)}{' '}
|
||||
<Button button='link' navigate='/settings' label={__('here')} />.
|
||||
<Button button="link" navigate="/settings" label={__('here')} />.
|
||||
</p>
|
||||
) : (
|
||||
<ul className='media-scrollhouse' ref={this.scrollWrapper}>
|
||||
<ul className="media-scrollhouse" ref={this.scrollWrapper}>
|
||||
{urisInList &&
|
||||
urisInList.map(uri => (
|
||||
<FileCard
|
||||
|
|
|
@ -80,12 +80,12 @@ class FileCard extends React.PureComponent<Props> {
|
|||
|
||||
if (!claim && (!pending || placeholder)) {
|
||||
return (
|
||||
<li className='media-card media-placeholder'>
|
||||
<div className='media__thumb placeholder' />
|
||||
<div className='media__title placeholder' />
|
||||
<div className='media__channel placeholder' />
|
||||
<div className='media__date placeholder' />
|
||||
<div className='media__properties' />
|
||||
<li className="media-card media-placeholder">
|
||||
<div className="media__thumb placeholder" />
|
||||
<div className="media__title placeholder" />
|
||||
<div className="media__channel placeholder" />
|
||||
<div className="media__date placeholder" />
|
||||
<div className="media__properties" />
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
@ -110,8 +110,8 @@ class FileCard extends React.PureComponent<Props> {
|
|||
|
||||
return (
|
||||
<li
|
||||
tabIndex='0'
|
||||
role='button'
|
||||
tabIndex="0"
|
||||
role="button"
|
||||
onClick={!pending ? () => navigate('/show', { uri }) : () => {}}
|
||||
className={classnames('media-card', {
|
||||
'card--link': !pending,
|
||||
|
@ -120,22 +120,22 @@ class FileCard extends React.PureComponent<Props> {
|
|||
onContextMenu={handleContextMenu}
|
||||
>
|
||||
<CardMedia thumbnail={thumbnail} />
|
||||
<div className='media__title'>
|
||||
<div className="media__title">
|
||||
<TruncatedText text={title} lines={2} />
|
||||
</div>
|
||||
<div className='media__subtitle'>
|
||||
<div className="media__subtitle">
|
||||
{pending ? <div>Pending...</div> : <UriIndicator uri={uri} link />}
|
||||
<div>
|
||||
<DateTime timeAgo block={height} />
|
||||
</div>
|
||||
</div>
|
||||
<div className='media__properties'>
|
||||
<div className="media__properties">
|
||||
<FilePrice hideFree uri={uri} />
|
||||
{isRewardContent && <Icon iconColor='red' icon={icons.FEATURED} />}
|
||||
{isRewardContent && <Icon iconColor="red" icon={icons.FEATURED} />}
|
||||
{isSubscribed && <Icon icon={icons.SUBSCRIPTION} />}
|
||||
{claimIsMine && <Icon icon={icons.PUBLISHED} />}
|
||||
{!claimIsMine && fileInfo && <Icon icon={icons.LOCAL} />}
|
||||
{isNew && <span className='badge badge--alert'>{__('NEW')}</span>}
|
||||
{isNew && <span className="badge badge--alert">{__('NEW')}</span>}
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
|
|
|
@ -254,7 +254,7 @@ class FileViewer extends React.PureComponent<Props> {
|
|||
return (
|
||||
<div className={classnames('video', {}, className)}>
|
||||
{isPlaying && (
|
||||
<div className='content__view'>
|
||||
<div className="content__view">
|
||||
{!isReadyToPlay ? (
|
||||
<div className={layoverClass} style={layoverStyle}>
|
||||
<LoadingScreen status={loadStatusMessage} />
|
||||
|
@ -284,7 +284,7 @@ class FileViewer extends React.PureComponent<Props> {
|
|||
)}
|
||||
{!isPlaying && (
|
||||
<div
|
||||
role='button'
|
||||
role="button"
|
||||
onClick={this.playContent}
|
||||
className={layoverClass}
|
||||
style={layoverStyle}
|
||||
|
|
|
@ -89,39 +89,39 @@ export default class FirstRun extends PureComponent<Props> {
|
|||
const showHelp = !showWelcome && !showEmail;
|
||||
|
||||
return (
|
||||
<div className='banner banner--first-run'>
|
||||
<Yrbl className='yrbl--first-run' />
|
||||
<div className="banner banner--first-run">
|
||||
<Yrbl className="yrbl--first-run" />
|
||||
|
||||
<div className='banner__item'>
|
||||
<div className='banner__item--static-for-animation'>
|
||||
<Welcome className='banner__content' pose={showWelcome ? 'show' : 'hide'}>
|
||||
<div className="banner__item">
|
||||
<div className="banner__item--static-for-animation">
|
||||
<Welcome className="banner__content" pose={showWelcome ? 'show' : 'hide'}>
|
||||
<div>
|
||||
<header className='card__header'>
|
||||
<h1 className='card__title'>{__('Hi There')}</h1>
|
||||
<header className="card__header">
|
||||
<h1 className="card__title">{__('Hi There')}</h1>
|
||||
</header>
|
||||
<div className='card__content'>
|
||||
<div className="card__content">
|
||||
{this.getWelcomeMessage()}
|
||||
<div className='card__actions card__actions--top-space'>
|
||||
<Button button='primary' onClick={acknowledgeWelcome} label={__("I'm In")} />
|
||||
<div className="card__actions card__actions--top-space">
|
||||
<Button button="primary" onClick={acknowledgeWelcome} label={__("I'm In")} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Welcome>
|
||||
</div>
|
||||
<div className='banner__item--static-for-animation'>
|
||||
<div className="banner__item--static-for-animation">
|
||||
<Email pose={showEmail ? 'show' : 'hide'}>
|
||||
<EmailCollection />
|
||||
</Email>
|
||||
</div>
|
||||
<div className='banner__item--static-for-animation'>
|
||||
<div className="banner__item--static-for-animation">
|
||||
<Help pose={showHelp ? 'show' : 'hide'}>
|
||||
<header className='card__header'>
|
||||
<h1 className='card__title'>{__('You Are Awesome!')}</h1>
|
||||
<header className="card__header">
|
||||
<h1 className="card__title">{__('You Are Awesome!')}</h1>
|
||||
</header>
|
||||
<div className='card__content'>
|
||||
<div className="card__content">
|
||||
<p>{__("Check out some of the neat content below me. I'll see you around!")}</p>
|
||||
<div className='card__actions'>
|
||||
<Button button='primary' onClick={completeFirstRun} label={__('See You Later')} />
|
||||
<div className="card__actions">
|
||||
<Button button="primary" onClick={completeFirstRun} label={__('See You Later')} />
|
||||
</div>
|
||||
</div>
|
||||
</Help>
|
||||
|
|
|
@ -70,11 +70,11 @@ class Spinner extends PureComponent<Props, State> {
|
|||
'spinner--small': type === 'small',
|
||||
})}
|
||||
>
|
||||
<div className='rect rect1' />
|
||||
<div className='rect rect2' />
|
||||
<div className='rect rect3' />
|
||||
<div className='rect rect4' />
|
||||
<div className='rect rect5' />
|
||||
<div className="rect rect1" />
|
||||
<div className="rect rect2" />
|
||||
<div className="rect rect3" />
|
||||
<div className="rect rect4" />
|
||||
<div className="rect rect5" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class UriIndicator extends React.PureComponent<Props> {
|
|||
render() {
|
||||
const { claim, link, isResolvingUri } = this.props;
|
||||
if (!claim) {
|
||||
return <span className='empty'>{isResolvingUri ? 'Validating...' : 'Unused'}</span>;
|
||||
return <span className="empty">{isResolvingUri ? 'Validating...' : 'Unused'}</span>;
|
||||
}
|
||||
const { channel_name: channelName, signature_is_valid: signatureIsValid, value } = claim;
|
||||
|
||||
|
@ -42,7 +42,7 @@ class UriIndicator extends React.PureComponent<Props> {
|
|||
value && value.publisherSignature && value.publisherSignature.certificateId;
|
||||
|
||||
if (!channelName) {
|
||||
return <span className='channel-name'>Anonymous</span>;
|
||||
return <span className="channel-name">Anonymous</span>;
|
||||
}
|
||||
|
||||
let channelLink;
|
||||
|
@ -50,7 +50,7 @@ class UriIndicator extends React.PureComponent<Props> {
|
|||
channelLink = link ? buildURI({ channelName, claimId: channelClaimId }) : false;
|
||||
}
|
||||
|
||||
const inner = <span className='channel-name'>{channelName}</span>;
|
||||
const inner = <span className="channel-name">{channelName}</span>;
|
||||
|
||||
if (!channelLink) {
|
||||
return inner;
|
||||
|
@ -59,8 +59,8 @@ class UriIndicator extends React.PureComponent<Props> {
|
|||
return (
|
||||
<Button
|
||||
noPadding
|
||||
className='button--uri-indicator'
|
||||
navigate='/show'
|
||||
className="button--uri-indicator"
|
||||
navigate="/show"
|
||||
navigateParams={{ uri: channelLink, page: 1 }}
|
||||
>
|
||||
{inner}
|
||||
|
|
|
@ -86,8 +86,8 @@ class UserPhoneNew extends React.PureComponent<Props, State> {
|
|||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<section className='card__content'>
|
||||
<p className='card__subtitle'>
|
||||
<section className="card__content">
|
||||
<p className="card__subtitle">
|
||||
{__(
|
||||
'Enter your phone number and we will send you a verification code. We will not share your phone number with third parties.'
|
||||
)}
|
||||
|
@ -95,12 +95,12 @@ class UserPhoneNew extends React.PureComponent<Props, State> {
|
|||
</section>
|
||||
|
||||
<Form onSubmit={this.handleSubmit}>
|
||||
<div className='card__content'>
|
||||
<fieldset-group class='fieldset-group--smushed'>
|
||||
<div className="card__content">
|
||||
<fieldset-group class="fieldset-group--smushed">
|
||||
<FormField
|
||||
label={__('Country')}
|
||||
type='select'
|
||||
name='country-codes'
|
||||
type="select"
|
||||
name="country-codes"
|
||||
onChange={this.handleSelect}
|
||||
>
|
||||
{countryCodes.map((country, index) => (
|
||||
|
@ -111,10 +111,10 @@ class UserPhoneNew extends React.PureComponent<Props, State> {
|
|||
))}
|
||||
</FormField>
|
||||
<FormField
|
||||
type='text'
|
||||
type="text"
|
||||
label={__('Number')}
|
||||
placeholder={this.state.countryCode === '+1' ? '(555) 555-5555' : '5555555555'}
|
||||
name='phone'
|
||||
name="phone"
|
||||
value={this.state.phone}
|
||||
error={phoneErrorMessage}
|
||||
onChange={event => {
|
||||
|
@ -123,8 +123,8 @@ class UserPhoneNew extends React.PureComponent<Props, State> {
|
|||
/>
|
||||
</fieldset-group>
|
||||
</div>
|
||||
<div className='card__actions'>
|
||||
<Submit label='Submit' disabled={isPending} />
|
||||
<div className="card__actions">
|
||||
<Submit label="Submit" disabled={isPending} />
|
||||
{cancelButton}
|
||||
</div>
|
||||
</Form>
|
||||
|
|
|
@ -545,9 +545,9 @@ export default class Autocomplete extends React.Component {
|
|||
composeEventHandlers(internal, external) {
|
||||
return external
|
||||
? e => {
|
||||
internal(e);
|
||||
external(e);
|
||||
}
|
||||
internal(e);
|
||||
external(e);
|
||||
}
|
||||
: internal;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,25 +58,25 @@ export class Modal extends React.PureComponent<ModalProps> {
|
|||
modal: !fullScreen,
|
||||
'modal--fullscreen': fullScreen,
|
||||
})}
|
||||
overlayClassName='modal-overlay'
|
||||
overlayClassName="modal-overlay"
|
||||
>
|
||||
{title && (
|
||||
<header className='card__header'>
|
||||
<h1 className='card__title'>{title}</h1>
|
||||
<header className="card__header">
|
||||
<h1 className="card__title">{title}</h1>
|
||||
</header>
|
||||
)}
|
||||
{children}
|
||||
{type === 'custom' ? null : ( // custom modals define their own buttons
|
||||
<div className='card__actions'>
|
||||
<div className="card__actions">
|
||||
<Button
|
||||
button='primary'
|
||||
button="primary"
|
||||
label={confirmButtonLabel}
|
||||
disabled={confirmButtonDisabled}
|
||||
onClick={onConfirmed}
|
||||
/>
|
||||
{type === 'confirm' ? (
|
||||
<Button
|
||||
button='link'
|
||||
button="link"
|
||||
label={abortButtonLabel}
|
||||
disabled={abortButtonDisabled}
|
||||
onClick={onAborted}
|
||||
|
@ -116,19 +116,19 @@ export class ExpandableModal extends React.PureComponent<ModalProps, State> {
|
|||
|
||||
render() {
|
||||
return (
|
||||
<Modal type='custom' {...this.props}>
|
||||
<Modal type="custom" {...this.props}>
|
||||
{this.props.children}
|
||||
{this.state.expanded ? (
|
||||
<div className='card__content'>{this.props.extraContent}</div>
|
||||
<div className="card__content">{this.props.extraContent}</div>
|
||||
) : null}
|
||||
<div className='card__actions'>
|
||||
<div className="card__actions">
|
||||
<Button
|
||||
button='primary'
|
||||
button="primary"
|
||||
label={this.props.confirmButtonLabel}
|
||||
onClick={this.props.onConfirmed}
|
||||
/>
|
||||
<Button
|
||||
button='link'
|
||||
button="link"
|
||||
label={!this.state.expanded ? this.props.expandButtonLabel : this.props.hideButtonLabel}
|
||||
onClick={() => {
|
||||
this.toggleExpanded();
|
||||
|
|
|
@ -42,17 +42,17 @@ class ModalError extends React.PureComponent<Props> {
|
|||
isOpen
|
||||
contentLabel={__('Error')}
|
||||
title={__('Error')}
|
||||
className='error-modal'
|
||||
className="error-modal"
|
||||
onConfirmed={closeModal}
|
||||
>
|
||||
<section className='card__content'>
|
||||
<section className="card__content">
|
||||
<p>
|
||||
{__(
|
||||
"We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem."
|
||||
)}
|
||||
</p>
|
||||
</section>
|
||||
<ul className='card__content error-modal__error-list'>{errorInfoList}</ul>
|
||||
<ul className="card__content error-modal__error-list">{errorInfoList}</ul>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ class AuthPage extends React.PureComponent<Props> {
|
|||
} else if (user && !user.is_identity_verified) {
|
||||
return [<UserVerify />, false];
|
||||
}
|
||||
return [<span className='empty'>{__('No further steps.')}</span>, true];
|
||||
return [<span className="empty">{__('No further steps.')}</span>, true];
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -62,15 +62,15 @@ class AuthPage extends React.PureComponent<Props> {
|
|||
return (
|
||||
<Page>
|
||||
{useTemplate ? (
|
||||
<section className='card card--section'>
|
||||
<section className="card card--section">
|
||||
{innerContent}
|
||||
|
||||
<p className='help'>
|
||||
<p className="help">
|
||||
{`${__(
|
||||
'This information is disclosed only to LBRY, Inc. and not to the LBRY network. It is only required to earn LBRY rewards and may be used to sync usage data across devices.'
|
||||
)} `}
|
||||
<Button
|
||||
button='link'
|
||||
button="link"
|
||||
onClick={() => navigate('/discover')}
|
||||
label={__('Return home.')}
|
||||
/>
|
||||
|
|
|
@ -132,8 +132,8 @@ class RewardsPage extends PureComponent<Props> {
|
|||
<p className="card__content">
|
||||
{claimed && claimed.length
|
||||
? __(
|
||||
"You have claimed all available rewards! We're regularly adding more so be sure to check back later."
|
||||
)
|
||||
"You have claimed all available rewards! We're regularly adding more so be sure to check back later."
|
||||
)
|
||||
: __('There are no rewards available at this time, please check back later.')}
|
||||
</p>
|
||||
</section>
|
||||
|
|
|
@ -11,7 +11,7 @@ const WalletPage = () => (
|
|||
<Page>
|
||||
{IS_WEB && <UnsupportedOnWeb />}
|
||||
<div className={classnames({ 'card--disabled': IS_WEB })}>
|
||||
<div className='columns'>
|
||||
<div className="columns">
|
||||
<WalletBalance />
|
||||
<RewardSummary />
|
||||
</div>
|
||||
|
|
|
@ -127,12 +127,12 @@ export const doUploadThumbnail = (filePath: string, nsfw: boolean) => (dispatch:
|
|||
.then(json =>
|
||||
json.success
|
||||
? dispatch({
|
||||
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
||||
data: {
|
||||
uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE,
|
||||
thumbnail: `${json.data.url}${fileExt}`,
|
||||
},
|
||||
})
|
||||
type: ACTIONS.UPDATE_PUBLISH_FORM,
|
||||
data: {
|
||||
uploadThumbnailStatus: THUMBNAIL_STATUSES.COMPLETE,
|
||||
thumbnail: `${json.data.url}${fileExt}`,
|
||||
},
|
||||
})
|
||||
: uploadError(json.message)
|
||||
)
|
||||
.catch(err => uploadError(err.message));
|
||||
|
|
|
@ -46,9 +46,9 @@ reducers[ACTIONS.CLEAR_CONTENT_HISTORY_URI] = (state, action) => {
|
|||
return index === -1
|
||||
? state
|
||||
: {
|
||||
...state,
|
||||
history: history.slice(0, index).concat(history.slice(index + 1)),
|
||||
};
|
||||
...state,
|
||||
history: history.slice(0, index).concat(history.slice(index + 1)),
|
||||
};
|
||||
};
|
||||
|
||||
reducers[ACTIONS.CLEAR_CONTENT_HISTORY_ALL] = state => ({ ...state, history: [] });
|
||||
|
|
Loading…
Reference in a new issue