From 371c6bf3acfc30876615d629bd58bf37738d7ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Fri, 14 Dec 2018 17:16:44 -0600 Subject: [PATCH 1/8] Fixes --- package.json | 3 +- src/main/index.js | 1 - src/renderer/component/address/view.jsx | 2 +- src/renderer/component/app/view.jsx | 1 + src/renderer/component/button/view.jsx | 6 +- src/renderer/component/cardMedia/view.jsx | 16 +- src/renderer/component/categoryList/view.jsx | 66 +- src/renderer/component/channelTile/view.jsx | 20 +- .../component/common/credit-amount.jsx | 17 +- .../common/form-components/form-field.jsx | 8 +- src/renderer/component/common/lbc-symbol.jsx | 2 +- src/renderer/component/expandable/view.jsx | 1 + src/renderer/component/fileCard/view.jsx | 52 +- src/renderer/component/fileDetails/view.jsx | 47 +- src/renderer/component/fileList/view.jsx | 5 +- .../component/fileListSearch/view.jsx | 26 +- src/renderer/component/fileTile/view.jsx | 38 +- .../fileViewer/internal/play-button.jsx | 15 +- src/renderer/component/header/view.jsx | 87 +- src/renderer/component/inviteList/view.jsx | 8 +- src/renderer/component/inviteNew/view.jsx | 32 +- src/renderer/component/publishForm/view.jsx | 266 +- .../component/recommendedContent/view.jsx | 8 +- .../component/rewardListClaimed/view.jsx | 4 +- src/renderer/component/rewardSummary/view.jsx | 69 +- src/renderer/component/rewardTile/view.jsx | 39 +- .../shapeShift/internal/active-shift.jsx | 17 +- .../component/shapeShift/internal/form.jsx | 11 +- src/renderer/component/shapeShift/view.jsx | 18 +- src/renderer/component/sideBar/view.jsx | 89 +- src/renderer/component/snackBar/view.jsx | 15 +- .../component/splash/internal/load-screen.jsx | 84 +- .../component/subscribeSuggested/view.jsx | 2 +- .../internal/transaction-list-item.jsx | 21 +- .../component/transactionList/view.jsx | 107 +- .../component/transactionListRecent/view.jsx | 58 +- src/renderer/component/userEmailNew/view.jsx | 19 +- .../component/userEmailVerify/view.jsx | 75 +- src/renderer/component/userHistory/view.jsx | 21 +- .../component/userHistoryItem/view.jsx | 2 +- .../component/userPhoneVerify/view.jsx | 13 +- src/renderer/component/userVerify/view.jsx | 141 +- src/renderer/component/walletAddress/view.jsx | 57 +- src/renderer/component/walletBalance/view.jsx | 9 +- src/renderer/component/walletSend/view.jsx | 5 +- src/renderer/component/walletSendTip/view.jsx | 28 +- src/renderer/component/wunderbar/index.js | 2 +- src/renderer/modal/modal.jsx | 39 +- .../modal/modalAffirmPurchase/view.jsx | 4 +- src/renderer/modal/modalCreditIntro/view.jsx | 9 +- src/renderer/modal/modalPublish/index.js | 5 +- src/renderer/modal/modalRemoveFile/index.js | 6 +- .../modal/modalWalletDecrypt/index.js | 6 +- src/renderer/modal/modalWalletUnlock/index.js | 6 +- src/renderer/page/auth/view.jsx | 14 +- src/renderer/page/backup/view.jsx | 25 +- src/renderer/page/channel/view.jsx | 90 +- src/renderer/page/file/view.jsx | 151 +- src/renderer/page/fileListDownloaded/view.jsx | 25 +- src/renderer/page/fileListPublished/view.jsx | 27 +- src/renderer/page/getCredits/view.jsx | 16 +- src/renderer/page/help/view.jsx | 269 +- src/renderer/page/report/view.jsx | 21 +- src/renderer/page/rewards/view.jsx | 35 +- src/renderer/page/search/view.jsx | 70 +- src/renderer/page/settings/view.jsx | 258 +- src/renderer/page/show/view.jsx | 15 +- .../page/subscriptions/internal/first-run.jsx | 2 +- .../internal/user-subscriptions.jsx | 8 +- src/renderer/page/transactionHistory/view.jsx | 10 +- src/renderer/redux/actions/publish.js | 21 +- src/renderer/redux/reducers/subscriptions.js | 9 +- src/renderer/redux/selectors/app.js | 82 +- src/renderer/scss/_gui.scss | 351 - src/renderer/scss/_reset.scss | 97 - src/renderer/scss/all.scss | 58 +- src/renderer/scss/component/_animation.scss | 47 + src/renderer/scss/component/_badge.scss | 48 +- src/renderer/scss/component/_button.scss | 282 +- src/renderer/scss/component/_card.scss | 388 +- .../scss/component/_channel-indicator.scss | 6 - src/renderer/scss/component/_channel.scss | 25 + src/renderer/scss/component/_content.scss | 40 +- src/renderer/scss/component/_credit.scss | 17 + src/renderer/scss/component/_expandable.scss | 53 +- .../scss/component/_file-download.scss | 2 +- src/renderer/scss/component/_file-render.scss | 42 +- src/renderer/scss/component/_form-field.scss | 132 +- src/renderer/scss/component/_form-row.scss | 49 + src/renderer/scss/component/_header.scss | 139 +- src/renderer/scss/component/_icon.scss | 2 +- src/renderer/scss/component/_item-list.scss | 12 +- src/renderer/scss/component/_load-screen.scss | 64 +- src/renderer/scss/component/_main.scss | 10 + .../scss/component/_markdown-editor.scss | 7 + .../scss/component/_markdown-preview.scss | 88 +- src/renderer/scss/component/_media.scss | 703 ++ src/renderer/scss/component/_menu.scss | 17 +- src/renderer/scss/component/_modal.scss | 53 +- src/renderer/scss/component/_nav.scss | 106 - src/renderer/scss/component/_navigation.scss | 147 + src/renderer/scss/component/_notice.scss | 12 +- src/renderer/scss/component/_page.scss | 53 + src/renderer/scss/component/_pagination.scss | 48 +- src/renderer/scss/component/_placeholder.scss | 26 +- src/renderer/scss/component/_scrollbar.scss | 4 + src/renderer/scss/component/_search.scss | 118 +- src/renderer/scss/component/_snack-bar.scss | 27 +- src/renderer/scss/component/_spinner.scss | 26 +- .../scss/component/_subscriptions.scss | 25 +- src/renderer/scss/component/_table.scss | 139 +- src/renderer/scss/component/_toggle.scss | 123 +- src/renderer/scss/component/_tooltip.scss | 46 +- src/renderer/scss/component/_wunderbar.scss | 112 + src/renderer/scss/init/_gui.scss | 210 + src/renderer/scss/init/_mixins.scss | 77 + src/renderer/scss/init/_reset.scss | 170 + src/renderer/scss/{ => init}/_type.scss | 0 src/renderer/scss/{ => init}/_vars.scss | 10 +- src/renderer/scss/themes/_dark.scss | 224 - static/img/placeholder.png | Bin 0 -> 28818 bytes yarn.lock | 10517 ---------------- 122 files changed, 4150 insertions(+), 13658 deletions(-) delete mode 100644 src/renderer/scss/_gui.scss delete mode 100644 src/renderer/scss/_reset.scss create mode 100644 src/renderer/scss/component/_animation.scss delete mode 100644 src/renderer/scss/component/_channel-indicator.scss create mode 100644 src/renderer/scss/component/_channel.scss create mode 100644 src/renderer/scss/component/_credit.scss create mode 100644 src/renderer/scss/component/_form-row.scss create mode 100644 src/renderer/scss/component/_main.scss create mode 100644 src/renderer/scss/component/_media.scss delete mode 100644 src/renderer/scss/component/_nav.scss create mode 100644 src/renderer/scss/component/_navigation.scss create mode 100644 src/renderer/scss/component/_page.scss create mode 100644 src/renderer/scss/component/_wunderbar.scss create mode 100644 src/renderer/scss/init/_gui.scss create mode 100644 src/renderer/scss/init/_mixins.scss create mode 100644 src/renderer/scss/init/_reset.scss rename src/renderer/scss/{ => init}/_type.scss (100%) rename src/renderer/scss/{ => init}/_vars.scss (82%) delete mode 100644 src/renderer/scss/themes/_dark.scss create mode 100644 static/img/placeholder.png delete mode 100644 yarn.lock diff --git a/package.json b/package.json index 12e6b7c8ba7..c975e10e3d2 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "electron-log": "^2.2.12", "electron-updater": "^2.23.3", "electron-window-state": "^4.1.1", + "filewatcher-webpack-plugin": "^1.2.0", "find-process": "^1.1.0", "formik": "^0.10.4", "hast-util-sanitize": "^1.1.2", @@ -89,6 +90,7 @@ }, "devDependencies": { "@lbry/color": "^1.0.2", + "@lbry/components": "^1.5.1", "axios": "^0.18.0", "babel-eslint": "^8.2.2", "babel-plugin-module-resolver": "^3.1.1", @@ -113,7 +115,6 @@ "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-prettier": "^2.6.0", "eslint-plugin-react": "^7.7.0", - "filewatcher-webpack-plugin": "^1.2.0", "flow-bin": "^0.69.0", "flow-typed": "^2.3.0", "husky": "^0.14.3", diff --git a/src/main/index.js b/src/main/index.js index 37c817ff9df..856ce191fa1 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -67,7 +67,6 @@ app.on('ready', async () => { // Windows WMIC returns lbrynet start with 2 spaces. https://github.com/yibn2008/find-process/issues/18 const processListArgs = process.platform === 'win32' ? 'lbrynet start' : 'lbrynet start'; const processList = await findProcess('name', processListArgs); - const isDaemonRunning = processList.length > 0; if (!isDaemonRunning) { diff --git a/src/renderer/component/address/view.jsx b/src/renderer/component/address/view.jsx index 71fc8541f54..050326d4daa 100644 --- a/src/renderer/component/address/view.jsx +++ b/src/renderer/component/address/view.jsx @@ -23,7 +23,7 @@ export default class Address extends React.PureComponent { const { address, doToast } = this.props; return ( - + { scrollListener() { const { recordScroll } = this.props; + if (this.mainContent) { recordScroll(this.mainContent.scrollTop); } diff --git a/src/renderer/component/button/view.jsx b/src/renderer/component/button/view.jsx index 7915597c4e6..e21f593bc44 100644 --- a/src/renderer/component/button/view.jsx +++ b/src/renderer/component/button/view.jsx @@ -23,7 +23,7 @@ type Props = { noPadding: ?boolean, // to remove padding and allow circular buttons uppercase: ?boolean, iconColor?: string, - tourniquet: ?boolean, // to shorten the button and ellipsis, only use for links + constrict: ?boolean, // to shorten the button and ellipsis, only use for links }; class Button extends React.PureComponent { @@ -51,7 +51,7 @@ class Button extends React.PureComponent { noPadding, uppercase, iconColor, - tourniquet, + constrict, ...otherProps } = this.props; @@ -71,7 +71,7 @@ class Button extends React.PureComponent { 'btn--link': button === 'link', 'btn--external-link': button === 'link' && href, 'btn--uppercase': uppercase, - 'btn--tourniquet': tourniquet, + 'btn--constrict': constrict, } : 'btn--no-style', className diff --git a/src/renderer/component/cardMedia/view.jsx b/src/renderer/component/cardMedia/view.jsx index 5956f658749..5c128a4dd0b 100644 --- a/src/renderer/component/cardMedia/view.jsx +++ b/src/renderer/component/cardMedia/view.jsx @@ -1,6 +1,6 @@ // @flow import React from 'react'; -import classnames from 'classnames'; +import Native from 'native'; type Props = { thumbnail: ?string, // externally sourced image @@ -12,13 +12,13 @@ class CardMedia extends React.PureComponent { return (
- {!thumbnail && LBRY} -
+ style={ + thumbnail + ? { backgroundImage: `url('${thumbnail}')` } + : { backgroundImage: `url('${Native.imagePath('placeholder.png')}')` } + } + className="media__thumb" + /> ); } } diff --git a/src/renderer/component/categoryList/view.jsx b/src/renderer/component/categoryList/view.jsx index 19d2625e20f..3e87fb4924f 100644 --- a/src/renderer/component/categoryList/view.jsx +++ b/src/renderer/component/categoryList/view.jsx @@ -7,7 +7,6 @@ import ToolTip from 'component/common/tooltip'; import FileCard from 'component/fileCard'; import Button from 'component/button'; import SubscribeButton from 'component/subscribeButton'; -import classnames from 'classnames'; type Props = { category: string, @@ -17,7 +16,6 @@ type Props = { channelClaims: ?Array, fetchChannel: string => void, obscureNsfw: boolean, - isSubComponent: boolean, }; type State = { @@ -28,7 +26,6 @@ type State = { class CategoryList extends PureComponent { static defaultProps = { categoryLink: '', - isSubComponent: false, }; constructor() { @@ -210,32 +207,29 @@ class CategoryList extends PureComponent { } render() { - const { - category, - categoryLink, - names, - channelClaims, - obscureNsfw, - isSubComponent, - } = this.props; + const { category, categoryLink, names, channelClaims, obscureNsfw } = this.props; const { canScrollNext, canScrollPrevious } = this.state; const isCommunityTopBids = category.match(/^community/i); const showScrollButtons = isCommunityTopBids ? !obscureNsfw : true; - // isSubComponent is a hack, this component should be able to handle this with proper overflow styling - return ( -
-
-
+
+
+
{categoryLink ? ( -
-
) : ( category @@ -250,38 +244,30 @@ class CategoryList extends PureComponent { )}
{showScrollButtons && ( -
+
+ )} -
+ {obscureNsfw && isCommunityTopBids ? ( -
+

{__( 'The community top bids section is only visible if you allow mature content in the app. You can change your content viewing preferences' )}{' '}

+

) : ( -
{ this.rowItems = ref; }} @@ -314,9 +300,9 @@ class CategoryList extends PureComponent { new Array(10).fill(1).map((x, i) => ) /* eslint-enable react/no-array-index-key */ } -
+ )} -
+ ); } } diff --git a/src/renderer/component/channelTile/view.jsx b/src/renderer/component/channelTile/view.jsx index 106c8ad11f5..69d1d196eb3 100644 --- a/src/renderer/component/channelTile/view.jsx +++ b/src/renderer/component/channelTile/view.jsx @@ -9,6 +9,7 @@ import type { Claim } from 'types/claim'; type Props = { uri: string, isResolvingUri: boolean, + isSearchResult: boolean, totalItems: number, size: string, claim: ?Claim, @@ -36,7 +37,7 @@ class ChannelTile extends React.PureComponent { } render() { - const { claim, navigate, isResolvingUri, totalItems, uri, size } = this.props; + const { claim, navigate, isResolvingUri, isSearchResult, totalItems, uri, size } = this.props; let channelName; let subscriptionUri; @@ -51,20 +52,21 @@ class ChannelTile extends React.PureComponent {
-
- {isResolvingUri &&
{__('Loading...')}
} +
+ {isResolvingUri &&
{__('Loading...')}
} {!isResolvingUri && ( -
+
-
+
{totalItems > 0 && ( {totalItems} {totalItems === 1 ? 'file' : 'files'} @@ -75,7 +77,7 @@ class ChannelTile extends React.PureComponent { )} {subscriptionUri && ( -
+
)} diff --git a/src/renderer/component/common/credit-amount.jsx b/src/renderer/component/common/credit-amount.jsx index b15ba435a02..9f3c1c64f59 100644 --- a/src/renderer/component/common/credit-amount.jsx +++ b/src/renderer/component/common/credit-amount.jsx @@ -13,7 +13,6 @@ type Props = { large?: boolean, showLBC?: boolean, fee?: boolean, - inheritStyle?: boolean, badge?: boolean, }; @@ -37,7 +36,6 @@ class CreditAmount extends React.PureComponent { isEstimate, fee, showLBC, - inheritStyle, badge, } = this.props; @@ -66,7 +64,11 @@ class CreditAmount extends React.PureComponent { } if (showLBC) { - amountText = `${amountText} ${__('LBC')}`; + amountText = ( + + {amountText} {__('LBC')} + + ); } if (fee) { @@ -77,14 +79,11 @@ class CreditAmount extends React.PureComponent { return ( 0, 'badge--free': badge && isFree, + 'badge--large': large, })} > {amountText} diff --git a/src/renderer/component/common/form-components/form-field.jsx b/src/renderer/component/common/form-components/form-field.jsx index 39dee43b03d..932b0d61284 100644 --- a/src/renderer/component/common/form-components/form-field.jsx +++ b/src/renderer/component/common/form-components/form-field.jsx @@ -68,9 +68,11 @@ export class FormField extends React.PureComponent { if (type) { if (type === 'select') { input = ( - +
+ +
); } else if (type === 'markdown') { const handleEvents = { diff --git a/src/renderer/component/common/lbc-symbol.jsx b/src/renderer/component/common/lbc-symbol.jsx index ae292f94c6a..612247836c7 100644 --- a/src/renderer/component/common/lbc-symbol.jsx +++ b/src/renderer/component/common/lbc-symbol.jsx @@ -1,6 +1,6 @@ // @flow import React from 'react'; -const LbcSymbol = () => LBC; +const LbcSymbol = () => LBC; // ℄ export default LbcSymbol; diff --git a/src/renderer/component/expandable/view.jsx b/src/renderer/component/expandable/view.jsx index 2bbd6636b9e..b4e180585e7 100644 --- a/src/renderer/component/expandable/view.jsx +++ b/src/renderer/component/expandable/view.jsx @@ -48,6 +48,7 @@ export default class Expandable extends PureComponent {
- {hasClickedComment && ( -

- {user - ? __( - 'Your support has been added. You will be notified when comments are available.' - ) - : __('Your support has been added. Comments are coming soon.')} -

- )} + +
Comments
+ +
+
+
+ {hasClickedComment && ( +

+ {user + ? __('Your support has been added. You will be notified when comments are available.') + : __('Your support has been added. Comments are coming soon.')} +

+ )} ); } diff --git a/src/renderer/component/fileList/view.jsx b/src/renderer/component/fileList/view.jsx index d5bb5e86d14..179100d8157 100644 --- a/src/renderer/component/fileList/view.jsx +++ b/src/renderer/component/fileList/view.jsx @@ -174,7 +174,10 @@ class FileList extends React.PureComponent {
)} -
{content}
+ +
+
{content}
+
); } diff --git a/src/renderer/component/fileListSearch/view.jsx b/src/renderer/component/fileListSearch/view.jsx index b68ebb4dee5..ad7ae496840 100644 --- a/src/renderer/component/fileListSearch/view.jsx +++ b/src/renderer/component/fileListSearch/view.jsx @@ -35,33 +35,35 @@ class FileListSearch extends React.PureComponent { query && (
-
-
{__('Search Results')}
+
+
{__('Search Results')}
{!isSearching && fileResults.length ? ( - fileResults.map(uri => ) + fileResults.map(uri => ) ) : ( )} -
+ -
-
{__('Channels')}
+
+
{__('Channels')}
{!isSearching && channelResults.length ? ( - channelResults.map(uri => ) + channelResults.map(uri => ) ) : ( )} -
+ -
-
{__('Your downloads')}
+
+
{__('Your downloads')}
{downloadUris && downloadUris.length ? ( - downloadUris.map(uri => ) + downloadUris.map(uri => ( + + )) ) : ( )} -
+
) diff --git a/src/renderer/component/fileTile/view.jsx b/src/renderer/component/fileTile/view.jsx index 5cd0b351156..9b9416d602f 100644 --- a/src/renderer/component/fileTile/view.jsx +++ b/src/renderer/component/fileTile/view.jsx @@ -16,6 +16,7 @@ type Props = { obscureNsfw: boolean, claimIsMine: boolean, isDownloaded: boolean, + isSearchResult: boolean, uri: string, isResolvingUri: boolean, rewardedContentClaimIds: Array, @@ -62,7 +63,7 @@ class FileTile extends React.PureComponent { const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id); return ( -
+
{isNew && {__('NEW')}} {isSubscribed && } @@ -77,6 +78,7 @@ class FileTile extends React.PureComponent { claim, metadata, isResolvingUri, + isSearchResult, navigate, obscureNsfw, claimIsMine, @@ -91,16 +93,15 @@ class FileTile extends React.PureComponent { if (!claim && isResolvingUri) { return (
-
+
-
-
-
+
+
+
); @@ -133,9 +134,10 @@ class FileTile extends React.PureComponent { return !name && hideNoResult ? null : (
{ tabIndex="0" > -
-
+
+
{(title || name) && ( )}
-
+
-
- +
+
+ +
{size !== 'large' && this.renderFileProperties()}
{displayDescription && ( -
+
)} diff --git a/src/renderer/component/fileViewer/internal/play-button.jsx b/src/renderer/component/fileViewer/internal/play-button.jsx index 8da57c5ea8e..57b4e68a83d 100644 --- a/src/renderer/component/fileViewer/internal/play-button.jsx +++ b/src/renderer/component/fileViewer/internal/play-button.jsx @@ -1,5 +1,5 @@ // @flow -import * as ICONS from 'constants/icons'; +import classnames from 'classnames'; import React from 'react'; import Button from 'component/button'; @@ -15,10 +15,19 @@ class VideoPlayButton extends React.PureComponent { const { fileInfo, mediaType, isLoading, play } = this.props; const disabled = isLoading || fileInfo === undefined; const doesPlayback = ['audio', 'video'].indexOf(mediaType) !== -1; - const icon = doesPlayback ? ICONS.PLAY : ICONS.EYE; const label = doesPlayback ? __('Play') : __('View'); - return
-
- -
-
+ + + + { + // TODO: Make `Menu` add `.active` class to `.navigation` when clicked + } + +
+
diff --git a/src/renderer/component/inviteList/view.jsx b/src/renderer/component/inviteList/view.jsx index c2426dcbba0..e7ce9bff7ea 100644 --- a/src/renderer/component/inviteList/view.jsx +++ b/src/renderer/component/inviteList/view.jsx @@ -24,9 +24,10 @@ class InviteList extends React.PureComponent { return (
-
-

{__('Invite History')}

-
+
+

{__('Invite History')}

+
+
{invitees.length === 0 && ( {__("You haven't invited anyone.")} @@ -66,6 +67,7 @@ class InviteList extends React.PureComponent { )}
+
{__( diff --git a/src/renderer/component/inviteNew/view.jsx b/src/renderer/component/inviteNew/view.jsx index 8b9a54b6b92..b8d5d28c161 100644 --- a/src/renderer/component/inviteNew/view.jsx +++ b/src/renderer/component/inviteNew/view.jsx @@ -47,8 +47,11 @@ class FormInviteNew extends React.PureComponent { }} /> -
- + +
+
+ +
); @@ -68,11 +71,14 @@ class InviteNew extends React.PureComponent { return (
-
{__('Invite a Friend')}
+
+

{__('Invite a Friend')}

+ +

+ {__("Or an enemy. Or your cousin Jerry, who you're kind of unsure about.")} +

+
-
- {__("Or an enemy. Or your cousin Jerry, who you're kind of unsure about.")} -
{/*
{invitesRemaining > 0 && @@ -80,6 +86,7 @@ class InviteNew extends React.PureComponent { {invitesRemaining <= 0 &&

{__("You have no invites.")}

}
*/} +
-

- {__('Read our')}{' '} -

); } diff --git a/src/renderer/component/publishForm/view.jsx b/src/renderer/component/publishForm/view.jsx index d20a920736e..87b71b29ce4 100644 --- a/src/renderer/component/publishForm/view.jsx +++ b/src/renderer/component/publishForm/view.jsx @@ -292,9 +292,9 @@ class PublishForm extends React.PureComponent { {uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && (
{__('Please wait for thumbnail to finish uploading')}
)} - {!!editingURI && - !isStillEditing && - !filePath &&
{__('You need to reselect a file after changing the LBRY URL')}
} + {!!editingURI && !isStillEditing && !filePath && ( +
{__('You need to reselect a file after changing the LBRY URL')}
+ )}
) ); @@ -348,35 +348,35 @@ class PublishForm extends React.PureComponent { return (
-
- {__('Content')} - {(filePath || !!editingURI) && ( -
-
- )} -
-
- {isStillEditing ? __('Editing a claim') : __('What are you publishing?')}{' '} - {__('Read our')}{' '} -
+
+

{__('Content')}

+

+ {isStillEditing ? __('Editing a claim') : __('What are you publishing?')}{' '} + {__('Read our')}{' '} +

+ + {(filePath || !!editingURI) && ( +
+
+ )}
- {!!isStillEditing && - name && ( -

- {__("If you don't choose a file, the file from your existing claim")} - {` "${name}" `} - {__('will be used.')} -

- )} + {!!isStillEditing && name && ( +

+ {__("If you don't choose a file, the file from your existing claim")} + {` "${name}" `} + {__('will be used.')} +

+ )}
@@ -408,18 +408,21 @@ class PublishForm extends React.PureComponent {
-
{__('Thumbnail')}
-
- {uploadThumbnailStatus === THUMBNAIL_STATUSES.API_DOWN ? ( - __('Enter a URL for your thumbnail.') - ) : ( - - {__('Upload your thumbnail (.png/.jpg/.jpeg/.gif) to')}{' '} -
+
+

{__('Thumbnail')}

+

+ {uploadThumbnailStatus === THUMBNAIL_STATUSES.API_DOWN ? ( + __('Enter a URL for your thumbnail.') + ) : ( + + {__('Upload your thumbnail (.png/.jpg/.jpeg/.gif) to')}{' '} +

+ {
-
{__('Price')}
-
{__('How much will this content cost?')}
+
+

{__('Price')}

+

{__('How much will this content cost?')}

+
+
{
-
{__('Anonymous or under a channel?')}
-

- {__('This is a username or handle that your content can be found under.')}{' '} - {__('Ex. @Marvel, @TheBeatles, @BooksByJoe')} -

- +
+

{__('Anonymous or under a channel?')}

+

+ {__('This is a username or handle that your content can be found under.')}{' '} + {__('Ex. @Marvel, @TheBeatles, @BooksByJoe')} +

+
+ +
+ +
-
{__('Where can people find this content?')}
-

- {__( - 'The LBRY URL is the exact address where people find your content (ex. lbry://myvideo).' - )}{' '} -

- - updatePublishForm({ nsfw: event.target.checked })} +
+ + updatePublishForm({ nsfw: event.target.checked })} + /> + + + + updatePublishForm({ language: event.target.value })} + > + + + + + + + + + + + + updatePublishForm({ + licenseType: newLicenseType, + licenseUrl: newLicenseUrl, + }) + } + handleLicenseDescriptionChange={event => + updatePublishForm({ + otherLicenseDescription: event.target.value, + }) + } + handleLicenseUrlChange={event => + updatePublishForm({ licenseUrl: event.target.value }) + } /> - +
+
- - updatePublishForm({ language: event.target.value })} - > - - - - - - - - - +
+
+ {__('By continuing, you accept the')}{' '} +
+
- - updatePublishForm({ - licenseType: newLicenseType, - licenseUrl: newLicenseUrl, - }) - } - handleLicenseDescriptionChange={event => - updatePublishForm({ - otherLicenseDescription: event.target.value, - }) - } - handleLicenseUrlChange={event => - updatePublishForm({ licenseUrl: event.target.value }) - } - /> +
+
+
+ +
+
-
- -
-
- {__('By continuing, you accept the')}{' '} -
{!formDisabled && !formValid && this.renderFormErrors()}
diff --git a/src/renderer/component/recommendedContent/view.jsx b/src/renderer/component/recommendedContent/view.jsx index 4a12aecb3f5..5d8fd7edf28 100644 --- a/src/renderer/component/recommendedContent/view.jsx +++ b/src/renderer/component/recommendedContent/view.jsx @@ -50,7 +50,7 @@ export default class RecommendedContent extends React.PureComponent { const { recommendedContent, isSearching } = this.props; return ( -
+
Related {recommendedContent && recommendedContent.map(recommendedUri => ( @@ -62,9 +62,9 @@ export default class RecommendedContent extends React.PureComponent { uri={recommendedUri} /> ))} - {recommendedContent && - !recommendedContent.length && - !isSearching &&
No related content found
} + {recommendedContent && !recommendedContent.length && !isSearching && ( +
No related content found
+ )}
); } diff --git a/src/renderer/component/rewardListClaimed/view.jsx b/src/renderer/component/rewardListClaimed/view.jsx index 60bc8de556c..6874ac59c32 100644 --- a/src/renderer/component/rewardListClaimed/view.jsx +++ b/src/renderer/component/rewardListClaimed/view.jsx @@ -24,7 +24,9 @@ const RewardListClaimed = (props: Props) => { return (
-
Claimed Rewards
+
+

Claimed Rewards

+
diff --git a/src/renderer/component/rewardSummary/view.jsx b/src/renderer/component/rewardSummary/view.jsx index b849f134497..7dab901dad5 100644 --- a/src/renderer/component/rewardSummary/view.jsx +++ b/src/renderer/component/rewardSummary/view.jsx @@ -23,38 +23,45 @@ class RewardSummary extends React.Component { return (
-
- {__('Rewards')} - {fetching && } -
-

- {!fetching && - (hasRewards ? ( - - {__('You have')} -   - -   - {__('in unclaimed rewards')}. - - ) : ( - - {__('There are no rewards available at this time, please check back later')}. - - ))} -

-
-
+ +

+ {__('Read our')}{' '} +

); } diff --git a/src/renderer/component/rewardTile/view.jsx b/src/renderer/component/rewardTile/view.jsx index 5298845fdb8..640861bc4c9 100644 --- a/src/renderer/component/rewardTile/view.jsx +++ b/src/renderer/component/rewardTile/view.jsx @@ -25,23 +25,28 @@ const RewardTile = (props: Props) => { return (
-
{reward.reward_title}
-
{reward.reward_description}
-
- {reward.reward_type === rewards.TYPE_GENERATED_CODE && ( -
); diff --git a/src/renderer/component/shapeShift/internal/active-shift.jsx b/src/renderer/component/shapeShift/internal/active-shift.jsx index fd14d27a12b..f39896a9001 100644 --- a/src/renderer/component/shapeShift/internal/active-shift.jsx +++ b/src/renderer/component/shapeShift/internal/active-shift.jsx @@ -80,9 +80,9 @@ class ActiveShapeShift extends React.PureComponent {

Send up to{' '} - + {originCoinDepositMax} {shiftCoinType} - {' '} + {' '} to the address below.

{ /> )}
- {shiftState === statuses.NO_DEPOSITS && - shiftReturnAddress && ( -
- {__("If the transaction doesn't go through, ShapeShift will return your")}{' '} - {shiftCoinType} {__('back to')} {shiftReturnAddress} -
- )} + {shiftState === statuses.NO_DEPOSITS && shiftReturnAddress && ( +
+ {__("If the transaction doesn't go through, ShapeShift will return your")}{' '} + {shiftCoinType} {__('back to')} {shiftReturnAddress} +
+ )} ); } diff --git a/src/renderer/component/shapeShift/internal/form.jsx b/src/renderer/component/shapeShift/internal/form.jsx index 9f635d8abae..c7169b28d4c 100644 --- a/src/renderer/component/shapeShift/internal/form.jsx +++ b/src/renderer/component/shapeShift/internal/form.jsx @@ -83,13 +83,14 @@ export default (props: Props) => { value={values.returnAddress} /> + - - ({__('optional but recommended')})
- {__('We will return your')} {originCoin}{' '} - {__("to this address if the transaction doesn't go through.")} -
+ ({__('optional but recommended')})
+ {__('We will return your')} {originCoin}{' '} + {__("to this address if the transaction doesn't go through.")}
+
+
{ return (
-
{__('Convert Crypto to LBC')}
-

- {__('Powered by ShapeShift. Read our FAQ')}{' '} -

); } diff --git a/src/renderer/component/splash/internal/load-screen.jsx b/src/renderer/component/splash/internal/load-screen.jsx index a25001bf3ad..58adb4777d7 100644 --- a/src/renderer/component/splash/internal/load-screen.jsx +++ b/src/renderer/component/splash/internal/load-screen.jsx @@ -22,46 +22,52 @@ class LoadScreen extends React.PureComponent { return (
-
-

{__('LBRY')}

- beta +
+
+

+ {__('LBRY')} + beta +

+
+ {error ? ( + +

{__('Uh oh. Sean must have messed something up. Try refreshing to fix it.')}

+
+
+
+

+ {__( + 'If you still have issues, your anti-virus software or firewall may be preventing startup.' + )} +

+

+ {__('Reach out to hello@lbry.io for help, or check out')}{' '} +

+
+ ) : ( + + {isWarning ? ( + + + {` ${message}`} + + ) : ( +
{message}
+ )} + + {details &&
{details}
} + +
+ )}
- {error ? ( - -

{__('Uh oh. Sean must have messed something up. Try refreshing to fix it.')}

-
-
-
-

- {__( - 'If you still have issues, your anti-virus software or firewall may be preventing startup.' - )} -

-

- {__('Reach out to hello@lbry.io for help, or check out')}{' '} -

-
- ) : ( - - {isWarning ? ( - - - {` ${message}`} - - ) : ( -
{message}
- )} - {details &&
{details}
} - -
- )}
); } diff --git a/src/renderer/component/subscribeSuggested/view.jsx b/src/renderer/component/subscribeSuggested/view.jsx index 73570f429d9..952ec348575 100644 --- a/src/renderer/component/subscribeSuggested/view.jsx +++ b/src/renderer/component/subscribeSuggested/view.jsx @@ -23,7 +23,7 @@ class SuggestedSubscriptions extends PureComponent { return suggested ? (
{suggested.map(({ uri, label }) => ( - + ))}
) : null; diff --git a/src/renderer/component/transactionList/internal/transaction-list-item.jsx b/src/renderer/component/transactionList/internal/transaction-list-item.jsx index 2fafa9ecaa1..375f5db696e 100644 --- a/src/renderer/component/transactionList/internal/transaction-list-item.jsx +++ b/src/renderer/component/transactionList/internal/transaction-list-item.jsx @@ -67,17 +67,16 @@ class TransactionListItem extends React.PureComponent {
{reward && {reward.reward_title}} - {name && - claimId && ( - - )} + {name && claimId && ( + + )} diff --git a/src/renderer/component/transactionList/view.jsx b/src/renderer/component/transactionList/view.jsx index 0f3790b89f3..f620d702b18 100644 --- a/src/renderer/component/transactionList/view.jsx +++ b/src/renderer/component/transactionList/view.jsx @@ -1,5 +1,5 @@ // @flow -import * as ICONS from 'constants/icons'; +import * as icons from 'constants/icons'; import * as MODALS from 'constants/modal_types'; import * as React from 'react'; import { FormField } from 'component/common/form'; @@ -78,12 +78,12 @@ class TransactionList extends React.PureComponent { return ( - {!transactionList.length && ( -

{emptyMessage || __('No transactions to list.')}

- )} - {!slim && - !!transactions.length && ( -
+
+ {!transactionList.length && ( +

{emptyMessage || __('No transactions to list.')}

+ )} + {!slim && !!transactionList.length && ( +
{ filters={['nout']} defaultPath={__('lbry-transactions-history')} /> - {!slim && ( - - } - > - {transactionTypes.map(tt => ( - - ))} - - )} + + + } + > + {transactionTypes.map(tt => ( + + ))} +
)} +
+ {!!transactionList.length && ( - - - - - - - - - - - - {transactionList.map(t => ( - - ))} - -
{__('Amount')}{__('Type')} {__('Details')} {__('Transaction')}{__('Date')}
+
+ + + + + + + + + + + + {transactionList.map(t => ( + + ))} + +
{__('Amount')}{__('Type')} {__('Details')} {__('Transaction')}{__('Date')}
+
)} ); diff --git a/src/renderer/component/transactionListRecent/view.jsx b/src/renderer/component/transactionListRecent/view.jsx index a6e00b4a66f..41312823b54 100644 --- a/src/renderer/component/transactionListRecent/view.jsx +++ b/src/renderer/component/transactionListRecent/view.jsx @@ -1,6 +1,6 @@ // @flow import type { Transaction } from 'component/transactionList/view'; -import * as ICONS from 'constants/icons'; +import * as icons from 'constants/icons'; import React, { Fragment } from 'react'; import BusyIndicator from 'component/common/busy-indicator'; import Button from 'component/button'; @@ -27,34 +27,40 @@ class TransactionListRecent extends React.PureComponent { const { fetchingTransactions, hasTransactions, transactions } = this.props; return (
-
- {__('Recent Transactions')} - -
-
- {__('To view all of your transactions, navigate to the')}{' '} -
- {fetchingTransactions && - !hasTransactions && ( -
- -
- )} +
+

+ {__('Recent Transactions')} + +

+ +

+ {__('To view all of your transactions, navigate to the')}{' '} +

+ + {fetchingTransactions && !hasTransactions && ( +
+ +
+ )} + {hasTransactions && ( - -
-
)} diff --git a/src/renderer/component/userEmailNew/view.jsx b/src/renderer/component/userEmailNew/view.jsx index 47553e47632..d6079c16f70 100644 --- a/src/renderer/component/userEmailNew/view.jsx +++ b/src/renderer/component/userEmailNew/view.jsx @@ -41,11 +41,17 @@ class UserEmailNew extends React.PureComponent { const { cancelButton, errorMessage, isPending } = this.props; return ( -
+

{__("We'll let you know about LBRY updates, security issues, and great new content.")}

-

{__("We'll never sell your email, and you can unsubscribe at any time.")}

+ +

+ {__( + 'In addition, your email address will never be sold and you can unsubscribe at any time.' + )} +

+
{ onChange={this.handleEmailChanged} /> +
{cancelButton} +

-
+ +

{`${__('Your email may be used to sync usage data across devices.')} `} -

+

-
+ ); } } diff --git a/src/renderer/component/userEmailVerify/view.jsx b/src/renderer/component/userEmailVerify/view.jsx index 07429a2c428..b9eed09ec5a 100644 --- a/src/renderer/component/userEmailVerify/view.jsx +++ b/src/renderer/component/userEmailVerify/view.jsx @@ -54,48 +54,51 @@ class UserEmailVerify extends React.PureComponent { const { cancelButton, errorMessage, email, isPending, onModal } = this.props; return ( -
+

Please enter the verification code emailed to {email}.

- - this.handleCodeChanged(event)} - /> - -
-

+ + + + this.handleCodeChanged(event)} + /> + + +

+ + {cancelButton} + {!onModal && ( +
+ +

{__('Email')}

-
- - {cancelButton} - {!onModal && ( -
)} - - {onModal && ( -
-
- )} - + +
); } } diff --git a/src/renderer/component/userHistory/view.jsx b/src/renderer/component/userHistory/view.jsx index 9e4e1905a78..7383a070273 100644 --- a/src/renderer/component/userHistory/view.jsx +++ b/src/renderer/component/userHistory/view.jsx @@ -161,12 +161,21 @@ class UserHistoryPage extends React.PureComponent {
) : (
-

- {__("You don't have anything saved in history yet, go check out some content on LBRY!")} -

-
-
+
+
+

+ {__( + "You don't have anything saved in history yet, go check out some content on LBRY!" + )} +

+
+ +
+
+
+
+
); } diff --git a/src/renderer/component/userHistoryItem/view.jsx b/src/renderer/component/userHistoryItem/view.jsx index b5ae798088b..8c5787daefd 100644 --- a/src/renderer/component/userHistoryItem/view.jsx +++ b/src/renderer/component/userHistoryItem/view.jsx @@ -47,7 +47,7 @@ class UserHistoryItem extends React.PureComponent { {moment(lastViewed).from(moment())} {title}