diff options
Diffstat (limited to 'packages/demobank-ui/src/pages/AdminPage.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/AdminPage.tsx | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/packages/demobank-ui/src/pages/AdminPage.tsx b/packages/demobank-ui/src/pages/AdminPage.tsx index b4ce58588..0a1dc26ec 100644 --- a/packages/demobank-ui/src/pages/AdminPage.tsx +++ b/packages/demobank-ui/src/pages/AdminPage.tsx @@ -59,7 +59,9 @@ function randomPassword(): string { } interface Props { - onLoadNotOk: <T, E>(error: HttpResponsePaginated<T, E>) => VNode; + onLoadNotOk: <T>( + error: HttpResponsePaginated<T, SandboxBackend.SandboxError>, + ) => VNode; } /** * Query account information and show QR code if there is pending withdrawal @@ -109,6 +111,11 @@ export function AdminPage({ onLoadNotOk }: Props): VNode { if (showCashouts) { return ( <div> + <div> + <h1 class="nav welcome-text"> + <i18n.Translate>Cashout for account {showCashouts}</i18n.Translate> + </h1> + </div> <Cashouts account={showCashouts} onSelected={(id) => { @@ -116,15 +123,17 @@ export function AdminPage({ onLoadNotOk }: Props): VNode { setShowCashouts(undefined); }} /> - <input - class="pure-button" - type="submit" - value={i18n.str`Close`} - onClick={async (e) => { - e.preventDefault(); - setShowCashouts(undefined); - }} - /> + <p> + <input + class="pure-button" + type="submit" + value={i18n.str`Close`} + onClick={async (e) => { + e.preventDefault(); + setShowCashouts(undefined); + }} + /> + </p> </div> ); } @@ -184,7 +193,7 @@ export function AdminPage({ onLoadNotOk }: Props): VNode { onClose={() => setCreateAccount(false)} onCreateSuccess={(password) => { showInfoMessage( - i18n.str`Account created with password "${password}"`, + i18n.str`Account created with password "${password}". The user must change the password on the next login.`, ); setCreateAccount(false); }} @@ -326,7 +335,9 @@ export function UpdateAccountPassword({ onUpdateSuccess, onLoadNotOk, }: { - onLoadNotOk: <T, E>(error: HttpResponsePaginated<T, E>) => VNode; + onLoadNotOk: <T>( + error: HttpResponsePaginated<T, SandboxBackend.SandboxError>, + ) => VNode; onClear: () => void; onUpdateSuccess: () => void; account: string; @@ -521,7 +532,9 @@ export function ShowAccountDetails({ onLoadNotOk, onChangePassword, }: { - onLoadNotOk: <T, E>(error: HttpResponsePaginated<T, E>) => VNode; + onLoadNotOk: <T>( + error: HttpResponsePaginated<T, SandboxBackend.SandboxError>, + ) => VNode; onClear?: () => void; onChangePassword: () => void; onUpdateSuccess: () => void; @@ -628,7 +641,9 @@ function RemoveAccount({ onUpdateSuccess, onLoadNotOk, }: { - onLoadNotOk: <T, E>(error: HttpResponsePaginated<T, E>) => VNode; + onLoadNotOk: <T>( + error: HttpResponsePaginated<T, SandboxBackend.SandboxError>, + ) => VNode; onClear: () => void; onUpdateSuccess: () => void; account: string; @@ -806,7 +821,7 @@ function AccountForm({ /> </fieldset> <fieldset> - <label>{i18n.str`IBAN`}</label> + <label>{i18n.str`Internal IBAN`}</label> <input disabled={purpose !== "create"} value={form.iban ?? ""} |