merchant-backoffice

ZZZ: Inactive/Deprecated
Log | Files | Refs | Submodules | README

commit 35f9e16f2c32abfed0406cea0fb18bf198a88114
parent ba249e2f0b02a558c0faf69b1cc0c6be703d608b
Author: ms <ms@taler.net>
Date:   Mon,  9 May 2022 11:08:28 +0200

Wrap placeholders in "__" instead of "%".

That allows to use placeholders also as variable
names (needs @ts-ignore), instead of only as string
literals.

Diffstat:
Mpackages/bank/src/pages/home/index.tsx | 20+++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/packages/bank/src/pages/home/index.tsx b/packages/bank/src/pages/home/index.tsx @@ -762,11 +762,11 @@ function BankFrame(Props: any): VNode { // Prepare demo sites links. let DEMO_SITES = [ - ["Landing", "%DEMO_SITE_LANDING_URL%"], - ["Bank", "%DEMO_SITE_BANK_URL%"], - ["Blog", "%DEMO_SITE_BLOG_URL%"], - ["Donations", "%DEMO_SITE_DONATIONS_URL%"], - ["Survey", "%DEMO_SITE_SURVEY_URL%"], + ["Landing", "__DEMO_SITE_LANDING_URL__"], + ["Bank", "__DEMO_SITE_BANK_URL__"], + ["Blog", "__DEMO_SITE_BLOG_URL__"], + ["Donations", "__DEMO_SITE_DONATIONS_URL__"], + ["Survey", "__DEMO_SITE_SURVEY_URL__"], ]; let demo_sites = []; for (const i in DEMO_SITES) { @@ -1630,23 +1630,25 @@ export function BankHome(): VNode { </SWRWithoutCredentials>); } if (pageState.tryRegister) { - if (typeof %LIBEUFIN_UI_ALLOW_REGISTRATIONS% !== "undefined" && !%LIBEUFIN_UI_ALLOW_REGISTRATIONS%) { + // @ts-ignore + if (__LIBEUFIN_UI_ALLOW_REGISTRATIONS__) { return ( <PageContext.Provider value={[pageState, pageStateSetter]}> <BankFrame> - <p>i18n`Currently, the bank is not accepting new registrations!`</p> - </BankFrame> + <RegistrationForm backendStateSetter={backendStateSetter} /> + </BankFrame> </PageContext.Provider> ); } return ( <PageContext.Provider value={[pageState, pageStateSetter]}> <BankFrame> - <RegistrationForm backendStateSetter={backendStateSetter} /> + <p>i18n`Currently, the bank is not accepting new registrations!`</p> </BankFrame> </PageContext.Provider> ); } + /** * Credentials were correct, now render the bank account page, * with balance, transactions history, and a Taler withdrawal