import React from "react"; import ReactMarkdown from "react-markdown"; import lbry from "lbry.js"; import FileActions from "component/fileActions"; import Link from "component/link"; import DateTime from "component/dateTime"; const path = require("path"); class FileDetails extends React.PureComponent { render() { const { claim, contentType, fileInfo, metadata, openFolder, uri, } = this.props; if (!claim || !metadata) { return (
{__("Empty claim or metadata info.")}
); } const { description, language, license } = metadata; const mediaType = lbry.getMediaType(contentType); const downloadPath = fileInfo ? path.normalize(fileInfo.download_path) : null; return (
{downloadPath && }
{__("Content-Type")}{mediaType}
{__("Language")}{language}
{__("License")}{license}
{__("Downloaded to")} openFolder(downloadPath)}> {downloadPath}
); } } export default FileDetails;