diff --git a/frontend/src/components/dirent-detail/old-file-details.js b/frontend/src/components/dirent-detail/old-file-details.js
deleted file mode 100644
index 97ff6d0210..0000000000
--- a/frontend/src/components/dirent-detail/old-file-details.js
+++ /dev/null
@@ -1,93 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import dayjs from 'dayjs';
-import relativeTime from 'dayjs/plugin/relativeTime';
-import { siteRoot, gettext, enableVideoThumbnail } from '../../utils/constants';
-import { seafileAPI } from '../../utils/seafile-api';
-import { Utils } from '../../utils/utils';
-import toaster from '../toast';
-import Header from './detail/header';
-
-import '../../css/dirent-detail.css';
-
-dayjs.extend(relativeTime);
-
-const propTypes = {
- repoID: PropTypes.string.isRequired,
- repoName: PropTypes.string.isRequired,
- dirent: PropTypes.object.isRequired,
- path: PropTypes.string.isRequired,
- togglePanel: PropTypes.func.isRequired
-};
-
-class FileDetails extends React.Component {
-
- constructor(props) {
- super(props);
- this.state = {
- direntDetail: '',
- };
- }
-
- componentDidMount() {
- let { dirent, path, repoID } = this.props;
- let direntPath = Utils.joinPath(path, dirent.name);
- seafileAPI.getFileInfo(repoID, direntPath).then(res => {
- this.setState({
- direntDetail: res.data
- });
- }).catch(error => {
- let errMessage = Utils.getErrorMsg(error);
- toaster.danger(errMessage);
- });
- }
-
- renderDetailBody = (bigIconUrl) => {
- const { direntDetail } = this.state;
- const { repoName, path } = this.props;
- return (
-
-
- {this.state.direntDetail &&
-
-
-
-
- |
- |
-
-
-
- {gettext('Size')} | {Utils.bytesToSize(direntDetail.size)} |
- {gettext('Location')} | {repoName + path} |
- {gettext('Last Update')} | {dayjs(direntDetail.last_modified).fromNow()} |
-
-
-
- }
-
- );
- };
-
- render() {
- let { dirent, repoID, path } = this.props;
-
- const smallIconUrl = Utils.getFileIconUrl(dirent.name);
- let bigIconUrl = Utils.getFileIconUrl(dirent.name);
- const isImg = Utils.imageCheck(dirent.name);
- const isVideo = Utils.videoCheck(dirent.name);
- if (isImg || (enableVideoThumbnail && isVideo)) {
- bigIconUrl = `${siteRoot}thumbnail/${repoID}/1024` + Utils.encodePath(`${path === '/' ? '' : path}/${dirent.name}`);
- }
- return (
-
-
- {this.renderDetailBody(bigIconUrl)}
-
- );
- }
-}
-
-FileDetails.propTypes = propTypes;
-
-export default FileDetails;
diff --git a/frontend/src/components/file-view/file-view.js b/frontend/src/components/file-view/file-view.js
index 74bb18082d..ab171d0837 100644
--- a/frontend/src/components/file-view/file-view.js
+++ b/frontend/src/components/file-view/file-view.js
@@ -9,7 +9,6 @@ import IconButton from '../icon-button';
import FileInfo from './file-info';
import FileToolbar from './file-toolbar';
import OnlyofficeFileToolbar from './onlyoffice-file-toolbar';
-import FileDetails from '../dirent-detail/old-file-details';
import EmbeddedFileDetails from '../dirent-detail/embedded-file-details';
import { CollaboratorsProvider, EnableMetadataProvider } from '../../metadata';
@@ -22,12 +21,12 @@ const propTypes = {
needSave: PropTypes.bool,
isOnlyofficeFile: PropTypes.bool,
participants: PropTypes.array,
- onParticipantsChange: PropTypes.func,
+ onParticipantsChange: PropTypes.func
};
const { isStarred, isLocked, lockedByMe,
repoID, filePath, filePerm, enableWatermark, userNickName,
- repoName, parentDir, fileName
+ fileName
} = window.app.pageOptions;
class FileView extends React.Component {
@@ -146,29 +145,17 @@ class FileView extends React.Component {
}
{this.props.content}
{isDetailsPanelOpen && (
- <>
- {isOnlyofficeFile ?
-
-
-
-
-
- :
-
+
+
- }
- >
+
+
)}
diff --git a/seahub/templates/view_file_thirdparty_editor.html b/seahub/templates/view_file_thirdparty_editor.html
index c895f6b696..f8d03673f8 100644
--- a/seahub/templates/view_file_thirdparty_editor.html
+++ b/seahub/templates/view_file_thirdparty_editor.html
@@ -2,7 +2,7 @@
-iframe lian test
+{{ filename }}