11import { open as openFileDialog , save as saveFileDialog } from "@tauri-apps/plugin-dialog" ;
2+ import { open as openFilePath } from "@tauri-apps/plugin-shell" ;
23import { useAtom } from "jotai" ;
34import {
45 AppWindow ,
@@ -24,7 +25,6 @@ import {
2425 Scaling ,
2526 Search ,
2627 Settings as SettingsIcon ,
27- SquareDashedKanbanIcon ,
2828 SquareDashedMousePointer ,
2929 TestTube2 ,
3030 Undo ,
@@ -35,6 +35,7 @@ import {
3535 FilePlus2 ,
3636 FileDown ,
3737 Rabbit ,
38+ Group ,
3839} from "lucide-react" ;
3940import React , { useEffect } from "react" ;
4041import { useNavigate } from "react-router-dom" ;
@@ -412,25 +413,17 @@ export default function AppMenu({ className = "", open = false }: { className?:
412413 < Col
413414 icon = { < FolderCog /> }
414415 onClick = { async ( ) => {
415- Dialog . show ( {
416- title : "数据文件夹位置" ,
417- type : "info" ,
418- code : await dataDir ( ) ,
419- content : "软件数据文件夹位置" ,
420- } ) ;
416+ const path = ( await dataDir ( ) ) + PathString . getSep ( ) + "liren.project-graph" ;
417+ openFilePath ( path ) ;
421418 } }
422419 >
423420 { t ( "location.items.openDataFolder" ) }
424421 </ Col >
425422 < Col
426423 icon = { < FolderOpen /> }
427424 onClick = { ( ) => {
428- Dialog . show ( {
429- title : "数据文件夹位置" ,
430- type : "info" ,
431- code : file ,
432- content : "软件数据文件夹位置" ,
433- } ) ;
425+ const folderPath = PathString . dirPath ( file ) ;
426+ openFilePath ( folderPath ) ;
434427 } }
435428 >
436429 { t ( "location.items.openProjectFolder" ) }
@@ -452,7 +445,7 @@ export default function AppMenu({ className = "", open = false }: { className?:
452445 </ Col >
453446 </ Row >
454447 < Row icon = { < View /> } title = { t ( "view.title" ) } >
455- < Col icon = { < SquareDashedKanbanIcon /> } onClick = { ( ) => Camera . reset ( ) } >
448+ < Col icon = { < Group /> } onClick = { ( ) => Camera . reset ( ) } >
456449 { t ( "view.items.resetByAll" ) }
457450 </ Col >
458451 < Col icon = { < SquareDashedMousePointer /> } onClick = { ( ) => Camera . resetBySelected ( ) } >
0 commit comments