mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
add loading for share-dialog
This commit is contained in:
@@ -6,8 +6,9 @@ import ShareToUser from './share-to-user';
|
|||||||
import ShareToGroup from './share-to-group';
|
import ShareToGroup from './share-to-group';
|
||||||
import GenerateShareLink from './generate-share-link';
|
import GenerateShareLink from './generate-share-link';
|
||||||
import GenerateUploadLink from './generate-upload-link';
|
import GenerateUploadLink from './generate-upload-link';
|
||||||
import '../../css/share-link-dialog.css';
|
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
|
import Loading from '../loading';
|
||||||
|
import '../../css/share-link-dialog.css';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
isGroupOwnedRepo: PropTypes.bool,
|
isGroupOwnedRepo: PropTypes.bool,
|
||||||
@@ -63,8 +64,12 @@ class ShareDialog extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderDirContent = () => {
|
renderDirContent = () => {
|
||||||
let activeTab = this.state.activeTab;
|
|
||||||
|
|
||||||
|
if (!this.state.isRepoJudgemented) {
|
||||||
|
return <Loading />;
|
||||||
|
}
|
||||||
|
|
||||||
|
let activeTab = this.state.activeTab;
|
||||||
const {repoEncrypted, userPerm, enableDirPrivateShare} = this.props;
|
const {repoEncrypted, userPerm, enableDirPrivateShare} = this.props;
|
||||||
const enableShareLink = !repoEncrypted && canGenerateShareLink;
|
const enableShareLink = !repoEncrypted && canGenerateShareLink;
|
||||||
const enableUploadLink = !repoEncrypted && canGenerateUploadLink && userPerm == 'rw';
|
const enableUploadLink = !repoEncrypted && canGenerateUploadLink && userPerm == 'rw';
|
||||||
@@ -168,10 +173,6 @@ class ShareDialog extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
if (!this.state.isRepoJudgemented) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
const { itemType, itemName, repoEncrypted } = this.props;
|
const { itemType, itemName, repoEncrypted } = this.props;
|
||||||
const enableShareLink = !repoEncrypted && canGenerateShareLink;
|
const enableShareLink = !repoEncrypted && canGenerateShareLink;
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user