Show warning when opening files externally #2478
2 changed files with 7 additions and 11 deletions
|
@ -81,12 +81,10 @@ class FileDownloadLink extends React.PureComponent<Props> {
|
|||
button="alt"
|
||||
iconColor="green"
|
||||
icon={ICONS.EXTERNAL}
|
||||
onClick={
|
||||
() => {
|
||||
pause();
|
||||
openModal(MODALS.CONFIRM_EXTERNAL_RESOURCE, { path: fileInfo.download_path });
|
||||
}
|
||||
}
|
||||
onClick={() => {
|
||||
pause();
|
||||
openModal(MODALS.CONFIRM_EXTERNAL_RESOURCE, { path: fileInfo.download_path });
|
||||
}}
|
||||
/>
|
||||
</ToolTip>
|
||||
);
|
||||
|
|
|
@ -19,7 +19,7 @@ class ModalOpenExternalResource extends React.PureComponent<Props> {
|
|||
const { openExternal, openItem, showItemInFolder } = shell;
|
||||
if (uri) {
|
||||
openExternal(uri);
|
||||
} else if(path) {
|
||||
} else if (path) {
|
||||
const success = openItem(path);
|
||||
if (!success) {
|
||||
showItemInFolder(path);
|
||||
|
@ -58,10 +58,8 @@ class ModalOpenExternalResource extends React.PureComponent<Props> {
|
|||
>
|
||||
<section className="card__content">
|
||||
<p>
|
||||
{
|
||||
(uri && __('This link leads to an external website.')) ||
|
||||
(path && __('This file has been shared with you by other people.'))
|
||||
}
|
||||
{(uri && __('This link leads to an external website.')) ||
|
||||
(path && __('This file has been shared with you by other people.'))}
|
||||
</p>
|
||||
<blockquote>{uri || path}</blockquote>
|
||||
<p>{__('LBRY Inc is not responsible for its content, click continue to proceed at your own risk.')}</p>
|
||||
|
|
Loading…
Reference in a new issue