wallet-core/packages/demobank-ui/README.md

61 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2022-10-25 01:13:25 +02:00
# Taler Demobank UI
2023-01-23 15:43:50 +01:00
Web-based user interface for the libeufin demobank.
## CLI Commands
2022-10-25 01:13:25 +02:00
- `pnpm install`: Installs dependencies
2022-10-28 15:00:19 +02:00
- `pnpm run build`: Create a production-ready build under `dist/`.
2022-10-25 01:13:25 +02:00
- `pnpm run check`: Run type checker
2022-10-25 01:13:25 +02:00
- `pnpm run lint`: Pass TypeScript files using ESLint
2022-10-28 13:57:08 +02:00
## 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):
2022-10-28 13:57:08 +02:00
```
localStorage.setItem("bank-base-url", OTHER_URL);
```
## Customizing Per-Deployment Settings
To customize per-deployment settings, make sure that the
`demobank-ui-settings.js` 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.talerDemobankSettings = {
2023-10-03 18:28:44 +02:00
// 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,
2023-10-03 18:28:44 +02:00
// 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/"],
],
};
```