fix some building errors
This commit is contained in:
parent
5883d42d80
commit
aac2bc389a
1
packages/anastasis-webui/.gitignore
vendored
1
packages/anastasis-webui/.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
/build
|
/build
|
||||||
/*.log
|
/*.log
|
||||||
|
/size-plugin.json
|
||||||
|
@ -38,9 +38,9 @@ const names: LangsNames = {
|
|||||||
it: 'Italiano [it]',
|
it: 'Italiano [it]',
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLangName(s: keyof LangsNames | string) {
|
function getLangName(s: keyof LangsNames | string): string {
|
||||||
if (names[s]) return names[s]
|
if (names[s]) return names[s]
|
||||||
return s
|
return String(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function LangSelector(): VNode {
|
export function LangSelector(): VNode {
|
||||||
|
@ -88,7 +88,7 @@ export function NotYetReadyAppMenu({ onLogout, title }: NotYetReadyAppMenuProps)
|
|||||||
|
|
||||||
return <div class={mobileOpen ? "has-aside-mobile-expanded" : ""} onClick={() => setMobileOpen(false)}>
|
return <div class={mobileOpen ? "has-aside-mobile-expanded" : ""} onClick={() => setMobileOpen(false)}>
|
||||||
<NavigationBar onMobileMenu={() => setMobileOpen(!mobileOpen)} title={title} />
|
<NavigationBar onMobileMenu={() => setMobileOpen(!mobileOpen)} title={title} />
|
||||||
{onLogout && <Sidebar onLogout={onLogout} mobile={mobileOpen} />}
|
{onLogout && <Sidebar mobile={mobileOpen} />}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
13
packages/anastasis-webui/src/declaration.d.ts
vendored
13
packages/anastasis-webui/src/declaration.d.ts
vendored
@ -2,3 +2,16 @@ declare module "*.css" {
|
|||||||
const mapping: Record<string, string>;
|
const mapping: Record<string, string>;
|
||||||
export default mapping;
|
export default mapping;
|
||||||
}
|
}
|
||||||
|
declare module '*.svg' {
|
||||||
|
const content: any;
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
declare module '*.jpeg' {
|
||||||
|
const content: any;
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
declare module 'jed' {
|
||||||
|
const x: any;
|
||||||
|
export = x;
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,8 @@
|
|||||||
/* eslint-disable @typescript-eslint/camelcase */
|
/* eslint-disable @typescript-eslint/camelcase */
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AnastasisReducerApi, ReducerStateRecovery, ReducerStateBackup } from "../../hooks/use-anastasis-reducer";
|
import { ReducerStateRecovery, ReducerStateBackup } from "../../../../anastasis-core/lib";
|
||||||
|
import { AnastasisReducerApi } from "../../hooks/use-anastasis-reducer";
|
||||||
import { AnastasisClientFrame, withProcessLabel, LabeledInput } from "./index";
|
import { AnastasisClientFrame, withProcessLabel, LabeledInput } from "./index";
|
||||||
|
|
||||||
export function AttributeEntryScreen(props: AttributeEntryProps): VNode {
|
export function AttributeEntryScreen(props: AttributeEntryProps): VNode {
|
||||||
|
@ -5,7 +5,8 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AuthMethodSetupProps, AnastasisClientFrame, LabeledInput } from "./index";
|
import { AuthMethodSetupProps } from "./AuthenticationEditorScreen";
|
||||||
|
import { AnastasisClientFrame, LabeledInput } from "./index";
|
||||||
|
|
||||||
export function AuthMethodEmailSetup(props: AuthMethodSetupProps): VNode {
|
export function AuthMethodEmailSetup(props: AuthMethodSetupProps): VNode {
|
||||||
const [email, setEmail] = useState("");
|
const [email, setEmail] = useState("");
|
||||||
|
@ -5,7 +5,8 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AuthMethodSetupProps, LabeledInput } from "./index";
|
import { AuthMethodSetupProps } from "./AuthenticationEditorScreen";
|
||||||
|
import { LabeledInput } from "./index";
|
||||||
|
|
||||||
export function AuthMethodPostSetup(props: AuthMethodSetupProps): VNode {
|
export function AuthMethodPostSetup(props: AuthMethodSetupProps): VNode {
|
||||||
const [fullName, setFullName] = useState("");
|
const [fullName, setFullName] = useState("");
|
||||||
@ -32,7 +33,7 @@ export function AuthMethodPostSetup(props: AuthMethodSetupProps): VNode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={style.home}>
|
<div > {/* class={style.home} */}
|
||||||
<h1>Add {props.method} authentication</h1>
|
<h1>Add {props.method} authentication</h1>
|
||||||
<div>
|
<div>
|
||||||
<p>
|
<p>
|
||||||
|
@ -5,7 +5,8 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState } from "preact/hooks";
|
import { useState } from "preact/hooks";
|
||||||
import { AuthMethodSetupProps, AnastasisClientFrame, LabeledInput } from "./index";
|
import { AuthMethodSetupProps } from "./AuthenticationEditorScreen";
|
||||||
|
import { AnastasisClientFrame, LabeledInput } from "./index";
|
||||||
|
|
||||||
export function AuthMethodQuestionSetup(props: AuthMethodSetupProps): VNode {
|
export function AuthMethodQuestionSetup(props: AuthMethodSetupProps): VNode {
|
||||||
const [questionText, setQuestionText] = useState("");
|
const [questionText, setQuestionText] = useState("");
|
||||||
|
@ -5,7 +5,8 @@ import {
|
|||||||
} from "@gnu-taler/taler-util";
|
} from "@gnu-taler/taler-util";
|
||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { useState, useRef, useLayoutEffect } from "preact/hooks";
|
import { useState, useRef, useLayoutEffect } from "preact/hooks";
|
||||||
import { AuthMethodSetupProps, AnastasisClientFrame } from "./index";
|
import { AuthMethodSetupProps } from "./AuthenticationEditorScreen";
|
||||||
|
import { AnastasisClientFrame } from "./index";
|
||||||
|
|
||||||
export function AuthMethodSmsSetup(props: AuthMethodSetupProps): VNode {
|
export function AuthMethodSmsSetup(props: AuthMethodSetupProps): VNode {
|
||||||
const [mobileNumber, setMobileNumber] = useState("");
|
const [mobileNumber, setMobileNumber] = useState("");
|
||||||
|
@ -94,7 +94,7 @@ export function AuthenticationEditorScreen(props: AuthenticationEditorProps): VN
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AuthMethodSetupProps {
|
export interface AuthMethodSetupProps {
|
||||||
method: string;
|
method: string;
|
||||||
addAuthMethod: (x: any) => void;
|
addAuthMethod: (x: any) => void;
|
||||||
cancel: () => void;
|
cancel: () => void;
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import { h, VNode } from "preact";
|
import { h, VNode } from "preact";
|
||||||
import { AnastasisReducerApi, ChallengeFeedback, ChallengeInfo } from "../../hooks/use-anastasis-reducer";
|
import { AnastasisReducerApi } from "../../hooks/use-anastasis-reducer";
|
||||||
import { SolveEmailEntry } from "./SolveEmailEntry";
|
import { SolveEmailEntry } from "./SolveEmailEntry";
|
||||||
import { SolvePostEntry } from "./SolvePostEntry";
|
import { SolvePostEntry } from "./SolvePostEntry";
|
||||||
import { SolveQuestionEntry } from "./SolveQuestionEntry";
|
import { SolveQuestionEntry } from "./SolveQuestionEntry";
|
||||||
import { SolveSmsEntry } from "./SolveSmsEntry";
|
import { SolveSmsEntry } from "./SolveSmsEntry";
|
||||||
import { SolveUnsupportedEntry } from "./SolveUnsupportedEntry";
|
import { SolveUnsupportedEntry } from "./SolveUnsupportedEntry";
|
||||||
import { RecoveryReducerProps } from "./index";
|
import { RecoveryReducerProps } from "./index";
|
||||||
|
import { ChallengeInfo, ChallengeFeedback } from "../../../../anastasis-core/lib";
|
||||||
|
|
||||||
export function SolveScreen(props: RecoveryReducerProps): VNode {
|
export function SolveScreen(props: RecoveryReducerProps): VNode {
|
||||||
const chArr = props.recoveryState.recovery_information!.challenges;
|
const chArr = props.recoveryState.recovery_information!.challenges;
|
||||||
|
Loading…
Reference in New Issue
Block a user