diff --git a/src/pages/Backup/components/SavePath/index.tsx b/src/pages/Backup/components/SavePath/index.tsx index f4a5781140..6f6df5d23e 100644 --- a/src/pages/Backup/components/SavePath/index.tsx +++ b/src/pages/Backup/components/SavePath/index.tsx @@ -2,16 +2,14 @@ import ProList from "@/components/ProList"; import ProListItem from "@/components/ProListItem"; import { open } from "@tauri-apps/api/dialog"; import { emit } from "@tauri-apps/api/event"; -import { join } from "@tauri-apps/api/path"; +import { join, sep } from "@tauri-apps/api/path"; import { Button, Flex, message } from "antd"; import { isString } from "antd/es/button"; import type { FC } from "react"; -import { useSnapshot } from "valtio"; import type { State } from "../.."; const SavePath: FC<{ state: State }> = (props) => { const { state } = props; - const { env } = useSnapshot(globalStore); const handleClick = async () => { try { @@ -43,9 +41,16 @@ const SavePath: FC<{ state: State }> = (props) => { + 自定义存储路径 - {env.saveDataDir} + { + previewPath(getSaveDataDir()); + }} + > + {getSaveDataDir().replace(new RegExp(`${sep}$`, "g"), "")} + } >