2019-06-11 20:10:58 +02:00
|
|
|
// @flow
|
|
|
|
import * as icons from 'constants/icons';
|
|
|
|
import * as React from 'react';
|
|
|
|
import Icon from 'component/common/icon';
|
|
|
|
import FilePrice from 'component/filePrice';
|
2019-06-27 22:27:38 +02:00
|
|
|
import VideoDuration from 'component/videoDuration';
|
2019-06-11 20:10:58 +02:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
uri: string,
|
|
|
|
downloaded: boolean,
|
|
|
|
claimIsMine: boolean,
|
|
|
|
isSubscribed: boolean,
|
|
|
|
isNew: boolean,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default function FileProperties(props: Props) {
|
2019-11-02 16:55:17 +01:00
|
|
|
const { uri, downloaded, claimIsMine, isSubscribed } = props;
|
2019-06-11 20:10:58 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="file-properties">
|
2019-06-28 09:33:07 +02:00
|
|
|
{isSubscribed && <Icon tooltip icon={icons.SUBSCRIBE} />}
|
2019-06-28 09:27:55 +02:00
|
|
|
{!claimIsMine && downloaded && <Icon tooltip icon={icons.DOWNLOAD} />}
|
2019-06-11 20:10:58 +02:00
|
|
|
<FilePrice hideFree uri={uri} />
|
2019-06-27 22:27:38 +02:00
|
|
|
<VideoDuration className="media__subtitle" uri={uri} />
|
2019-06-11 20:10:58 +02:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|