gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated (e84d2b617 -> 535b99021)


From: gnunet
Subject: [taler-wallet-core] branch master updated (e84d2b617 -> 535b99021)
Date: Wed, 04 Oct 2023 18:41:52 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a change to branch master
in repository wallet-core.

    from e84d2b617 more ui, removed some testing values
     new 26e77181d icon link
     new 535b99021 currency name up to 11 fractions up to 8

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/demobank-ui/README.md               |  9 ++++++++-
 packages/demobank-ui/package.json            |  2 +-
 packages/demobank-ui/src/pages/BankFrame.tsx | 26 +++++++++++++-------------
 packages/demobank-ui/src/settings.ts         |  2 ++
 packages/taler-util/src/amounts.ts           |  5 ++++-
 5 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/packages/demobank-ui/README.md b/packages/demobank-ui/README.md
index 1732b5f38..877799748 100644
--- a/packages/demobank-ui/README.md
+++ b/packages/demobank-ui/README.md
@@ -36,11 +36,18 @@ to the default settings:
 
 ```
 globalThis.talerDemobankSettings = {
-  backendBaseURL: "https://bank.demo.taler.net/demobanks/default/";,
+  // location of libeufin server
+  backendBaseURL: "https://bank.demo.taler.net/";,
   allowRegistrations: true,
   bankName: "Taler Bank",
   // Show explainer text and navbar to other demo sites
   showDemoNav: true,
+  // href value of the icon in the top left
+  iconLinkURL: "https://demo.taler.net/";,
+  // show the button "create random user" in registration form
+  allowRandomAccountCreation: true,
+  // do not create random password for random users
+  simplePasswordForRandomAccounts: true,
   // Names and links for other demo sites to show in the navbar
   demoSites: [
     ["Landing", "https://demo.taler.net/";],
diff --git a/packages/demobank-ui/package.json 
b/packages/demobank-ui/package.json
index b430ebc24..17059afeb 100644
--- a/packages/demobank-ui/package.json
+++ b/packages/demobank-ui/package.json
@@ -1,7 +1,7 @@
 {
   "private": true,
   "name": "@gnu-taler/demobank-ui",
-  "version": "0.9.3-dev.17",
+  "version": "0.9.3-dev.27",
   "license": "AGPL-3.0-OR-LATER",
   "type": "module",
   "scripts": {
diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx 
b/packages/demobank-ui/src/pages/BankFrame.tsx
index fc8dfd599..6ab6ba3e4 100644
--- a/packages/demobank-ui/src/pages/BankFrame.tsx
+++ b/packages/demobank-ui/src/pages/BankFrame.tsx
@@ -14,19 +14,18 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
-import { Amounts, Logger, PaytoUriIBAN, TranslatedString, parsePaytoUri, 
stringifyPaytoUri } from "@gnu-taler/taler-util";
-import { NotificationMessage, notifyError, notifyException, useNotifications, 
useTranslationContext } from "@gnu-taler/web-util/browser";
-import { ComponentChildren, Fragment, h, VNode } from "preact";
-import { StateUpdater, useEffect, useErrorBoundary, useState } from 
"preact/hooks";
+import { Amounts, Logger, TranslatedString, parsePaytoUri } from 
"@gnu-taler/taler-util";
+import { notifyError, notifyException, useNotifications, useTranslationContext 
} from "@gnu-taler/web-util/browser";
+import { ComponentChildren, Fragment, VNode, h } from "preact";
+import { useEffect, useErrorBoundary, useState } from "preact/hooks";
+import logo from "../assets/logo-2021.svg";
+import { Attention } from "../components/Attention.js";
+import { CopyButton } from "../components/CopyButton.js";
 import { LangSelector } from "../components/LangSelector.js";
 import { useBackendContext } from "../context/backend.js";
-import { useBusinessAccountDetails } from "../hooks/circuit.js";
-import { bankUiSettings } from "../settings.js";
-import { useSettings } from "../hooks/settings.js";
-import { CopyButton, CopyIcon } from "../components/CopyButton.js";
-import logo from "../assets/logo-2021.svg";
 import { useAccountDetails } from "../hooks/access.js";
-import { Attention } from "../components/Attention.js";
+import { useSettings } from "../hooks/settings.js";
+import { bankUiSettings } from "../settings.js";
 import { RenderAmount } from "./PaytoWireTransferForm.js";
 
 const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : 
undefined;
@@ -34,11 +33,12 @@ const VERSION = typeof __VERSION__ !== "undefined" ? 
__VERSION__ : undefined;
 
 const versionText = VERSION
   ? GIT_HASH
-    ? `Version ${VERSION} (${GIT_HASH.substring(0, 8)})`
+    ? <a href={`https://git.taler.net/wallet-core.git/tree/?id=${GIT_HASH}`} 
target="_blank" rel="noreferrer noopener">
+      Version {VERSION} ({GIT_HASH.substring(0, 8)})
+    </a>
     : VERSION
   : "";
 
-const logger = new Logger("BankFrame");
 
 export function BankFrame({
   children,
@@ -83,7 +83,7 @@ export function BankFrame({
           <div class="relative flex h-16 items-center justify-between ">
             <div class="flex items-center px-2 lg:px-0">
               <div class="flex-shrink-0 bg-white rounded-lg">
-                <a href="http://test.taler.net/"; target="_blank" 
rel="noreferrer noopener">
+                <a href={bankUiSettings.iconLinkURL ?? "#"}>
                   <img
                     class="h-8 w-auto"
                     src={logo}
diff --git a/packages/demobank-ui/src/settings.ts 
b/packages/demobank-ui/src/settings.ts
index c4b510b30..44a016de6 100644
--- a/packages/demobank-ui/src/settings.ts
+++ b/packages/demobank-ui/src/settings.ts
@@ -17,6 +17,7 @@
 export interface BankUiSettings {
   backendBaseURL?: string;
   allowRegistrations?: boolean;
+  iconLinkURL?: string;
   showDemoNav?: boolean;
   simplePasswordForRandomAccounts?: boolean;
   allowRandomAccountCreation?: boolean;
@@ -29,6 +30,7 @@ export interface BankUiSettings {
  */
 const defaultSettings: BankUiSettings = {
   backendBaseURL: "https://bank.demo.taler.net/demobanks/default/";,
+  iconLinkURL: "https://demo.taler.net/";,
   allowRegistrations: true,
   bankName: "Taler Bank",
   showDemoNav: true,
diff --git a/packages/taler-util/src/amounts.ts 
b/packages/taler-util/src/amounts.ts
index a8df3679f..04343b8e9 100644
--- a/packages/taler-util/src/amounts.ts
+++ b/packages/taler-util/src/amounts.ts
@@ -345,9 +345,12 @@ export class Amounts {
 
   /**
    * Parse an amount like 'EUR:20.5' for 20 Euros and 50 ct.
+   * 
+   * Currency name size limit is 11 of ASCII letters
+   * Fraction size limit is 8
    */
   static parse(s: string): AmountJson | undefined {
-    const res = s.match(/^([a-zA-Z0-9_*-]+):([0-9]+)([.][0-9]+)?$/);
+    const res = s.match(/^([a-zA-Z]{1,11}):([0-9]+)([.][0-9]{1,8})?$/);
     if (!res) {
       return undefined;
     }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]