Web: Files: Disabled opening of upload panel when creating folders
This commit is contained in:
parent
b952acaca9
commit
2a3019362f
@ -41,7 +41,7 @@ const useOperations = ({
|
||||
itemsSelectionTitle,
|
||||
secondaryProgressDataStoreIcon,
|
||||
itemsSelectionLength,
|
||||
|
||||
disableUploadPanelOpen,
|
||||
setItemsSelectionTitle,
|
||||
}) => {
|
||||
const prevProps = React.useRef({
|
||||
@ -74,6 +74,7 @@ const useOperations = ({
|
||||
}, [isProgressFinished]);
|
||||
|
||||
const showUploadPanel = () => {
|
||||
if (disableUploadPanelOpen) return;
|
||||
setUploadPanelVisible(true);
|
||||
|
||||
if (primaryProgressDataVisible && uploaded && converted)
|
||||
|
@ -161,6 +161,7 @@ const PureHome = (props) => {
|
||||
scrollToTop,
|
||||
isEmptyGroups,
|
||||
wsCreatedPDFForm,
|
||||
disableUploadPanelOpen,
|
||||
} = props;
|
||||
|
||||
//console.log(t("ComingSoon"))
|
||||
@ -222,7 +223,7 @@ const PureHome = (props) => {
|
||||
itemsSelectionTitle,
|
||||
secondaryProgressDataStoreIcon,
|
||||
itemsSelectionLength,
|
||||
|
||||
disableUploadPanelOpen,
|
||||
setItemsSelectionTitle,
|
||||
});
|
||||
|
||||
@ -526,6 +527,7 @@ export default inject(
|
||||
percent: primaryProgressDataPercent,
|
||||
icon: primaryProgressDataIcon,
|
||||
alert: primaryProgressDataAlert,
|
||||
disableUploadPanelOpen,
|
||||
clearPrimaryProgressData,
|
||||
} = primaryProgressDataStore;
|
||||
|
||||
@ -602,6 +604,7 @@ export default inject(
|
||||
primaryProgressDataIcon,
|
||||
primaryProgressDataAlert,
|
||||
clearPrimaryProgressData,
|
||||
disableUploadPanelOpen,
|
||||
|
||||
clearUploadedFilesHistory,
|
||||
|
||||
|
@ -292,13 +292,15 @@ class FilesActionStore {
|
||||
|
||||
const toFolderId = folderId ? folderId : this.selectedFolderStore.id;
|
||||
|
||||
setPrimaryProgressBarData({
|
||||
const pbData = {
|
||||
icon: "upload",
|
||||
visible: true,
|
||||
percent: 0,
|
||||
label: "",
|
||||
alert: false,
|
||||
});
|
||||
};
|
||||
|
||||
setPrimaryProgressBarData({ ...pbData, disableUploadPanelOpen: true });
|
||||
|
||||
const tree = this.convertToTree(files);
|
||||
|
||||
@ -309,6 +311,8 @@ class FilesActionStore {
|
||||
|
||||
if (!filesList.length) {
|
||||
setTimeout(() => clearPrimaryProgressData(), TIMEOUT);
|
||||
} else {
|
||||
setPrimaryProgressBarData({ ...pbData, disableUploadPanelOpen: false });
|
||||
}
|
||||
|
||||
return filesList;
|
||||
|
@ -24,7 +24,7 @@
|
||||
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
|
||||
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
|
||||
import { makeObservable, action, observable } from "mobx";
|
||||
import { makeAutoObservable } from "mobx";
|
||||
|
||||
class PrimaryProgressDataStore {
|
||||
percent = 0;
|
||||
@ -34,21 +34,10 @@ class PrimaryProgressDataStore {
|
||||
alert = false;
|
||||
loadingFile = null;
|
||||
errors = 0;
|
||||
disableUploadPanelOpen = false;
|
||||
|
||||
constructor() {
|
||||
makeObservable(this, {
|
||||
percent: observable,
|
||||
label: observable,
|
||||
visible: observable,
|
||||
icon: observable,
|
||||
alert: observable,
|
||||
loadingFile: observable,
|
||||
errors: observable,
|
||||
|
||||
setPrimaryProgressBarData: action,
|
||||
clearPrimaryProgressData: action,
|
||||
setPrimaryProgressBarErrors: action,
|
||||
});
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
setPrimaryProgressBarData = (primaryProgressData) => {
|
||||
@ -66,6 +55,7 @@ class PrimaryProgressDataStore {
|
||||
icon: "",
|
||||
alert: false,
|
||||
errors: 0,
|
||||
disableUploadPanelOpen: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user