From 346ff0a4e4aaf3d7a5daca6a7fd328358ae448df Mon Sep 17 00:00:00 2001
From: HFO4 <912394456@qq.com>
Date: Sat, 21 Nov 2020 17:33:48 +0800
Subject: [PATCH] Fix: some warnings and typo in react.fragment / css in jsx
---
src/component/Dial/Create.js | 14 +++++++-------
src/component/FileManager/ContextMenu.js | 24 ++++++++++++------------
src/component/FileManager/Explorer.js | 1 -
src/component/FileManager/FileManager.js | 5 +----
src/component/Modals/Loading.js | 7 +------
src/redux/viewUpdate/reducer.ts | 4 ++++
6 files changed, 25 insertions(+), 30 deletions(-)
diff --git a/src/component/Dial/Create.js b/src/component/Dial/Create.js
index a568b29..ba45693 100644
--- a/src/component/Dial/Create.js
+++ b/src/component/Dial/Create.js
@@ -111,7 +111,7 @@ export default function UploadButton(props) {
} />}
onClose={handleClose}
FabProps={{
@@ -122,31 +122,31 @@ export default function UploadButton(props) {
open={open}
>
{statusHelper.isMobile() && }
tooltipOpen
- tooltipTitle="上传文件"
+ tooltiptitle="上传文件"
onClick= {() => uploadClicked()}
title={"上传文件"}/>}
{!statusHelper.isMobile() && }
tooltipOpen
- tooltipTitle="上传目录"
+ tooltiptitle="上传目录"
onClick= {() => openUpload("uploadFolderForm")}
title={"上传目录"}/>}
}
tooltipOpen
- tooltipTitle="新建目录"
+ tooltiptitle="新建目录"
onClick= {() => OpenNewFolderDialog()}
title={"新建目录"}/>
}
tooltipOpen
- tooltipTitle="新建文件"
+ tooltiptitle="新建文件"
onClick= {() => OpenNewFileDialog()}
title={"新建文件"}/>
diff --git a/src/component/FileManager/ContextMenu.js b/src/component/FileManager/ContextMenu.js
index 7ff64df..172e74d 100644
--- a/src/component/FileManager/ContextMenu.js
+++ b/src/component/FileManager/ContextMenu.js
@@ -309,7 +309,7 @@ class ContextMenuCompoment extends Component {
}}
>
{this.props.menuType === "empty" && (
- <>
+
- >
+
)}
{this.props.menuType !== "empty" && (
- <>
+
{!this.props.isMultiple && this.props.withFolder && (
- <>
+
{isHomePage &&
}
- >
+
)}
{!this.props.isMultiple &&
this.props.withFile &&
(!this.props.share ||
this.props.share.preview) &&
isPreviewable(this.props.selected[0].name) && (
- <>
+
- >
+
)}
{!this.props.isMultiple && this.props.withFile && (
- <>
+
{isHomePage &&
}
- >
+
)}
{(this.props.isMultiple || this.props.withFolder) &&
@@ -533,7 +533,7 @@ class ContextMenuCompoment extends Component {
)}
{!this.props.isMultiple && isHomePage && (
- <>
+
}
- >
+
)}
{isHomePage && (
@@ -596,7 +596,7 @@ class ContextMenuCompoment extends Component {
)}
- >
+
)}
diff --git a/src/component/FileManager/Explorer.js b/src/component/FileManager/Explorer.js
index 542d755..5d6a950 100644
--- a/src/component/FileManager/Explorer.js
+++ b/src/component/FileManager/Explorer.js
@@ -452,7 +452,6 @@ class ExplorerCompoment extends Component {
{
-
-}
+const mapStateToProps = ()=>({});
const mapDispatchToProps = dispatch => {
return {
diff --git a/src/component/Modals/Loading.js b/src/component/Modals/Loading.js
index 961ee8a..0a2c027 100644
--- a/src/component/Modals/Loading.js
+++ b/src/component/Modals/Loading.js
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
import { makeStyles } from "@material-ui/core/styles";
import CircularProgress from "@material-ui/core/CircularProgress";
import DialogContent from "@material-ui/core/DialogContent";
@@ -44,8 +43,4 @@ export default function LoadingDialog() {
);
-}
-
-LoadingDialog.propTypes = {
- open: PropTypes.bool.isRequired
-};
+}
\ No newline at end of file
diff --git a/src/redux/viewUpdate/reducer.ts b/src/redux/viewUpdate/reducer.ts
index 3d4b0ce..f4d8c82 100644
--- a/src/redux/viewUpdate/reducer.ts
+++ b/src/redux/viewUpdate/reducer.ts
@@ -33,6 +33,8 @@ export interface ViewUpdateState {
resave: boolean;
compress: boolean;
decompress: boolean;
+ loading: boolean;
+ loadingText: string;
};
snackbar: {
toggle: boolean;
@@ -75,6 +77,8 @@ export const initState: ViewUpdateState = {
resave: false,
compress:false,
decompress:false,
+ loading: false,
+ loadingText: ''
},
snackbar: {
toggle: false,