do not ask for confirmation during recovery
This commit is contained in:
parent
525fcc48dc
commit
2bf9461f87
@ -19,6 +19,7 @@ export function AttributeEntryScreen(): VNode {
|
|||||||
const [attrs, setAttrs] = useState<Record<string, string>>(
|
const [attrs, setAttrs] = useState<Record<string, string>>(
|
||||||
currentIdentityAttributes,
|
currentIdentityAttributes,
|
||||||
);
|
);
|
||||||
|
const isBackup = state && state.backup_state;
|
||||||
const [askUserIfSure, setAskUserIfSure] = useState(false);
|
const [askUserIfSure, setAskUserIfSure] = useState(false);
|
||||||
|
|
||||||
if (!reducer) {
|
if (!reducer) {
|
||||||
@ -54,11 +55,17 @@ export function AttributeEntryScreen(): VNode {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const doConfirm = async () => {
|
||||||
|
await reducer.transition("enter_user_attributes", {
|
||||||
|
identity_attributes: attrs,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnastasisClientFrame
|
<AnastasisClientFrame
|
||||||
title={withProcessLabel(reducer, "Who are you?")}
|
title={withProcessLabel(reducer, "Who are you?")}
|
||||||
hideNext={hasErrors ? "Complete the form." : undefined}
|
hideNext={hasErrors ? "Complete the form." : undefined}
|
||||||
onNext={async () => setAskUserIfSure(true) }
|
onNext={async () => isBackup ? setAskUserIfSure(true) : doConfirm() }
|
||||||
>
|
>
|
||||||
{askUserIfSure ? (
|
{askUserIfSure ? (
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
@ -67,9 +74,7 @@ export function AttributeEntryScreen(): VNode {
|
|||||||
description="The values in the form must be correct"
|
description="The values in the form must be correct"
|
||||||
label="I am sure"
|
label="I am sure"
|
||||||
cancelLabel="Wait, I want to check"
|
cancelLabel="Wait, I want to check"
|
||||||
onConfirm={() => reducer.transition("enter_user_attributes", {
|
onConfirm={() => doConfirm().then(() => setAskUserIfSure(false) )}
|
||||||
identity_attributes: attrs,
|
|
||||||
}).then(() => setAskUserIfSure(false) )}
|
|
||||||
>
|
>
|
||||||
You personal information is used to define the location where your
|
You personal information is used to define the location where your
|
||||||
secret will be safely stored. If you forget what you have entered or
|
secret will be safely stored. If you forget what you have entered or
|
||||||
|
Loading…
Reference in New Issue
Block a user