fix: bug修复
This commit is contained in:
@@ -35,7 +35,7 @@ const QiniuDrawer = observer(() => {
|
||||
const bucketList = () => {
|
||||
return (
|
||||
<ProCard
|
||||
title={"MinIO存储桶列表"}
|
||||
title={"Qiniu存储桶列表"}
|
||||
headerBordered
|
||||
extra={
|
||||
<>
|
||||
|
@@ -56,7 +56,7 @@ import {
|
||||
import StorageIcon from "@/constant/stroage-icon.ts";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import Base64 from "base-64";
|
||||
const File: FunctionComponent = observer(() => {
|
||||
const File: FunctionComponent = () => {
|
||||
const store = useStore("file");
|
||||
const navigate = useNavigate();
|
||||
const [files, setFiles] = useState<any>([]);
|
||||
@@ -1046,5 +1046,5 @@ const File: FunctionComponent = observer(() => {
|
||||
</Modal>
|
||||
</>
|
||||
);
|
||||
});
|
||||
};
|
||||
export default observer(File);
|
||||
|
@@ -219,7 +219,7 @@ const QiniuSettings: React.FC = observer(() => {
|
||||
};
|
||||
|
||||
async function getAllConfigs() {
|
||||
getAllQiniuConfigs(1).then((res: any) => {
|
||||
getAllQiniuConfigs(userId).then((res: any) => {
|
||||
if (res && res.success && res.data) {
|
||||
setConfig(res.data);
|
||||
}
|
||||
|
@@ -12,13 +12,14 @@ export default function AuthRoute(props: { children: React.ReactNode }) {
|
||||
const condition: boolean =
|
||||
(currentPath === "/login" && !isLogin) ||
|
||||
currentPath === "/404" ||
|
||||
(currentPath === "register" && !isLogin) ||
|
||||
(currentPath === "forget" && !isLogin);
|
||||
(currentPath === "/register" && !isLogin) ||
|
||||
(currentPath === "/forget" && !isLogin) ||
|
||||
(currentPath === "/" && !isLogin);
|
||||
// 登录后访问login
|
||||
const conditionWithLogin: boolean =
|
||||
(currentPath === "/login" && isLogin) ||
|
||||
(currentPath === "register" && isLogin) ||
|
||||
(currentPath === "forget" && isLogin);
|
||||
(currentPath === "/register" && isLogin) ||
|
||||
(currentPath === "/forget" && isLogin);
|
||||
const findPath: any = matchAuth(currentPath);
|
||||
|
||||
if (condition) {
|
||||
|
Reference in New Issue
Block a user