UI: Improve soft reset dialog, and always confirm soft resets (#809)

This commit is contained in:
missymae#2783
2023-09-17 14:30:10 -06:00
committed by GitHub
parent b9d13063ac
commit e1d2e12747
6 changed files with 24 additions and 12 deletions
+17 -3
View File
@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { ConfirmationModal } from "./ConfirmationModal";
import Button from "@mui/material/Button";
import { Tooltip } from "@mui/material";
import { Tooltip, Typography } from "@mui/material";
import RestartAltIcon from "@mui/icons-material/RestartAlt";
interface IProps {
@@ -26,9 +26,22 @@ export function SoftResetButton({
}
}
const confirmationMessage = `Soft Reset will:
- Reset basic stats and money
- Accumulate Favor for companies and factions
- Install Augmentations if you have any purchased
- Reset servers, programs, recent scripts and terminal
- Scripts on your home server will stop, but aren't deleted
- Stop some special mechanics like Bladeburner tasks
- You will not lose overall progress or access to special mechanics
Are you sure?
`;
return (
<>
<Tooltip title="Perform a soft reset. Resets everything as if you had just installed Augmentations without installing them.">
<Tooltip title="Perform a Soft Reset - similar to installing Augmentations, even if you have none.">
<Button startIcon={<RestartAltIcon />} color={color} onClick={handleButtonClick}>
Soft Reset
</Button>
@@ -37,7 +50,8 @@ export function SoftResetButton({
onConfirm={onTriggered}
open={modalOpened}
onClose={() => setModalOpened(false)}
confirmationText={"This will perform the same action as installing Augmentations, are you sure?"}
confirmationText={<Typography style={{ whiteSpace: "pre-wrap" }}>{confirmationMessage}</Typography>}
additionalButton={<Button onClick={() => setModalOpened(false)}>Cancel</Button>}
/>
</>
);