commit 66f5f5b3eddee664421e39d38e239bd12efaca45 parent 1589fcabfe68a42f6ec8517cce67eeb8cbc88b38 Author: Florian Dold <dold@taler.net> Date: Mon, 24 Aug 2026 02:30:22 +0200 bank web UI: fix navigation roles and list keys Diffstat:
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/packages/libeufin-bank-webui/src/pages/PaymentOptions.tsx b/packages/libeufin-bank-webui/src/pages/PaymentOptions.tsx @@ -114,7 +114,7 @@ export function PaymentOptions({ <a name="charge wallet" href={routeChargeWallet.url({})}> <label class={ - "relative flex cursor-pointer rounded-lg border bg-white p-4 shadow-sm focus:outline-none" + + "relative flex cursor-pointer rounded-lg border bg-white p-4 shadow-sm focus:outline-none " + (tab === "charge-wallet" ? "border-indigo-600 ring-2 ring-indigo-600" : "border-gray-300") @@ -164,7 +164,7 @@ export function PaymentOptions({ <a name="wire transfer" href={routeWireTransfer.url({})}> <label class={ - "relative flex cursor-pointer rounded-lg border bg-white p-4 shadow-sm focus:outline-none" + + "relative flex cursor-pointer rounded-lg border bg-white p-4 shadow-sm focus:outline-none " + (tab === "wire-transfer" ? "border-indigo-600 ring-2 ring-indigo-600" : "border-gray-300") diff --git a/packages/libeufin-bank-webui/src/pages/ProfileNavigation.tsx b/packages/libeufin-bank-webui/src/pages/ProfileNavigation.tsx @@ -97,12 +97,16 @@ export function ProfileNavigation({ <option value="credentials" selected={current == "credentials"}> <i18n.Translate>Credentials</i18n.Translate> </option> - {config.allow_conversion ? ( + {config.allow_conversion && nonAdminUser ? ( <Fragment> <option value="cashouts" selected={current == "cashouts"}> <i18n.Translate>Cashouts</i18n.Translate> </option> - <option value="conversion" selected={current == "cashouts"}> + </Fragment> + ) : undefined} + {config.allow_conversion && isAdminUser ? ( + <Fragment> + <option value="conversion" selected={current == "conversion"}> <i18n.Translate>Conversion</i18n.Translate> </option> </Fragment> diff --git a/packages/libeufin-bank-webui/src/pages/admin/AccountList.tsx b/packages/libeufin-bank-webui/src/pages/admin/AccountList.tsx @@ -118,7 +118,7 @@ export function AccountList({ </tr> </thead> <tbody class="divide-y divide-gray-200"> - {accounts.map((item, idx) => { + {accounts.map((item) => { const balance = !item.balance ? undefined : Amounts.parse(item.balance.amount); @@ -129,7 +129,7 @@ export function AccountList({ return ( <tr - key={idx} + key={item.username} class="data-[status=deleted]:bg-gray-100" data-status={item.status} > @@ -172,7 +172,9 @@ export function AccountList({ </td> <td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0"> {item.status === "deleted" ? ( - <p class="text-gray-600">removed</p> + <p class="text-gray-600"> + <i18n.Translate>Removed</i18n.Translate> + </p> ) : ( <Fragment> <a