fixing import to anastasis-core
This commit is contained in:
parent
882d6b3710
commit
2f291847b0
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Fragment, h, VNode } from "preact";
|
import { Fragment, h, VNode } from "preact";
|
||||||
import { BackupStates, RecoveryStates } from "../../../../anastasis-core/lib";
|
import { BackupStates, RecoveryStates } from "@gnu-taler/anastasis-core";
|
||||||
import { useAnastasisContext } from "../../context/anastasis";
|
import { useAnastasisContext } from "../../context/anastasis";
|
||||||
import { Translate } from "../../i18n";
|
import { Translate } from "../../i18n";
|
||||||
import { LangSelector } from "./LangSelector";
|
import { LangSelector } from "./LangSelector";
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
RecoveryStates,
|
RecoveryStates,
|
||||||
reduceAction,
|
reduceAction,
|
||||||
ReducerState,
|
ReducerState,
|
||||||
} from "anastasis-core";
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
|
|
||||||
const reducerBaseUrl = "http://localhost:5000/";
|
const reducerBaseUrl = "http://localhost:5000/";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { AddingProviderScreen as TestedComponent } from "./AddingProviderScreen";
|
import { AddingProviderScreen as TestedComponent } from "./AddingProviderScreen";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AuthenticationProviderStatusOk } from "anastasis-core";
|
import { AuthenticationProviderStatusOk } from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useEffect, useRef, useState } from "preact/hooks";
|
import { useEffect, useRef, useState } from "preact/hooks";
|
||||||
import { TextInput } from "../../components/fields/TextInput";
|
import { TextInput } from "../../components/fields/TextInput";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { AttributeEntryScreen as TestedComponent } from "./AttributeEntryScreen";
|
import { AttributeEntryScreen as TestedComponent } from "./AttributeEntryScreen";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { UserAttributeSpec, validators } from "anastasis-core";
|
import { UserAttributeSpec, validators } from "@gnu-taler/anastasis-core";
|
||||||
import { isAfter, parse } from "date-fns";
|
import { isAfter, parse } from "date-fns";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
@ -47,7 +47,7 @@ export function AttributeEntryScreen(): VNode {
|
|||||||
errorMessage={error}
|
errorMessage={error}
|
||||||
onConfirm={() => {
|
onConfirm={() => {
|
||||||
if (!hasErrors) {
|
if (!hasErrors) {
|
||||||
setAskUserIfSure(true)
|
setAskUserIfSure(true);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
value={value}
|
value={value}
|
||||||
@ -65,7 +65,7 @@ export function AttributeEntryScreen(): VNode {
|
|||||||
<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 () => isBackup ? setAskUserIfSure(true) : doConfirm() }
|
onNext={async () => (isBackup ? setAskUserIfSure(true) : doConfirm())}
|
||||||
>
|
>
|
||||||
{askUserIfSure ? (
|
{askUserIfSure ? (
|
||||||
<ConfirmModal
|
<ConfirmModal
|
||||||
@ -74,10 +74,10 @@ 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={() => doConfirm().then(() => setAskUserIfSure(false) )}
|
onConfirm={() => doConfirm().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
|
||||||
if there is a misspell you will be unable to recover your secret.
|
if there is a misspell you will be unable to recover your secret.
|
||||||
</ConfirmModal>
|
</ConfirmModal>
|
||||||
) : null}
|
) : null}
|
||||||
@ -123,7 +123,7 @@ for (let i = 0; i < 100; i++) {
|
|||||||
function AttributeEntryField(props: AttributeEntryFieldProps): VNode {
|
function AttributeEntryField(props: AttributeEntryFieldProps): VNode {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{props.spec.type === "date" &&
|
{props.spec.type === "date" && (
|
||||||
<DateInput
|
<DateInput
|
||||||
grabFocus={props.isFirst}
|
grabFocus={props.isFirst}
|
||||||
label={props.spec.label}
|
label={props.spec.label}
|
||||||
@ -132,8 +132,8 @@ function AttributeEntryField(props: AttributeEntryFieldProps): VNode {
|
|||||||
error={props.errorMessage}
|
error={props.errorMessage}
|
||||||
bind={[props.value, props.setValue]}
|
bind={[props.value, props.setValue]}
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
{props.spec.type === 'number' &&
|
{props.spec.type === "number" && (
|
||||||
<PhoneNumberInput
|
<PhoneNumberInput
|
||||||
grabFocus={props.isFirst}
|
grabFocus={props.isFirst}
|
||||||
label={props.spec.label}
|
label={props.spec.label}
|
||||||
@ -141,7 +141,7 @@ function AttributeEntryField(props: AttributeEntryFieldProps): VNode {
|
|||||||
error={props.errorMessage}
|
error={props.errorMessage}
|
||||||
bind={[props.value, props.setValue]}
|
bind={[props.value, props.setValue]}
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
{props.spec.type === "string" && (
|
{props.spec.type === "string" && (
|
||||||
<TextInput
|
<TextInput
|
||||||
grabFocus={props.isFirst}
|
grabFocus={props.isFirst}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { AuthenticationEditorScreen as TestedComponent } from "./AuthenticationEditorScreen";
|
import { AuthenticationEditorScreen as TestedComponent } from "./AuthenticationEditorScreen";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AuthMethod, ReducerStateBackup } from "anastasis-core";
|
import { AuthMethod, ReducerStateBackup } from "@gnu-taler/anastasis-core";
|
||||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useAnastasisContext } from "../../context/anastasis";
|
import { useAnastasisContext } from "../../context/anastasis";
|
||||||
@ -155,7 +155,10 @@ export function AuthenticationEditorScreen(): VNode {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const errors = configuredAuthMethods.length < 2 ? "There is not enough authentication methods." : undefined;
|
const errors =
|
||||||
|
configuredAuthMethods.length < 2
|
||||||
|
? "There is not enough authentication methods."
|
||||||
|
: undefined;
|
||||||
const handleNext = async () => {
|
const handleNext = async () => {
|
||||||
const st = reducer.currentReducerState as ReducerStateBackup;
|
const st = reducer.currentReducerState as ReducerStateBackup;
|
||||||
if ((st.authentication_methods ?? []).length <= 2) {
|
if ((st.authentication_methods ?? []).length <= 2) {
|
||||||
@ -243,4 +246,3 @@ function AuthMethodNotImplemented(props: AuthMethodSetupProps): VNode {
|
|||||||
</AnastasisClientFrame>
|
</AnastasisClientFrame>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { BackupFinishedScreen as TestedComponent } from "./BackupFinishedScreen";
|
import { BackupFinishedScreen as TestedComponent } from "./BackupFinishedScreen";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AuthenticationProviderStatusOk } from "anastasis-core";
|
import { AuthenticationProviderStatusOk } from "@gnu-taler/anastasis-core";
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useAnastasisContext } from "../../context/anastasis";
|
import { useAnastasisContext } from "../../context/anastasis";
|
||||||
@ -16,7 +16,7 @@ export function BackupFinishedScreen(): VNode {
|
|||||||
return <div>invalid state</div>;
|
return <div>invalid state</div>;
|
||||||
}
|
}
|
||||||
const details = reducer.currentReducerState.success_details;
|
const details = reducer.currentReducerState.success_details;
|
||||||
const providers = reducer.currentReducerState.authentication_providers ?? {}
|
const providers = reducer.currentReducerState.authentication_providers ?? {};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnastasisClientFrame hideNav title="Backup success!">
|
<AnastasisClientFrame hideNav title="Backup success!">
|
||||||
@ -27,17 +27,19 @@ export function BackupFinishedScreen(): VNode {
|
|||||||
<p>The backup is stored by the following providers:</p>
|
<p>The backup is stored by the following providers:</p>
|
||||||
{Object.keys(details).map((url, i) => {
|
{Object.keys(details).map((url, i) => {
|
||||||
const sd = details[url];
|
const sd = details[url];
|
||||||
const p = providers[url] as AuthenticationProviderStatusOk
|
const p = providers[url] as AuthenticationProviderStatusOk;
|
||||||
return (
|
return (
|
||||||
<div key={i} class="box">
|
<div key={i} class="box">
|
||||||
<a href={url} target="_blank" rel="noreferrer">{p.business_name}</a>
|
<a href={url} target="_blank" rel="noreferrer">
|
||||||
|
{p.business_name}
|
||||||
|
</a>
|
||||||
<p>
|
<p>
|
||||||
version {sd.policy_version}
|
version {sd.policy_version}
|
||||||
{sd.policy_expiration.t_ms !== "never"
|
{sd.policy_expiration.t_ms !== "never"
|
||||||
? ` expires at: ${format(
|
? ` expires at: ${format(
|
||||||
new Date(sd.policy_expiration.t_ms),
|
new Date(sd.policy_expiration.t_ms),
|
||||||
"dd-MM-yyyy",
|
"dd-MM-yyyy",
|
||||||
)}`
|
)}`
|
||||||
: " without expiration date"}
|
: " without expiration date"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
ChallengeFeedbackStatus,
|
ChallengeFeedbackStatus,
|
||||||
RecoveryStates,
|
RecoveryStates,
|
||||||
ReducerState,
|
ReducerState,
|
||||||
} from "anastasis-core";
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { ChallengeOverviewScreen as TestedComponent } from "./ChallengeOverviewScreen";
|
import { ChallengeOverviewScreen as TestedComponent } from "./ChallengeOverviewScreen";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedback, ChallengeFeedbackStatus } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedback,
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useAnastasisContext } from "../../context/anastasis";
|
import { useAnastasisContext } from "../../context/anastasis";
|
||||||
import { AnastasisClientFrame } from "./index";
|
import { AnastasisClientFrame } from "./index";
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { ContinentSelectionScreen as TestedComponent } from "./ContinentSelectionScreen";
|
import { ContinentSelectionScreen as TestedComponent } from "./ContinentSelectionScreen";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/camelcase */
|
/* eslint-disable @typescript-eslint/camelcase */
|
||||||
import { BackupStates, RecoveryStates } from "anastasis-core";
|
import { BackupStates, RecoveryStates } from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useAnastasisContext } from "../../context/anastasis";
|
import { useAnastasisContext } from "../../context/anastasis";
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { EditPoliciesScreen as TestedComponent } from "./EditPoliciesScreen";
|
import { EditPoliciesScreen as TestedComponent } from "./EditPoliciesScreen";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/camelcase */
|
/* eslint-disable @typescript-eslint/camelcase */
|
||||||
import { AuthMethod, Policy } from "anastasis-core";
|
import { AuthMethod, Policy } from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { useAnastasisContext } from "../../context/anastasis";
|
import { useAnastasisContext } from "../../context/anastasis";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { PoliciesPayingScreen as TestedComponent } from "./PoliciesPayingScreen";
|
import { PoliciesPayingScreen as TestedComponent } from "./PoliciesPayingScreen";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { encodeCrock, stringToBytes } from "@gnu-taler/taler-util";
|
import { encodeCrock, stringToBytes } from "@gnu-taler/taler-util";
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { RecoveryFinishedScreen as TestedComponent } from "./RecoveryFinishedScreen";
|
import { RecoveryFinishedScreen as TestedComponent } from "./RecoveryFinishedScreen";
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { ReviewPoliciesScreen as TestedComponent } from "./ReviewPoliciesScreen";
|
import { ReviewPoliciesScreen as TestedComponent } from "./ReviewPoliciesScreen";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AuthenticationProviderStatusOk } from "anastasis-core";
|
import { AuthenticationProviderStatusOk } from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../components/AsyncButton";
|
import { AsyncButton } from "../../components/AsyncButton";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { SecretEditorScreen as TestedComponent } from "./SecretEditorScreen";
|
import { SecretEditorScreen as TestedComponent } from "./SecretEditorScreen";
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { SecretSelectionScreen as TestedComponent } from "./SecretSelectionScreen";
|
import { SecretSelectionScreen as TestedComponent } from "./SecretSelectionScreen";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { AuthenticationProviderStatus, AuthenticationProviderStatusOk } from "anastasis-core";
|
import {
|
||||||
|
AuthenticationProviderStatus,
|
||||||
|
AuthenticationProviderStatusOk,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../components/AsyncButton";
|
import { AsyncButton } from "../../components/AsyncButton";
|
||||||
@ -68,15 +71,15 @@ export function SecretSelectionScreen(): VNode {
|
|||||||
return <AddingProviderScreen onCancel={() => setManageProvider(false)} />;
|
return <AddingProviderScreen onCancel={() => setManageProvider(false)} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const provierInfo = provs[recoveryDocument.provider_url] as AuthenticationProviderStatusOk
|
const provierInfo = provs[
|
||||||
|
recoveryDocument.provider_url
|
||||||
|
] as AuthenticationProviderStatusOk;
|
||||||
return (
|
return (
|
||||||
<AnastasisClientFrame title="Recovery: Select secret">
|
<AnastasisClientFrame title="Recovery: Select secret">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="box" style={{ border: "2px solid green" }}>
|
<div class="box" style={{ border: "2px solid green" }}>
|
||||||
<h1 class="subtitle">
|
<h1 class="subtitle">{provierInfo.business_name}</h1>
|
||||||
{provierInfo.business_name}
|
|
||||||
</h1>
|
|
||||||
<div class="block">
|
<div class="block">
|
||||||
{currentVersion === 0 ? (
|
{currentVersion === 0 ? (
|
||||||
<p>Set to recover the latest version</p>
|
<p>Set to recover the latest version</p>
|
||||||
@ -135,11 +138,13 @@ function ChooseAnotherProviderScreen({
|
|||||||
Choose a provider{" "}
|
Choose a provider{" "}
|
||||||
</option>
|
</option>
|
||||||
{Object.keys(providers).map((url) => {
|
{Object.keys(providers).map((url) => {
|
||||||
const p = providers[url]
|
const p = providers[url];
|
||||||
if (!("methods" in p)) return null
|
if (!("methods" in p)) return null;
|
||||||
return <option key={url} value={url}>
|
return (
|
||||||
{p.business_name}
|
<option key={url} value={url}>
|
||||||
</option>
|
{p.business_name}
|
||||||
|
</option>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</select>
|
</select>
|
||||||
<div class="icon is-small is-left">
|
<div class="icon is-small is-left">
|
||||||
@ -169,7 +174,9 @@ function SelectOtherVersionProviderScreen({
|
|||||||
const [otherVersion, setOtherVersion] = useState(
|
const [otherVersion, setOtherVersion] = useState(
|
||||||
version > 0 ? String(version) : "",
|
version > 0 ? String(version) : "",
|
||||||
);
|
);
|
||||||
const otherProviderInfo = providers[otherProvider] as AuthenticationProviderStatusOk
|
const otherProviderInfo = providers[
|
||||||
|
otherProvider
|
||||||
|
] as AuthenticationProviderStatusOk;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnastasisClientFrame hideNav title="Recovery: Select secret">
|
<AnastasisClientFrame hideNav title="Recovery: Select secret">
|
||||||
@ -199,11 +206,13 @@ function SelectOtherVersionProviderScreen({
|
|||||||
Choose a provider{" "}
|
Choose a provider{" "}
|
||||||
</option>
|
</option>
|
||||||
{Object.keys(providers).map((url) => {
|
{Object.keys(providers).map((url) => {
|
||||||
const p = providers[url]
|
const p = providers[url];
|
||||||
if (!("methods" in p)) return null
|
if (!("methods" in p)) return null;
|
||||||
return <option key={url} value={url}>
|
return (
|
||||||
{p.business_name}
|
<option key={url} value={url}>
|
||||||
</option>
|
{p.business_name}
|
||||||
|
</option>
|
||||||
|
);
|
||||||
})}
|
})}
|
||||||
</select>
|
</select>
|
||||||
<div class="icon is-small is-left">
|
<div class="icon is-small is-left">
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
ChallengeFeedbackStatus,
|
ChallengeFeedbackStatus,
|
||||||
RecoveryStates,
|
RecoveryStates,
|
||||||
ReducerState,
|
ReducerState,
|
||||||
} from "anastasis-core";
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { SolveScreen as TestedComponent } from "./SolveScreen";
|
import { SolveScreen as TestedComponent } from "./SolveScreen";
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { AnastasisClientFrame } from ".";
|
|||||||
import {
|
import {
|
||||||
ChallengeFeedback,
|
ChallengeFeedback,
|
||||||
ChallengeFeedbackStatus,
|
ChallengeFeedbackStatus,
|
||||||
} from "../../../../anastasis-core/lib";
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { Notifications } from "../../components/Notifications";
|
import { Notifications } from "../../components/Notifications";
|
||||||
import { useAnastasisContext } from "../../context/anastasis";
|
import { useAnastasisContext } from "../../context/anastasis";
|
||||||
import { authMethods, KnownAuthMethods } from "./authMethod";
|
import { authMethods, KnownAuthMethods } from "./authMethod";
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ReducerState } from "anastasis-core";
|
import { ReducerState } from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../utils";
|
import { createExample, reducerStatesExample } from "../../utils";
|
||||||
import { TruthsPayingScreen as TestedComponent } from "./TruthsPayingScreen";
|
import { TruthsPayingScreen as TestedComponent } from "./TruthsPayingScreen";
|
||||||
|
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChallengeFeedbackStatus, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../../utils";
|
import { createExample, reducerStatesExample } from "../../../utils";
|
||||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedbackStatus, ChallengeInfo } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ChallengeInfo,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../../components/AsyncButton";
|
import { AsyncButton } from "../../../components/AsyncButton";
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChallengeFeedbackStatus, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../../utils";
|
import { createExample, reducerStatesExample } from "../../../utils";
|
||||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedbackStatus, ChallengeInfo } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ChallengeInfo,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../../components/AsyncButton";
|
import { AsyncButton } from "../../../components/AsyncButton";
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChallengeFeedbackStatus, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../../utils";
|
import { createExample, reducerStatesExample } from "../../../utils";
|
||||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedbackStatus, ChallengeInfo } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ChallengeInfo,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../../components/AsyncButton";
|
import { AsyncButton } from "../../../components/AsyncButton";
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChallengeFeedbackStatus, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../../utils";
|
import { createExample, reducerStatesExample } from "../../../utils";
|
||||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedbackStatus, ChallengeInfo } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ChallengeInfo,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../../components/AsyncButton";
|
import { AsyncButton } from "../../../components/AsyncButton";
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChallengeFeedbackStatus, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../../utils";
|
import { createExample, reducerStatesExample } from "../../../utils";
|
||||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedbackStatus, ChallengeInfo } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ChallengeInfo,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../../components/AsyncButton";
|
import { AsyncButton } from "../../../components/AsyncButton";
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChallengeFeedbackStatus, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../../utils";
|
import { createExample, reducerStatesExample } from "../../../utils";
|
||||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedbackStatus, ChallengeInfo } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ChallengeInfo,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../../components/AsyncButton";
|
import { AsyncButton } from "../../../components/AsyncButton";
|
||||||
|
@ -19,7 +19,10 @@
|
|||||||
* @author Sebastian Javier Marchano (sebasjm)
|
* @author Sebastian Javier Marchano (sebasjm)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChallengeFeedbackStatus, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { createExample, reducerStatesExample } from "../../../utils";
|
import { createExample, reducerStatesExample } from "../../../utils";
|
||||||
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
import { authMethods as TestedComponent, KnownAuthMethods } from "./index";
|
||||||
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { ChallengeFeedbackStatus, ChallengeInfo } from "anastasis-core";
|
import {
|
||||||
|
ChallengeFeedbackStatus,
|
||||||
|
ChallengeInfo,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AsyncButton } from "../../../components/AsyncButton";
|
import { AsyncButton } from "../../../components/AsyncButton";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { AuthMethod } from "anastasis-core";
|
import { AuthMethod } from "@gnu-taler/anastasis-core";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import postalIcon from "../../../assets/icons/auth_method/postal.svg";
|
import postalIcon from "../../../assets/icons/auth_method/postal.svg";
|
||||||
import questionIcon from "../../../assets/icons/auth_method/question.svg";
|
import questionIcon from "../../../assets/icons/auth_method/question.svg";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { BackupStates, RecoveryStates } from "anastasis-core";
|
import { BackupStates, RecoveryStates } from "@gnu-taler/anastasis-core";
|
||||||
import {
|
import {
|
||||||
ComponentChildren,
|
ComponentChildren,
|
||||||
Fragment,
|
Fragment,
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
/* eslint-disable @typescript-eslint/camelcase */
|
/* eslint-disable @typescript-eslint/camelcase */
|
||||||
import { BackupStates, RecoveryStates, ReducerState } from "anastasis-core";
|
import {
|
||||||
|
BackupStates,
|
||||||
|
RecoveryStates,
|
||||||
|
ReducerState,
|
||||||
|
} from "@gnu-taler/anastasis-core";
|
||||||
import { FunctionalComponent, h, VNode } from "preact";
|
import { FunctionalComponent, h, VNode } from "preact";
|
||||||
import { AnastasisProvider } from "../context/anastasis";
|
import { AnastasisProvider } from "../context/anastasis";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user