From 66e6fc28298c5ca53babb6dbb0f8618ed27bd86f Mon Sep 17 00:00:00 2001 From: ayang <473033518@qq.com> Date: Fri, 13 Sep 2024 11:53:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=82=B9=E5=87=BB=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=8D=B3=E5=8F=AF=E6=89=93=E5=BC=80=E8=87=B3?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B5=84=E6=BA=90=E7=AE=A1=E7=90=86=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Backup/components/SavePath/index.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/Backup/components/SavePath/index.tsx b/src/pages/Backup/components/SavePath/index.tsx index f4a578114..6f6df5d23 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"), "")} + } >