mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
UI: Improve soft reset dialog, and always confirm soft resets (#809)
This commit is contained in:
@@ -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>}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user