Add an import save comparison page

This adds a new page reachable from the import save file
options menu. It shows the difference between the current save
and the data that is being imported, for confirmation.

Includes an "automatic" variant, which has different wording for when
Electron decides it has access to a newer version of the game.

While in this screen, the autosave is disabled.

This also adds a new BypassWrapper component around the game's tree.
It allows for content to be displayed without rendering the nested
pages (import, recovery). This prevents player scripts from messing
with the screen.
This commit is contained in:
Martin Fournier
2022-01-20 14:55:28 -05:00
parent 974344545d
commit 26432082e2
6 changed files with 440 additions and 43 deletions
+2
View File
@@ -9,6 +9,7 @@ interface IProps {
onClose: () => void;
onConfirm: () => void;
confirmationText: string | React.ReactNode;
additionalButton?: React.ReactNode;
}
export function ConfirmationModal(props: IProps): React.ReactElement {
@@ -23,6 +24,7 @@ export function ConfirmationModal(props: IProps): React.ReactElement {
>
Confirm
</Button>
{props.additionalButton && <>{props.additionalButton}</>}
</>
</Modal>
);