2020-04-01 20:43:50 +02:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
|
|
|
import FileDownloadLink from 'component/fileDownloadLink';
|
|
|
|
import * as RENDER_MODES from 'constants/file_render_modes';
|
|
|
|
import Card from 'component/common/card';
|
|
|
|
import Button from 'component/button';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
uri: string,
|
|
|
|
renderMode: string,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default function FileRenderDownload(props: Props) {
|
2020-05-21 17:38:28 +02:00
|
|
|
const { uri, renderMode } = props;
|
2020-04-01 20:43:50 +02:00
|
|
|
|
|
|
|
// @if TARGET='web'
|
|
|
|
if (RENDER_MODES.UNSUPPORTED_IN_THIS_APP.includes(renderMode)) {
|
|
|
|
return (
|
|
|
|
<Card
|
2020-08-26 22:28:33 +02:00
|
|
|
title={__('Download or get the app')}
|
2020-04-01 20:43:50 +02:00
|
|
|
subtitle={
|
|
|
|
<p>
|
2020-05-21 17:38:28 +02:00
|
|
|
{__(
|
2021-11-03 20:47:19 +01:00
|
|
|
'This content can be downloaded from odysee.com, but not displayed. It will display in LBRY Desktop, an app for desktop computers.'
|
2020-05-21 17:38:28 +02:00
|
|
|
)}
|
2020-04-01 20:43:50 +02:00
|
|
|
</p>
|
|
|
|
}
|
|
|
|
actions={
|
2020-05-18 22:46:03 +02:00
|
|
|
<div className="section__actions">
|
2020-05-21 17:38:28 +02:00
|
|
|
<FileDownloadLink uri={uri} buttonType="primary" showLabel />
|
|
|
|
<Button button={'link'} label={__('Get the App')} href="https://lbry.com/get" />
|
2020-05-18 22:46:03 +02:00
|
|
|
</div>
|
2020-04-01 20:43:50 +02:00
|
|
|
}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
// @endif
|
|
|
|
|
|
|
|
return <Card title={__('Download')} actions={<FileDownloadLink uri={uri} buttonType="primary" showLabel />} />;
|
|
|
|
}
|