mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 10:22:46 +00:00
[dir view] details panel: cleaned up the code about 'fileTagList'
This commit is contained in:
@@ -9,7 +9,7 @@ import { Utils } from '../../utils/utils';
|
|||||||
import toaster from '../toast';
|
import toaster from '../toast';
|
||||||
import Dirent from '../../models/dirent';
|
import Dirent from '../../models/dirent';
|
||||||
import DetailListView from './detail-list-view';
|
import DetailListView from './detail-list-view';
|
||||||
import FileTag from '../../models/file-tag';
|
|
||||||
import '../../css/dirent-detail.css';
|
import '../../css/dirent-detail.css';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -29,7 +29,6 @@ class DirentDetail extends React.Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
direntType: '',
|
direntType: '',
|
||||||
direntDetail: '',
|
direntDetail: '',
|
||||||
fileTagList: [],
|
|
||||||
folderDirent: null,
|
folderDirent: null,
|
||||||
activeTab: 'info',
|
activeTab: 'info',
|
||||||
fileParticipantList: [],
|
fileParticipantList: [],
|
||||||
@@ -94,17 +93,6 @@ class DirentDetail extends React.Component {
|
|||||||
let errMessage = Utils.getErrorMsg(error);
|
let errMessage = Utils.getErrorMsg(error);
|
||||||
toaster.danger(errMessage);
|
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);
|
this.listParticipants(repoID, direntPath);
|
||||||
} else {
|
} else {
|
||||||
seafileAPI.getDirInfo(repoID, direntPath).then(res => {
|
seafileAPI.getDirInfo(repoID, direntPath).then(res => {
|
||||||
|
Reference in New Issue
Block a user