mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-03 02:35:12 +00:00
minor improvement: if not live yet, say users are waiting instead of watching
This commit is contained in:
parent
f0d0992d20
commit
e1531b03bf
3 changed files with 7 additions and 5 deletions
|
@ -8,17 +8,18 @@ type Props = {
|
||||||
uri: string,
|
uri: string,
|
||||||
livestream?: boolean,
|
livestream?: boolean,
|
||||||
activeViewers?: number,
|
activeViewers?: number,
|
||||||
|
stateOfViewers: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
function FileSubtitle(props: Props) {
|
function FileSubtitle(props: Props) {
|
||||||
const { uri, livestream = false, activeViewers = 0 } = props;
|
const { uri, livestream = false, activeViewers = 0, stateOfViewers } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="media__subtitle--between">
|
<div className="media__subtitle--between">
|
||||||
<div className="file__viewdate">
|
<div className="file__viewdate">
|
||||||
{livestream ? <span>{__('Right now')}</span> : <DateTime uri={uri} show={DateTime.SHOW_DATE} />}
|
{livestream ? <span>{__('Right now')}</span> : <DateTime uri={uri} show={DateTime.SHOW_DATE} />}
|
||||||
{livestream ? (
|
{livestream ? (
|
||||||
<span>{__('%viewer_count% currently watching', { viewer_count: activeViewers })}</span>
|
<span>{__('%viewer_count% currently %viewer_state%', { viewer_count: activeViewers, viewer_state: stateOfViewers })}</span>
|
||||||
) : (
|
) : (
|
||||||
<FileViewCount uri={uri} />
|
<FileViewCount uri={uri} />
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -20,10 +20,11 @@ type Props = {
|
||||||
isNsfwBlocked: boolean,
|
isNsfwBlocked: boolean,
|
||||||
livestream?: boolean,
|
livestream?: boolean,
|
||||||
activeViewers?: number,
|
activeViewers?: number,
|
||||||
|
stateOfViewers: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
function FileTitleSection(props: Props) {
|
function FileTitleSection(props: Props) {
|
||||||
const { title, uri, nsfw, isNsfwBlocked, livestream = false, activeViewers } = props;
|
const { title, uri, nsfw, isNsfwBlocked, livestream = false, activeViewers, stateOfViewers } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
|
@ -43,7 +44,7 @@ function FileTitleSection(props: Props) {
|
||||||
body={
|
body={
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<ClaimInsufficientCredits uri={uri} />
|
<ClaimInsufficientCredits uri={uri} />
|
||||||
<FileSubtitle uri={uri} livestream={livestream} activeViewers={activeViewers} />
|
<FileSubtitle uri={uri} livestream={livestream} activeViewers={activeViewers} stateOfViewers={stateOfViewers} />
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
actions={
|
actions={
|
||||||
|
|
|
@ -41,7 +41,7 @@ export default function LivestreamLayout(props: Props) {
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<FileTitleSection uri={uri} livestream isLive={isLive} activeViewers={activeViewers} />
|
<FileTitleSection uri={uri} livestream isLive={isLive} activeViewers={activeViewers} stateOfViewers={isLive ? "watching" : "waiting"} />
|
||||||
</div>
|
</div>
|
||||||
<LivestreamComments uri={uri} />
|
<LivestreamComments uri={uri} />
|
||||||
</>
|
</>
|
||||||
|
|
Loading…
Add table
Reference in a new issue