Initial commit

This commit is contained in:
binarybaron 2024-07-06 21:34:33 +02:00
commit bc188870af
162 changed files with 13820 additions and 0 deletions

View file

@ -0,0 +1,44 @@
import {
Button,
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
} from '@material-ui/core';
import IpcInvokeButton from '../IpcInvokeButton';
type SwapCancelAlertProps = {
open: boolean;
onClose: () => void;
};
export default function SwapSuspendAlert({
open,
onClose,
}: SwapCancelAlertProps) {
return (
<Dialog open={open} onClose={onClose}>
<DialogTitle>Force stop running operation?</DialogTitle>
<DialogContent>
<DialogContentText>
Are you sure you want to force stop the running swap?
</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={onClose} color="primary">
No
</Button>
<IpcInvokeButton
ipcChannel="suspend-current-swap"
ipcArgs={[]}
color="primary"
onSuccess={onClose}
requiresRpc
>
Force stop
</IpcInvokeButton>
</DialogActions>
</Dialog>
);
}