diff --git a/flow-typed/web.js b/flow-typed/web.js new file mode 100644 index 000000000..69b1914e0 --- /dev/null +++ b/flow-typed/web.js @@ -0,0 +1,3 @@ +// @flow + +declare var IS_WEB: boolean; diff --git a/src/ui/component/app/view.jsx b/src/ui/component/app/view.jsx index 8f2ea7f64..74be7a2d6 100644 --- a/src/ui/component/app/view.jsx +++ b/src/ui/component/app/view.jsx @@ -70,14 +70,14 @@ class App extends React.PureComponent { return (
openContextMenu(e)}>
-
+
{enhancedLayout && }
-
+
); } diff --git a/src/ui/component/common/lbc-symbol.jsx b/src/ui/component/common/lbc-symbol.jsx index 612247836..0fb91fe46 100644 --- a/src/ui/component/common/lbc-symbol.jsx +++ b/src/ui/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/ui/component/fileViewer/internal/player.jsx b/src/ui/component/fileViewer/internal/player.jsx index 0cb98774a..cc602c63e 100644 --- a/src/ui/component/fileViewer/internal/player.jsx +++ b/src/ui/component/fileViewer/internal/player.jsx @@ -202,8 +202,8 @@ class MediaPlayer extends React.PureComponent { } // @if TARGET='app' - sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); + sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); } refreshMetadata() { diff --git a/src/ui/component/fileViewer/view.jsx b/src/ui/component/fileViewer/view.jsx index 914d8ceef..34336951c 100644 --- a/src/ui/component/fileViewer/view.jsx +++ b/src/ui/component/fileViewer/view.jsx @@ -47,6 +47,7 @@ type Props = { nextFileToPlay: ?string, navigate: (string, {}) => void, costInfo: ?{ cost: number }, + insufficientCredits: boolean, }; class FileViewer extends React.PureComponent { @@ -150,7 +151,11 @@ class FileViewer extends React.PureComponent { } playContent() { - const { play, uri, fileInfo, isDownloading, isLoading } = this.props; + const { play, uri, fileInfo, isDownloading, isLoading, insufficientCredits } = this.props; + + if (insufficientCredits) { + return; + } // @if TARGET='app' if (fileInfo || isDownloading || isLoading) { @@ -220,6 +225,7 @@ class FileViewer extends React.PureComponent { className, obscureNsfw, mediaType, + insufficientCredits, } = this.props; const isPlaying = playingUri === uri; @@ -246,7 +252,10 @@ class FileViewer extends React.PureComponent { } const poster = metadata && metadata.thumbnail; - const layoverClass = classnames('content__cover', { 'card__media--nsfw': shouldObscureNsfw }); + const layoverClass = classnames('content__cover', { + 'card__media--nsfw': shouldObscureNsfw, + 'card__media--disabled': insufficientCredits, + }); const layoverStyle = !shouldObscureNsfw && poster ? { backgroundImage: `url("${poster}")` } : {}; diff --git a/src/ui/component/header/view.jsx b/src/ui/component/header/view.jsx index 75d923e62..769571697 100644 --- a/src/ui/component/header/view.jsx +++ b/src/ui/component/header/view.jsx @@ -85,8 +85,7 @@ const Header = (props: Props) => { title={`Your balance is ${balance} LBRY Credits`} label={ - {roundedBalance} - + {roundedBalance} } navigate="/$/wallet" @@ -94,6 +93,7 @@ const Header = (props: Props) => {