diff options
Diffstat (limited to 'packages/anastasis-webui/src')
-rw-r--r-- | packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts | 2 | ||||
-rw-r--r-- | packages/anastasis-webui/src/pages/home/SecretEditorScreen.tsx | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts index 72424e82a..4a242a2e5 100644 --- a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts +++ b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts @@ -3,7 +3,7 @@ import { BackupStates, getBackupStartState, getRecoveryStartState, RecoveryState import { useState } from "preact/hooks"; const reducerBaseUrl = "http://localhost:5000/"; -const remoteReducer = true; +const remoteReducer = false; interface AnastasisState { reducerState: ReducerState | undefined; diff --git a/packages/anastasis-webui/src/pages/home/SecretEditorScreen.tsx b/packages/anastasis-webui/src/pages/home/SecretEditorScreen.tsx index 2963930fd..086d4921d 100644 --- a/packages/anastasis-webui/src/pages/home/SecretEditorScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/SecretEditorScreen.tsx @@ -1,20 +1,19 @@ /* eslint-disable @typescript-eslint/camelcase */ -import { - encodeCrock, - stringToBytes -} from "@gnu-taler/taler-util"; +import { encodeCrock, stringToBytes } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { BackupReducerProps, AnastasisClientFrame, LabeledInput } from "./index"; +import { + BackupReducerProps, + AnastasisClientFrame, + LabeledInput, +} from "./index"; export function SecretEditorScreen(props: BackupReducerProps): VNode { const { reducer } = props; const [secretName, setSecretName] = useState( - props.backupState.secret_name ?? "" - ); - const [secretValue, setSecretValue] = useState( - props.backupState.core_secret?.value ?? "" ?? "" + props.backupState.secret_name ?? "", ); + const [secretValue, setSecretValue] = useState(""); const secretNext = (): void => { reducer.runTransaction(async (tx) => { await tx.transition("enter_secret_name", { @@ -41,12 +40,14 @@ export function SecretEditorScreen(props: BackupReducerProps): VNode { <LabeledInput label="Secret Name:" grabFocus - bind={[secretName, setSecretName]} /> + bind={[secretName, setSecretName]} + /> </div> <div> <LabeledInput label="Secret Value:" - bind={[secretValue, setSecretValue]} /> + bind={[secretValue, setSecretValue]} + /> </div> </AnastasisClientFrame> ); |