missing changes
This commit is contained in:
parent
46835d5155
commit
c2a982e575
@ -29,7 +29,6 @@ export function FileButton(props: Props): VNode {
|
|||||||
const f: FileList | null = e.currentTarget.files;
|
const f: FileList | null = e.currentTarget.files;
|
||||||
if (!f || f.length != 1) return props.onChange(undefined);
|
if (!f || f.length != 1) return props.onChange(undefined);
|
||||||
|
|
||||||
console.log(f);
|
|
||||||
if (f[0].size > MAX_IMAGE_UPLOAD_SIZE) {
|
if (f[0].size > MAX_IMAGE_UPLOAD_SIZE) {
|
||||||
setSizeError(true);
|
setSizeError(true);
|
||||||
return props.onChange(undefined);
|
return props.onChange(undefined);
|
||||||
|
@ -72,7 +72,6 @@ export function FileInput(props: FileInputProps): VNode {
|
|||||||
const f: FileList | null = e.currentTarget.files;
|
const f: FileList | null = e.currentTarget.files;
|
||||||
if (!f || f.length != 1) return props.onChange(undefined);
|
if (!f || f.length != 1) return props.onChange(undefined);
|
||||||
|
|
||||||
console.log(f);
|
|
||||||
if (f[0].size > MAX_IMAGE_UPLOAD_SIZE) {
|
if (f[0].size > MAX_IMAGE_UPLOAD_SIZE) {
|
||||||
setSizeError(true);
|
setSizeError(true);
|
||||||
return props.onChange(undefined);
|
return props.onChange(undefined);
|
||||||
|
@ -15,9 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Amounts, HttpStatusCode, Logger } from "@gnu-taler/taler-util";
|
import { Amounts, HttpStatusCode, Logger } from "@gnu-taler/taler-util";
|
||||||
import { hooks } from "@gnu-taler/web-util/lib/index.browser";
|
|
||||||
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
import { ComponentChildren, Fragment, h, VNode } from "preact";
|
||||||
import { StateUpdater, useEffect } from "preact/hooks";
|
import { useEffect } from "preact/hooks";
|
||||||
import useSWR, { SWRConfig, useSWRConfig } from "swr";
|
import useSWR, { SWRConfig, useSWRConfig } from "swr";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
import { PageStateType, usePageContext } from "../../context/pageState.js";
|
import { PageStateType, usePageContext } from "../../context/pageState.js";
|
||||||
@ -28,8 +27,8 @@ import { getIbanFromPayto, prepareHeaders } from "../../utils.js";
|
|||||||
import { BankFrame } from "./BankFrame.js";
|
import { BankFrame } from "./BankFrame.js";
|
||||||
import { LoginForm } from "./LoginForm.js";
|
import { LoginForm } from "./LoginForm.js";
|
||||||
import { PaymentOptions } from "./PaymentOptions.js";
|
import { PaymentOptions } from "./PaymentOptions.js";
|
||||||
import { WithdrawalQRCode } from "./TalerWithdrawalQRCode.js";
|
|
||||||
import { Transactions } from "./Transactions.js";
|
import { Transactions } from "./Transactions.js";
|
||||||
|
import { WithdrawalQRCode } from "./WithdrawalQRCode.js";
|
||||||
|
|
||||||
export function AccountPage(): VNode {
|
export function AccountPage(): VNode {
|
||||||
const backend = useBackendContext();
|
const backend = useBackendContext();
|
||||||
@ -118,7 +117,7 @@ function Account({ accountLabel }: { accountLabel: string }): VNode {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if (typeof error !== "undefined") {
|
if (typeof error !== "undefined") {
|
||||||
logger.trace("account error", error, endpoint);
|
logger.error("account error", error, endpoint);
|
||||||
/**
|
/**
|
||||||
* FIXME: to minimize the code, try only one invocation
|
* FIXME: to minimize the code, try only one invocation
|
||||||
* of pageStateSetter, after having decided the error
|
* of pageStateSetter, after having decided the error
|
||||||
|
@ -200,7 +200,7 @@ async function registrationCall(
|
|||||||
headers,
|
headers,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.trace(
|
logger.error(
|
||||||
`Could not POST new registration to the bank (${registerEndpoint.href})`,
|
`Could not POST new registration to the bank (${registerEndpoint.href})`,
|
||||||
error,
|
error,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user