1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 01:12:03 +00:00

[dir view] details panel: cleaned up the code about 'fileTagList'

This commit is contained in:
llj
2022-04-13 18:49:29 +08:00
parent fa02b6a3a5
commit 9403fe4535

View File

@@ -9,7 +9,7 @@ import { Utils } from '../../utils/utils';
import toaster from '../toast';
import Dirent from '../../models/dirent';
import DetailListView from './detail-list-view';
import FileTag from '../../models/file-tag';
import '../../css/dirent-detail.css';
const propTypes = {
@@ -29,7 +29,6 @@ class DirentDetail extends React.Component {
this.state = {
direntType: '',
direntDetail: '',
fileTagList: [],
folderDirent: null,
activeTab: 'info',
fileParticipantList: [],
@@ -94,17 +93,6 @@ class DirentDetail extends React.Component {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
});
seafileAPI.listFileTags(repoID, direntPath).then(res => {
let fileTagList = [];
res.data.file_tags.forEach(item => {
let file_tag = new FileTag(item);
fileTagList.push(file_tag);
});
this.setState({fileTagList: fileTagList});
}).catch(error => {
let errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
});
this.listParticipants(repoID, direntPath);
} else {
seafileAPI.getDirInfo(repoID, direntPath).then(res => {