Web: Files: Fix Bug 52832 - Docs. Desktop. Creating or opening a document from an application results in opening in a browser

This commit is contained in:
Alexey Safronov 2021-09-30 10:46:11 +03:00
parent 9d76069ec8
commit f6d7517afd
4 changed files with 14 additions and 6 deletions

View File

@ -233,8 +233,17 @@ export default function withContent(WrappedContent) {
onFilesClick,
viewAs,
element,
isDesktop,
} = this.props;
const { id, fileExst, updated, createdBy, access, fileStatus } = item;
const {
id,
fileExst,
updated,
createdBy,
access,
fileStatus,
href,
} = item;
const titleWithoutExt = getTitleWithoutExst(item);
@ -259,6 +268,10 @@ export default function withContent(WrappedContent) {
? { noHover: true }
: { onClick: onFilesClick };
if (!isDesktop && !isTrashFolder) {
linkStyles.href = item.href;
}
const newItems = item.new || fileStatus === 2;
const showNew = !!newItems;

View File

@ -56,7 +56,6 @@ const FilesRowContent = ({
updatedDate,
fileOwner,
linkStyles,
//onFilesClick,
badgesComponent,
isAdmin,
}) => {
@ -87,7 +86,6 @@ const FilesRowContent = ({
fontWeight="600"
fontSize="15px"
target="_blank"
href={item.href}
{...linkStyles}
color="#333"
isTextOverflow={true}

View File

@ -10,7 +10,6 @@ const FileNameCell = ({ item, titleWithoutExt, linkStyles }) => {
title={titleWithoutExt}
fontWeight="600"
fontSize="13px"
href={item.href}
{...linkStyles}
color="#333"
isTextOverflow

View File

@ -77,7 +77,6 @@ const FilesTileContent = ({
item,
titleWithoutExt,
linkStyles,
onFilesClick,
badgesComponent,
}) => {
const { fileExst } = item;
@ -97,7 +96,6 @@ const FilesTileContent = ({
fontWeight="600"
fontSize="14px"
target="_blank"
href={item.href}
{...linkStyles}
color="#333"
isTextOverflow