@@ -2,6 +2,7 @@ import { open as openFileDialog, save as saveFileDialog } from "@tauri-apps/plug
22import { useAtom } from "jotai" ;
33import {
44 AppWindow ,
5+ Axe ,
56 BadgeInfo ,
67 Database ,
78 Dock ,
@@ -24,6 +25,7 @@ import {
2425 SquareDashedKanbanIcon ,
2526 SquareDashedMousePointer ,
2627 TestTube2 ,
28+ Undo ,
2729 View ,
2830} from "lucide-react" ;
2931import React , { useEffect } from "react" ;
@@ -48,6 +50,7 @@ import { GraphMethods } from "../core/stage/stageManager/basicMethods/GraphMetho
4850import { TextNode } from "../core/stage/stageObject/entity/TextNode" ;
4951import { PathString } from "../utils/pathString" ;
5052import { HelpService } from "../core/service/helpService/helpService" ;
53+ import { StageHistoryManager } from "../core/stage/stageManager/StageHistoryManager" ;
5154
5255export default function AppMenu ( { className = "" , open = false } : { className ?: string ; open : boolean } ) {
5356 const navigate = useNavigate ( ) ;
@@ -458,6 +461,28 @@ export default function AppMenu({ className = "", open = false }: { className?:
458461 { t ( "view.items.resetScale" ) }
459462 </ Col >
460463 </ Row >
464+ < Row icon = { < Axe /> } title = { "操作" } >
465+ < Col
466+ icon = { < Undo /> }
467+ onClick = { ( ) => {
468+ StageHistoryManager . undo ( ) ;
469+ } }
470+ >
471+ 撤销
472+ </ Col >
473+ { /* <Col
474+ icon={<Undo />}
475+ onClick={() => {
476+ const userInput = window.prompt("请输入搜索内容:");
477+ if (!userInput) {
478+ return;
479+ }
480+ Stage.contentSearchEngine.startSearch(userInput);
481+ }}
482+ >
483+ 查找
484+ </Col> */ }
485+ </ Row >
461486 < Row icon = { < MoreHorizontal /> } title = { t ( "more.title" ) } >
462487 < Col icon = { < SettingsIcon /> } onClick = { ( ) => navigate ( "/settings/visual" ) } >
463488 { t ( "more.items.settings" ) }
0 commit comments