[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: fix #8170
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: fix #8170 |
Date: |
Tue, 12 Mar 2024 13:01:37 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 113f6614c fix #8170
113f6614c is described below
commit 113f6614c08fe487937b81dc30e21ac789572b30
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Mar 12 09:01:26 2024 -0300
fix #8170
---
packages/bank-ui/src/pages/LoginForm.tsx | 7 ++++---
packages/bank-ui/src/pages/RegistrationPage.tsx | 5 +++--
packages/bank-ui/src/pages/admin/AdminHome.tsx | 17 ++++++++++++-----
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/packages/bank-ui/src/pages/LoginForm.tsx
b/packages/bank-ui/src/pages/LoginForm.tsx
index a097417c3..337cfc8b1 100644
--- a/packages/bank-ui/src/pages/LoginForm.tsx
+++ b/packages/bank-ui/src/pages/LoginForm.tsx
@@ -29,6 +29,7 @@ import { useSessionState } from "../hooks/session.js";
import { RouteDefinition } from "../route.js";
import { undefinedIfEmpty } from "../utils.js";
import { doAutoFocus } from "./PaytoWireTransferForm.js";
+import { USERNAME_REGEX } from "./RegistrationPage.js";
/**
* Collect and submit login data.
@@ -63,9 +64,9 @@ export function LoginForm({
const errors = undefinedIfEmpty({
username: !username
? i18n.str`Missing username`
- : // : !USERNAME_REGEX.test(username)
- // ? i18n.str`Use letters and numbers only, and start with a
lowercase letter`
- undefined,
+ : !USERNAME_REGEX.test(username)
+ ? i18n.str`Use letters, numbers or any of these characters: - . _ ~`
+ : undefined,
password: !password ? i18n.str`Missing password` : undefined,
});
diff --git a/packages/bank-ui/src/pages/RegistrationPage.tsx
b/packages/bank-ui/src/pages/RegistrationPage.tsx
index 2ade465c2..2ce9d96cc 100644
--- a/packages/bank-ui/src/pages/RegistrationPage.tsx
+++ b/packages/bank-ui/src/pages/RegistrationPage.tsx
@@ -54,7 +54,8 @@ export function RegistrationPage({
);
}
-export const USERNAME_REGEX = /^[a-z][a-zA-Z0-9-]*$/;
+// eslint-disable-next-line no-useless-escape
+export const USERNAME_REGEX = /^[a-zA-Z0-9\-\.\_\~]*$/;
export const PHONE_REGEX = /^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$/;
export const EMAIL_REGEX = /^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/;
@@ -86,7 +87,7 @@ function RegistrationForm({
username: !username
? i18n.str`Missing username`
: !USERNAME_REGEX.test(username)
- ? i18n.str`Use letters and numbers only, and start with a lowercase
letter`
+ ? i18n.str`Use letters, numbers or any of these characters: - . _ ~`
: undefined,
// phone: !phone
// ? undefined
diff --git a/packages/bank-ui/src/pages/admin/AdminHome.tsx
b/packages/bank-ui/src/pages/admin/AdminHome.tsx
index b8b28f8a0..613f5c1ef 100644
--- a/packages/bank-ui/src/pages/admin/AdminHome.tsx
+++ b/packages/bank-ui/src/pages/admin/AdminHome.tsx
@@ -80,7 +80,6 @@ export function AdminHome({
routeHere={routeCreateWireTransfer}
onAuthorizationRequired={onAuthorizationRequired}
/>
-
<Transactions
account="admin"
routeCreateWireTransfer={routeCreateWireTransfer}
@@ -195,7 +194,15 @@ function Metrics({
return <Fragment />;
}
return (
- <Fragment>
+ <div class="px-4 mt-4">
+ <div class="sm:flex sm:items-center mb-4">
+ <div class="sm:flex-auto">
+ <h1 class="text-base font-semibold leading-6 text-gray-900">
+ <i18n.Translate>Transaction volume report</i18n.Translate>
+ </h1>
+ </div>
+ </div>
+
<div class="sm:hidden">
<label for="tabs" class="sr-only">
<i18n.Translate>Select a section</i18n.Translate>
@@ -342,7 +349,7 @@ function Metrics({
</div>
<div class="w-full flex justify-between">
- <h1 class="text-base font-semibold leading-7 text-gray-900 mt-5">
+ <h1 class="text-base text-gray-900 mt-5">
{i18n.str`Trading volume on ${getDateForTimeframe(
params.current,
metricType,
@@ -423,7 +430,7 @@ function Metrics({
/>
</div>
</dl>
- <div class="flex justify-end mt-2">
+ <div class="flex justify-end mt-4">
<a
href={routeDownloadStats.url({})}
name="download stats"
@@ -432,7 +439,7 @@ function Metrics({
<i18n.Translate>Download stats as CSV</i18n.Translate>
</a>
</div>
- </Fragment>
+ </div>
);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: fix #8170,
gnunet <=