2020-03-14 17:07:36 +01:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import DateTime from 'component/dateTime';
|
|
|
|
import FileViewCount from 'component/fileViewCount';
|
2020-09-30 22:46:20 +02:00
|
|
|
import FileActions from 'component/fileActions';
|
2021-11-05 20:14:00 +01:00
|
|
|
import ClaimPreviewReset from 'component/claimPreviewReset';
|
2020-03-14 17:07:36 +01:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
uri: string,
|
2021-03-18 18:21:49 +01:00
|
|
|
livestream?: boolean,
|
2021-04-14 17:40:36 +02:00
|
|
|
isLive?: boolean,
|
2020-03-14 17:07:36 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
function FileSubtitle(props: Props) {
|
2021-11-17 10:23:01 +01:00
|
|
|
const { uri, livestream = false, isLive = false } = props;
|
2020-03-14 17:07:36 +01:00
|
|
|
|
|
|
|
return (
|
2021-11-05 20:14:00 +01:00
|
|
|
<>
|
|
|
|
<div className="media__subtitle--between">
|
|
|
|
<div className="file__viewdate">
|
|
|
|
{livestream ? <span>{__('Right now')}</span> : <DateTime uri={uri} show={DateTime.SHOW_DATE} />}
|
2021-04-14 17:40:36 +02:00
|
|
|
|
2021-11-17 10:23:01 +01:00
|
|
|
<FileViewCount uri={uri} livestream={livestream} isLive={isLive} />
|
2021-11-05 20:14:00 +01:00
|
|
|
</div>
|
2020-09-30 22:46:20 +02:00
|
|
|
|
2021-11-05 20:14:00 +01:00
|
|
|
<FileActions uri={uri} hideRepost={livestream} livestream={livestream} />
|
|
|
|
</div>
|
|
|
|
{livestream && isLive && <ClaimPreviewReset uri={uri} />}
|
|
|
|
</>
|
2020-03-14 17:07:36 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default FileSubtitle;
|