From 5a8b45e0d492cb0aeaf49d244683d121f27c1460 Mon Sep 17 00:00:00 2001 From: allence Date: Thu, 12 Jan 2023 18:15:12 +0800 Subject: [PATCH 1/2] update(web): toggle show panels --- web/src/components/Grid/index.tsx | 40 +++- web/src/components/Panel/index.tsx | 5 +- .../pages/app/database/BottomPanel/index.tsx | 26 +++ .../app/database/CollectionDataList/index.tsx | 6 +- .../database/CollectionListPanel/index.tsx | 117 ++++++------ web/src/pages/app/database/index.tsx | 36 ++-- web/src/pages/app/functions/index.tsx | 90 ++------- .../app/functions/mods/BottomPanel/index.tsx | 42 +++++ .../app/functions/mods/DebugPannel/index.tsx | 151 +++++++-------- .../app/functions/mods/EditorPanel/index.tsx | 73 ++++++++ .../functions/mods/FunctionPanel/index.tsx | 2 +- web/src/pages/app/functions/service.ts | 19 +- web/src/pages/app/logs/index.tsx | 2 +- web/src/pages/app/storages/index.tsx | 4 +- .../storages/mods/StorageListPanel/index.tsx | 177 +++++++++--------- web/src/pages/customSetting.ts | 89 +++++++++ 16 files changed, 540 insertions(+), 339 deletions(-) create mode 100644 web/src/pages/app/database/BottomPanel/index.tsx create mode 100644 web/src/pages/app/functions/mods/BottomPanel/index.tsx create mode 100644 web/src/pages/app/functions/mods/EditorPanel/index.tsx create mode 100644 web/src/pages/customSetting.ts diff --git a/web/src/components/Grid/index.tsx b/web/src/components/Grid/index.tsx index c260b6f886..debe1ffcf6 100644 --- a/web/src/components/Grid/index.tsx +++ b/web/src/components/Grid/index.tsx @@ -5,15 +5,43 @@ function Grid() { return
Grid
; } -function Row(props: { className?: string; children: React.ReactNode }) { - const { className } = props; - return
{props.children}
; +function Row(props: { + className?: string; + style?: React.CSSProperties; + children: React.ReactNode; +}) { + const { className, style } = props; + return ( +
+ {props.children} +
+ ); } -function Col(props: { className?: string; children: React.ReactNode }) { - const { className } = props; +function Col(props: { + className?: string; + style?: React.CSSProperties; + children: React.ReactNode; +}) { + const { className, style } = props; return ( -
{props.children}
+
+ {props.children} +
); } diff --git a/web/src/components/Panel/index.tsx b/web/src/components/Panel/index.tsx index 0464fcd120..4cac577758 100644 --- a/web/src/components/Panel/index.tsx +++ b/web/src/components/Panel/index.tsx @@ -10,7 +10,10 @@ const Panel = (props: { }) => { const { className, style = {} } = props; return ( -
+
{props.children}
); diff --git a/web/src/pages/app/database/BottomPanel/index.tsx b/web/src/pages/app/database/BottomPanel/index.tsx new file mode 100644 index 0000000000..ee39f758dd --- /dev/null +++ b/web/src/pages/app/database/BottomPanel/index.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import { Button, HStack } from "@chakra-ui/react"; + +import Panel from "@/components/Panel"; + +import useCustomSettingStore from "@/pages/customSetting"; + +function BottomPanel() { + const store = useCustomSettingStore(); + + return ( + + + + + + ); +} + +export default BottomPanel; diff --git a/web/src/pages/app/database/CollectionDataList/index.tsx b/web/src/pages/app/database/CollectionDataList/index.tsx index b1fea024ec..1ba0acd66e 100644 --- a/web/src/pages/app/database/CollectionDataList/index.tsx +++ b/web/src/pages/app/database/CollectionDataList/index.tsx @@ -2,8 +2,6 @@ import { useTranslation } from "react-i18next"; import { AddIcon } from "@chakra-ui/icons"; import { Button } from "@chakra-ui/react"; -import { Col } from "@/components/Grid"; - import CreateCollectionModal from "../mods/CreateCollectionModal"; import useDBMStore from "../store"; @@ -15,7 +13,7 @@ export default function CollectionDataList() { const { t } = useTranslation(); const store = useDBMStore((state) => state); return ( - + <> {store.currentDB === undefined ? (
@@ -58,6 +56,6 @@ export default function CollectionDataList() { */} - + ); } diff --git a/web/src/pages/app/database/CollectionListPanel/index.tsx b/web/src/pages/app/database/CollectionListPanel/index.tsx index c4d05c2b97..a5f3bf3139 100644 --- a/web/src/pages/app/database/CollectionListPanel/index.tsx +++ b/web/src/pages/app/database/CollectionListPanel/index.tsx @@ -6,7 +6,6 @@ import clsx from "clsx"; // import CopyText from "@/components/CopyText"; import FileTypeIcon, { FileType } from "@/components/FileTypeIcon"; -import { Col } from "@/components/Grid"; import IconWrap from "@/components/IconWrap"; import Panel from "@/components/Panel"; import SectionList from "@/components/SectionList"; @@ -18,7 +17,7 @@ import useDBMStore from "../store"; import MoreButton from "./MoreButton"; -export default function CollectionListPanel(props: { isHidden?: boolean }) { +export default function CollectionListPanel() { const store = useDBMStore((store) => store); const { t } = useTranslation(); const collectionListQuery = useCollectionListQuery({ @@ -34,65 +33,63 @@ export default function CollectionListPanel(props: { isHidden?: boolean }) { const [search, setSearch] = useState(""); return ( - - - - - - - , - ]} - /> -
- - } - /> - setSearch(e.target.value)} - /> - -
+ + + + + + , + ]} + /> +
+ + } + /> + setSearch(e.target.value)} + /> + +
- - {(collectionListQuery?.data?.data || []) - .filter((db: any) => db.name.indexOf(search) >= 0) - .map((db: any) => { - return ( - { - store.setCurrentDB(db); - }} - > -
-
- - {db.name} -
-
- -
+ + {(collectionListQuery?.data?.data || []) + .filter((db: any) => db.name.indexOf(search) >= 0) + .map((db: any) => { + return ( + { + store.setCurrentDB(db); + }} + > +
+
+ + {db.name}
- - ); - })} - - - +
+ +
+
+
+ ); + })} +
+ ); } diff --git a/web/src/pages/app/database/index.tsx b/web/src/pages/app/database/index.tsx index 5de3c8b0e8..7661b6131f 100644 --- a/web/src/pages/app/database/index.tsx +++ b/web/src/pages/app/database/index.tsx @@ -1,39 +1,31 @@ /**************************** * cloud functions database page ***************************/ -import { useState } from "react"; -import { Button } from "@chakra-ui/react"; import Content from "@/components/Content"; -import { Row } from "@/components/Grid"; -import Panel from "@/components/Panel"; +import { Col, Row } from "@/components/Grid"; +import BottomPanel from "./BottomPanel"; import CollectionDataList from "./CollectionDataList"; import CollectionListPanel from "./CollectionListPanel"; +import useCustomSettingStore from "@/pages/customSetting"; + function DatabasePage() { - const [hideList, setHideList] = useState(false); + const collectionPageConfig = useCustomSettingStore((store) => store.layoutInfo.collectionPage); return ( - - + + + + - + + + - - - - - - + + ); diff --git a/web/src/pages/app/functions/index.tsx b/web/src/pages/app/functions/index.tsx index f51af36e87..75b114de7a 100644 --- a/web/src/pages/app/functions/index.tsx +++ b/web/src/pages/app/functions/index.tsx @@ -2,96 +2,44 @@ * cloud functions index page ***************************/ -import { Center, HStack, Input } from "@chakra-ui/react"; -import { t } from "i18next"; - import Content from "@/components/Content"; -import CopyText from "@/components/CopyText"; -import FunctionEditor from "@/components/Editor/FunctionEditor"; import { Col, Row } from "@/components/Grid"; -import Panel from "@/components/Panel"; +import BottomPanel from "./mods/BottomPanel"; import ConsolePanel from "./mods/ConsolePanel"; import DebugPanel from "./mods/DebugPannel"; import DependecyPanel from "./mods/DependecePanel"; -import DeployButton from "./mods/DeployButton"; +import EditorPanel from "./mods/EditorPanel"; import FunctionPanel from "./mods/FunctionPanel"; -import useFunctionStore from "./store"; - -import useFunctionCache from "@/hooks/useFuncitonCache"; +import useCustomSettingStore from "@/pages/customSetting"; function FunctionPage() { - const store = useFunctionStore((store) => store); - const { currentFunction, updateFunctionCode, getFunctionDebugUrl } = store; - - const functionCache = useFunctionCache(); - + const functionPageConfig = useCustomSettingStore((store) => store.layoutInfo.functionPage); return ( - - + + - + + + - - -
- - {currentFunction?.name} - - {currentFunction?.desc ? currentFunction?.desc : ""} - - - - {/* {currentFunction?.id && - functionCache.getCache(currentFunction?.id) !== currentFunction?.source?.code && ( -
- {t("Editting...")} -
- )} */} - - {/* */} -
-
- - - - - - - - -
- {currentFunction?.name ? ( - { - updateFunctionCode(currentFunction, value || ""); - functionCache.setCache(currentFunction!.id, value || ""); - }} - /> - ) : ( -
{t("FunctionPanel.EmptyText")}
- )} -
- - + + + + + + - +
+ + +
); } diff --git a/web/src/pages/app/functions/mods/BottomPanel/index.tsx b/web/src/pages/app/functions/mods/BottomPanel/index.tsx new file mode 100644 index 0000000000..faf066c9f5 --- /dev/null +++ b/web/src/pages/app/functions/mods/BottomPanel/index.tsx @@ -0,0 +1,42 @@ +import React from "react"; +import { Button, HStack } from "@chakra-ui/react"; + +import Panel from "@/components/Panel"; + +import useCustomSettingStore from "@/pages/customSetting"; + +function BottomPanel() { + const store = useCustomSettingStore(); + + return ( + + + + + + + + + + ); +} + +export default BottomPanel; diff --git a/web/src/pages/app/functions/mods/DebugPannel/index.tsx b/web/src/pages/app/functions/mods/DebugPannel/index.tsx index 08e7a018e5..d47dbc37ff 100644 --- a/web/src/pages/app/functions/mods/DebugPannel/index.tsx +++ b/web/src/pages/app/functions/mods/DebugPannel/index.tsx @@ -15,6 +15,7 @@ import axios from "axios"; import { t } from "i18next"; import JsonEditor from "@/components/Editor/JsonEditor"; +import { Row } from "@/components/Grid"; import Panel from "@/components/Panel"; import { Pages } from "@/constants"; @@ -92,82 +93,86 @@ export default function DebugPanel() { return ( <> - - - - - 接口调试 - - {/* 历史请求 */} - - - - -
-
- 请求类型 - { + setRunningMethod(e.target.value); + }} + > + {currentFunction.methods?.map((item: string) => { + return ( + + ); + })} + + +
+
调用参数:
+ { + setParams(values || "{}"); }} - > - {currentFunction.methods?.map((item: string) => { - return ( - - ); - })} - - + height="calc(100vh - 500px)" + value={params} + />
-
调用参数:
- { - setParams(values || "{}"); - }} - height="calc(100vh - 500px)" - value={params} - /> +
+ {/* to be continued... */} +
+
+
+ + + + +
+ {isLoading ? ( +
+
+ +
- - {/* to be continued... */} - - - - - -
- {isLoading ? ( -
-
- -
-
- ) : null} - {runningResData ? ( - - {JSON.stringify(runningResData, null, 2)} - - ) : null} -
-
+ ) : null} + {runningResData ? ( + + {JSON.stringify(runningResData, null, 2)} + + ) : null} +
+
+
); } diff --git a/web/src/pages/app/functions/mods/EditorPanel/index.tsx b/web/src/pages/app/functions/mods/EditorPanel/index.tsx new file mode 100644 index 0000000000..c30de139d1 --- /dev/null +++ b/web/src/pages/app/functions/mods/EditorPanel/index.tsx @@ -0,0 +1,73 @@ +import { Center, HStack, Input } from "@chakra-ui/react"; +import { t } from "i18next"; + +import CopyText from "@/components/CopyText"; +import FunctionEditor from "@/components/Editor/FunctionEditor"; +import Panel from "@/components/Panel"; + +import useFunctionStore from "../../store"; +import DeployButton from "../DeployButton"; + +import useFunctionCache from "@/hooks/useFuncitonCache"; + +function EditorPanel() { + const store = useFunctionStore((store) => store); + const { currentFunction, updateFunctionCode, getFunctionDebugUrl } = store; + + const functionCache = useFunctionCache(); + + return ( + + +
+ + {currentFunction?.name} + + {currentFunction?.desc ? currentFunction?.desc : ""} + + + + {/* {currentFunction?.id && + functionCache.getCache(currentFunction?.id) !== currentFunction?.source?.code && ( +
+ {t("Editting...")} +
+ )} */} + + {/* */} +
+
+ + + + + + + + +
+ {currentFunction?.name ? ( + { + updateFunctionCode(currentFunction, value || ""); + functionCache.setCache(currentFunction!.id, value || ""); + }} + /> + ) : ( +
{t("FunctionPanel.EmptyText")}
+ )} +
+ ); +} + +export default EditorPanel; diff --git a/web/src/pages/app/functions/mods/FunctionPanel/index.tsx b/web/src/pages/app/functions/mods/FunctionPanel/index.tsx index c60eda62eb..dbe4b3d876 100644 --- a/web/src/pages/app/functions/mods/FunctionPanel/index.tsx +++ b/web/src/pages/app/functions/mods/FunctionPanel/index.tsx @@ -72,7 +72,7 @@ export default function FunctionList() { />
- + {(allFunctionList || []) .filter((item: TFunction) => item?.name.includes(keywords)) .map((func: any) => { diff --git a/web/src/pages/app/functions/service.ts b/web/src/pages/app/functions/service.ts index 0a97a87cb3..e1bb69a398 100644 --- a/web/src/pages/app/functions/service.ts +++ b/web/src/pages/app/functions/service.ts @@ -90,16 +90,17 @@ export const useDeleteFunctionMutation = () => { export const useCompileMutation = () => { const globalStore = useGlobalStore(); - return useMutation( - (values: { code: string; name: string }) => { + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: ["compileMutation"], + mutationFn: (values: { code: string; name: string }) => { return FunctionControllerCompile(values); }, - { - onSuccess(data) { - if (data.error) { - globalStore.showError(data.error); - } - }, + onSuccess(data) { + if (data.error) { + globalStore.showError(data.error); + } + queryClient.setQueryData(["compileMutation"], data); }, - ); + }); }; diff --git a/web/src/pages/app/logs/index.tsx b/web/src/pages/app/logs/index.tsx index 15fd295888..470f8432b0 100644 --- a/web/src/pages/app/logs/index.tsx +++ b/web/src/pages/app/logs/index.tsx @@ -163,7 +163,7 @@ export default function LogsPage() {
-                            {item.data}
+                            {(item.data as string).substring(0, 50)}
                           
diff --git a/web/src/pages/app/storages/index.tsx b/web/src/pages/app/storages/index.tsx index 6b90f53f48..58ba7a730d 100644 --- a/web/src/pages/app/storages/index.tsx +++ b/web/src/pages/app/storages/index.tsx @@ -19,7 +19,9 @@ export default function StoragePage() { return ( - + + + {currentStorage === undefined ? (
diff --git a/web/src/pages/app/storages/mods/StorageListPanel/index.tsx b/web/src/pages/app/storages/mods/StorageListPanel/index.tsx index 11c7e7059b..8bd3d9db93 100644 --- a/web/src/pages/app/storages/mods/StorageListPanel/index.tsx +++ b/web/src/pages/app/storages/mods/StorageListPanel/index.tsx @@ -10,7 +10,6 @@ import { } from "@chakra-ui/react"; import FileTypeIcon, { FileType } from "@/components/FileTypeIcon"; -import { Col } from "@/components/Grid"; import IconWrap from "@/components/IconWrap"; import Panel from "@/components/Panel"; import SectionList from "@/components/SectionList"; @@ -40,101 +39,99 @@ export default function StorageListPanel() { }); return ( - - - - - - - , - ]} - /> -
- - } - /> - setSearch(e.target.value)} - /> - - - {(bucketListQuery?.data?.data?.items || []) - .filter((storage: any) => storage?.metadata?.name.indexOf(search) >= 0) - .map((storage: TBucket) => { - return ( - { - store.setCurrentStorage(storage); - store.setPrefix("/"); - }} - > -
-
-
- - {storage.metadata?.name} -
- - - {storage?.spec?.policy} - + + + + + + , + ]} + /> +
+ + } + /> + setSearch(e.target.value)} + /> + + + {(bucketListQuery?.data?.data?.items || []) + .filter((storage: any) => storage?.metadata?.name.indexOf(search) >= 0) + .map((storage: TBucket) => { + return ( + { + store.setCurrentStorage(storage); + store.setPrefix("/"); + }} + > +
+
+
+ + {storage.metadata?.name}
+ + + {storage?.spec?.policy} +
-
- - - - - - { - if (storage.metadata.name === store.currentStorage?.metadata.name) { - store.setCurrentStorage(bucketListQuery?.data?.data?.items[0]); - } - }} - /> -
- - ); - })} - -
+
+
+ + + + + + { + if (storage.metadata.name === store.currentStorage?.metadata.name) { + store.setCurrentStorage(bucketListQuery?.data?.data?.items[0]); + } + }} + /> +
+ + ); + })} + +
+
+ + 20% + +
+
- - 20% - + 总容量 +

