mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-29 20:14:19 +00:00
fix draft bug
This commit is contained in:
parent
6e2a031302
commit
c29e958436
@ -2,7 +2,7 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import cookie from 'react-cookies';
|
||||
import moment from 'moment';
|
||||
import { gettext, siteRoot, username, canGenerateShareLink, canGenerateUploadLink } from '../../utils/constants';
|
||||
import { gettext, siteRoot, username, canGenerateShareLink, canGenerateUploadLink, isDocs } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import collabServer from '../../utils/collab-server';
|
||||
@ -236,11 +236,13 @@ class LibContentView extends React.Component {
|
||||
this.updateUsedRepoTags();
|
||||
|
||||
// list draft counts and revierw counts
|
||||
seafileAPI.getRepoDraftCounts(repoID).then(res => {
|
||||
this.setState({
|
||||
draftCounts: res.data.draft_counts,
|
||||
if (isDocs) {
|
||||
seafileAPI.getRepoDraftCounts(repoID).then(res => {
|
||||
this.setState({
|
||||
draftCounts: res.data.draft_counts,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (Utils.isMarkdownFile(path)) {
|
||||
seafileAPI.getFileInfo(this.props.repoID, path).then(() => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import moment from 'moment';
|
||||
import { gettext, repoID, siteRoot, initialPath, isDir, canGenerateShareLink, canGenerateUploadLink, username } from './utils/constants';
|
||||
import { gettext, repoID, siteRoot, initialPath, isDir, canGenerateShareLink, canGenerateUploadLink, username, isDocs } from './utils/constants';
|
||||
import { seafileAPI } from './utils/seafile-api';
|
||||
import { Utils } from './utils/utils';
|
||||
import collabServer from './utils/collab-server';
|
||||
@ -147,11 +147,13 @@ class Wiki extends Component {
|
||||
this.updateUsedRepoTags();
|
||||
|
||||
// list draft counts and revierw counts
|
||||
seafileAPI.getRepoDraftCounts(repoID).then(res => {
|
||||
this.setState({
|
||||
draftCounts: res.data.draft_counts,
|
||||
if (isDocs) {
|
||||
seafileAPI.getRepoDraftCounts(repoID).then(res => {
|
||||
this.setState({
|
||||
draftCounts: res.data.draft_counts,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// load side-panel data
|
||||
this.loadSidePanel(initialPath);
|
||||
|
Loading…
Reference in New Issue
Block a user