gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: settings doc


From: gnunet
Subject: [taler-wallet-core] branch master updated: settings doc
Date: Sat, 25 Nov 2023 14:10:00 +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 34e5271d3 settings doc
34e5271d3 is described below

commit 34e5271d3adcc2d51cfbb40f019c266d0aad61fa
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Sat Nov 25 10:09:54 2023 -0300

    settings doc
---
 packages/demobank-ui/README.md         | 48 +++++-----------------------------
 packages/demobank-ui/src/settings.json |  6 ++---
 packages/demobank-ui/src/settings.ts   | 25 ++++++++++--------
 3 files changed, 23 insertions(+), 56 deletions(-)

diff --git a/packages/demobank-ui/README.md b/packages/demobank-ui/README.md
index 109b6196b..e7019620b 100644
--- a/packages/demobank-ui/README.md
+++ b/packages/demobank-ui/README.md
@@ -4,20 +4,13 @@ Web-based user interface for the libeufin demobank.
 
 ## CLI Commands
 
-- `pnpm install`: Installs dependencies
-
-- `pnpm run build`: Create a production-ready build under `dist/`.
-
-- `pnpm run check`: Run type checker
-
-- `pnpm run lint`: Pass TypeScript files using ESLint
+- `./dev.mjs` development setup. Will listen in :8080 and reload every time a 
file is save.
+- `./build.mjs` build for production.
+- `./test.mjs` build and run unit test
 
 ## Testing
 
-By default, the demobank-ui points to 
`https://bank.demo.taler.net/demobanks/default/`
-as the bank access API base URL.
-
-This can be changed for testing by setting the URL via local storage (via your 
browser's devtools):
+By default, the demobank-ui will expect the backend to be in `window.origin` 
but that can be overriden using the `settings.json` file or by session in the 
localStorage.
 
 ```
 localStorage.setItem("bank-base-url", OTHER_URL);
@@ -26,35 +19,6 @@ localStorage.setItem("bank-base-url", OTHER_URL);
 ## Customizing Per-Deployment Settings
 
 To customize per-deployment settings, make sure that the
-`bank-ui-settings.js` file is served alongside the UI.
+`settings.json` file is served alongside the UI.
 
-This file is loaded before the SPA and can do customizations by
-changing `globalThis.`.
-
-For example, the following settings would correspond
-to the default settings:
-
-```
-globalThis.talerBankSettings = {
-  // 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/";],
-    ["Bank", "https://bank.demo.taler.net/";],
-    ["Essay Shop", "https://shop.demo.taler.net/";],
-    ["Donations", "https://donations.demo.taler.net/";],
-    ["Survey", "https://donations.demo.taler.net/";],
-  ],
-};
-```
+For more information about the values check the file `settings.ts` in the src 
folder.
diff --git a/packages/demobank-ui/src/settings.json 
b/packages/demobank-ui/src/settings.json
index 8d5b149b5..9c0f1f001 100644
--- a/packages/demobank-ui/src/settings.json
+++ b/packages/demobank-ui/src/settings.json
@@ -5,8 +5,8 @@
   "allowRandomAccountCreation": true,
   "bankName": "Taler DEVELOPMENT Bank",
   "demoSites": [
-    ["Exchange", "https://Exchnage.taler.test/";],
-    ["Bank", "https://bank-ui.taler.test/";],
-    ["Merchant", "https://merchant.taler.test/";]
+    ["Exchange", "http://Exchnage.taler.test:1180/";],
+    ["Bank", "http://bank-ui.taler.test:1180/";],
+    ["Merchant", "http://merchant.taler.test:1180/";]
   ]
 }
diff --git a/packages/demobank-ui/src/settings.ts 
b/packages/demobank-ui/src/settings.ts
index a9c63857b..3a60c48a5 100644
--- a/packages/demobank-ui/src/settings.ts
+++ b/packages/demobank-ui/src/settings.ts
@@ -17,31 +17,34 @@
 import { Codec, buildCodecForObject, codecForBoolean, codecForList, 
codecForString, codecOptional } from "@gnu-taler/taler-util";
 
 export interface BankUiSettings {
+  // location of the backend API
   backendBaseURL?: string;
+  // where the user is going to be redirected after clicking the Taler icon
   iconLinkURL?: string;
+  // show demo nav
   showDemoNav?: boolean;
-  simplePasswordForRandomAccounts?: boolean;
+  // links of the demo nav. Array of tuples that contains [name,url]
+  demoSites?: Array<Array<string>>;
+  // show a button "create random account"
   allowRandomAccountCreation?: boolean;
+  // every random account will have password "123"
+  simplePasswordForRandomAccounts?: boolean;
+  // bank name in the top
   bankName?: string;
-  demoSites?: Array<Array<string>>;
 }
 
 /**
  * Global settings for the bank UI.
  */
 const defaultSettings: BankUiSettings = {
-  backendBaseURL: "https://bank.demo.taler.net/demobanks/default/";,
-  iconLinkURL: "https://demo.taler.net/";,
-  bankName: "Taler Bank",
-  showDemoNav: true,
+  backendBaseURL: undefined,
+  iconLinkURL: undefined,
+  bankName: "Taler TESTING Bank",
+  showDemoNav: false,
   simplePasswordForRandomAccounts: true,
   allowRandomAccountCreation: true,
   demoSites: [
-    ["Landing", "https://demo.taler.net/";],
-    ["Bank", "https://bank.demo.taler.net/";],
-    ["Essay Shop", "https://shop.demo.taler.net/";],
-    ["Donations", "https://donations.demo.taler.net/";],
-    ["Survey", "https://survey.demo.taler.net/";],
+    ["Demo", "https://demo.taler.net/";],
   ],
 };
 

-- 
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]