{globalStore.currentApp?.oss.spec.capacity.storage}

-
-
- 总容量 -

{globalStore.currentApp?.oss.spec.capacity.storage}

-
-
- 已使用 -

1Gi

-
+
+ 已使用 +

1Gi

- - +
+ ); } diff --git a/web/src/pages/customSetting.ts b/web/src/pages/customSetting.ts new file mode 100644 index 0000000000..41daf4f67b --- /dev/null +++ b/web/src/pages/customSetting.ts @@ -0,0 +1,89 @@ +import React from "react"; +import create from "zustand"; +import { devtools } from "zustand/middleware"; +import { immer } from "zustand/middleware/immer"; + +type TLayoutConfig = { + style: React.CSSProperties; +}; + +type functionPanel = "SiderBar" | "RightPanel" | "DependencePanel" | "ConsolePanel" | "Bottom"; +type collectionPanel = "SiderBar" | "Bottom"; +type page = "functionPage" | "collectionPage"; + +type State = { + layoutInfo: { + functionPage: { + // eslint-disable-next-line no-unused-vars + [K in functionPanel]: TLayoutConfig; + }; + collectionPage: { + // eslint-disable-next-line no-unused-vars + [K in collectionPanel]: TLayoutConfig; + }; + }; + + togglePanel: (pageId: page, panelId: functionPanel) => void; +}; + +const useCustomSettingStore = create()( + devtools( + immer((set, get) => ({ + layoutInfo: { + functionPage: { + SiderBar: { + style: { + width: 300, + }, + }, + + RightPanel: { + style: { + width: 500, + }, + }, + + DependencePanel: { + style: { + width: 300, + }, + }, + + ConsolePanel: { + style: { + height: 200, + }, + }, + Bottom: { + style: { + height: 40, + }, + }, + }, + + collectionPage: { + SiderBar: { + style: { + width: 300, + }, + }, + Bottom: { + style: { + height: 40, + }, + }, + }, + }, + + togglePanel: (pageId, panelId) => { + set((state: any) => { + const display = state.layoutInfo[pageId]; + state.layoutInfo[pageId][panelId].style.display = + display[panelId].style.display === "none" ? "block" : "none"; + }); + }, + })), + ), +); + +export default useCustomSettingStore; From b6730ffd95702dff5dc55caef9cdc0d81c11a6fb Mon Sep 17 00:00:00 2001 From: allence Date: Thu, 12 Jan 2023 20:00:24 +0800 Subject: [PATCH 2/2] update: add func --- web/src/components/Editor/JsonEditor.tsx | 3 +-- web/src/pages/app/functions/mods/DebugPannel/index.tsx | 8 ++++---- web/src/pages/app/functions/mods/EditorPanel/index.tsx | 6 +++--- .../pages/app/functions/mods/FunctionPanel/index.tsx | 4 ++-- web/src/pages/app/functions/store.ts | 10 ---------- web/src/pages/customSetting.ts | 2 +- 6 files changed, 11 insertions(+), 22 deletions(-) diff --git a/web/src/components/Editor/JsonEditor.tsx b/web/src/components/Editor/JsonEditor.tsx index aa6fc7c209..867c46d09b 100644 --- a/web/src/components/Editor/JsonEditor.tsx +++ b/web/src/components/Editor/JsonEditor.tsx @@ -37,8 +37,7 @@ function JsonEditor(props: { onChange(editorRef.current?.getValue()); }); } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [onChange]); useEffect(() => { if (monacoEl && editorRef.current && value !== editorRef.current?.getValue()) { diff --git a/web/src/pages/app/functions/mods/DebugPannel/index.tsx b/web/src/pages/app/functions/mods/DebugPannel/index.tsx index d47dbc37ff..3d6feb0fe0 100644 --- a/web/src/pages/app/functions/mods/DebugPannel/index.tsx +++ b/web/src/pages/app/functions/mods/DebugPannel/index.tsx @@ -27,7 +27,7 @@ import useHotKey, { DEFAULT_SHORTCUTS } from "@/hooks/useHotKey"; import useGlobalStore from "@/pages/globalStore"; export default function DebugPanel() { - const { getFunctionDebugUrl, currentFunction, setCurrentRequestId } = useFunctionStore( + const { getFunctionUrl, currentFunction, setCurrentRequestId } = useFunctionStore( (state) => state, ); @@ -71,7 +71,7 @@ export default function DebugPanel() { const func_data = JSON.stringify(compileRes.data); const body_params = JSON.parse(params); const res = await axios({ - url: getFunctionDebugUrl(), + url: getFunctionUrl(), method: runningMethod, data: body_params, headers: { @@ -112,7 +112,7 @@ export default function DebugPanel() { width="150px" size="sm" value={runningMethod} - disabled={getFunctionDebugUrl() === ""} + disabled={getFunctionUrl() === ""} onChange={(e) => { setRunningMethod(e.target.value); }} @@ -126,7 +126,7 @@ export default function DebugPanel() { })}
- + diff --git a/web/src/pages/app/functions/mods/FunctionPanel/index.tsx b/web/src/pages/app/functions/mods/FunctionPanel/index.tsx index dbe4b3d876..57c826e3da 100644 --- a/web/src/pages/app/functions/mods/FunctionPanel/index.tsx +++ b/web/src/pages/app/functions/mods/FunctionPanel/index.tsx @@ -31,7 +31,7 @@ export default function FunctionList() { const { currentApp } = useGlobalStore(); - const { id: functionId } = useParams(); + const { id: functionName } = useParams(); const navigate = useNavigate(); useFunctionListQuery({ @@ -39,7 +39,7 @@ export default function FunctionList() { setAllFunctionList(data.data); if (!currentFunction?.id && data.data.length > 0) { const currentFunction = - data.data.find((item: TFunction) => item.id === functionId) || data.data[0]; + data.data.find((item: TFunction) => item.name === functionName) || data.data[0]; setCurrentFunction(currentFunction); navigate(`/app/${currentApp?.appid}/${Pages.function}/${currentFunction?.name}`, { replace: true, diff --git a/web/src/pages/app/functions/store.ts b/web/src/pages/app/functions/store.ts index 399b9777e6..3c45122cce 100644 --- a/web/src/pages/app/functions/store.ts +++ b/web/src/pages/app/functions/store.ts @@ -11,7 +11,6 @@ type State = { currentRequestId: string | undefined; functionCodes: { [key: string]: string }; getFunctionUrl: () => string; - getFunctionDebugUrl: () => string; setCurrentRequestId: (requestId: string | undefined) => void; setAllFunctionList: (funcionList: TFunction[]) => void; @@ -36,15 +35,6 @@ const useFunctionStore = create()( : ""; }, - getFunctionDebugUrl: () => { - const currentApp = useGlobalStore.getState().currentApp; - const currentFunction = get().currentFunction; - - return currentFunction?.name - ? `http://${currentApp?.gateway.status.appRoute.domain}/${currentFunction?.name}` - : ""; - }, - setCurrentRequestId: (requestId) => { set((state) => { state.currentRequestId = requestId; diff --git a/web/src/pages/customSetting.ts b/web/src/pages/customSetting.ts index 41daf4f67b..d4cbbd68c0 100644 --- a/web/src/pages/customSetting.ts +++ b/web/src/pages/customSetting.ts @@ -39,7 +39,7 @@ const useCustomSettingStore = create()( RightPanel: { style: { - width: 500, + width: "350px", }, },