mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-05 08:15:16 -04:00
feat(gui): Migrate to Tauri events
- Replace Electron IPC with Tauri invoke() for API calls - Implement TauriSwapProgressEvent for state management - Remove IpcInvokeButton, replace with PromiseInvokeButton - Update models: new tauriModel.ts, refactor rpcModel.ts - Simplify SwapSlice state, remove processRunning flag - Refactor SwapStatePage to use TauriSwapProgressEvent - Update HistoryRow and HistoryRowActions for new data structures - Remove unused Electron-specific components (e.g., RpcStatusAlert) - Update dependencies: React 18, Material-UI v4 to v5 - Implement typeshare for Rust/TypeScript type synchronization - Add BobStateName enum for more precise swap state tracking - Refactor utility functions for Tauri compatibility - Remove JSONStream and other Electron-specific dependencies
This commit is contained in:
parent
d54f5c6c77
commit
cf641bc8bb
77 changed files with 2484 additions and 2167 deletions
|
@ -1,7 +1,7 @@
|
|||
import { Box, makeStyles, Typography } from "@material-ui/core";
|
||||
import PlayArrowIcon from "@material-ui/icons/PlayArrow";
|
||||
import StopIcon from "@material-ui/icons/Stop";
|
||||
import IpcInvokeButton from "renderer/components/IpcInvokeButton";
|
||||
import PromiseInvokeButton from "renderer/components/PromiseInvokeButton";
|
||||
import { useAppSelector } from "store/hooks";
|
||||
import InfoBox from "../../modal/swap/InfoBox";
|
||||
import CliLogsBox from "../../other/RenderedCliLog";
|
||||
|
@ -42,26 +42,26 @@ export default function TorInfoBox() {
|
|||
}
|
||||
additionalContent={
|
||||
<Box className={classes.actionsOuter}>
|
||||
<IpcInvokeButton
|
||||
<PromiseInvokeButton
|
||||
variant="contained"
|
||||
disabled={isTorRunning}
|
||||
ipcChannel="spawn-tor"
|
||||
ipcArgs={[]}
|
||||
endIcon={<PlayArrowIcon />}
|
||||
requiresRpc={false}
|
||||
onClick={() => {
|
||||
throw new Error("Not implemented");
|
||||
}}
|
||||
>
|
||||
Start Tor
|
||||
</IpcInvokeButton>
|
||||
<IpcInvokeButton
|
||||
</PromiseInvokeButton>
|
||||
<PromiseInvokeButton
|
||||
variant="contained"
|
||||
disabled={!isTorRunning}
|
||||
ipcChannel="stop-tor"
|
||||
ipcArgs={[]}
|
||||
endIcon={<StopIcon />}
|
||||
requiresRpc={false}
|
||||
onClick={() => {
|
||||
throw new Error("Not implemented");
|
||||
}}
|
||||
>
|
||||
Stop Tor
|
||||
</IpcInvokeButton>
|
||||
</PromiseInvokeButton>
|
||||
</Box>
|
||||
}
|
||||
icon={null}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue