diff --git a/packages/aml-backoffice-ui/src/account.ts b/packages/aml-backoffice-ui/src/account.ts index 2225bf2ff..615d843c4 100644 --- a/packages/aml-backoffice-ui/src/account.ts +++ b/packages/aml-backoffice-ui/src/account.ts @@ -61,17 +61,20 @@ export function buildQuerySignature(key: SigningKey): string { return encodeCrock(eddsaSign(sigBlob, key)); } + export function buildDecisionSignature( key: SigningKey, decision: AmlExchangeBackend.AmlDecision, ): string { + const zero = new Uint8Array(new ArrayBuffer(64)) const sigBlob = buildSigPS(TalerSignaturePurpose.TALER_SIGNATURE_AML_DECISION) - .put(hash(stringToBytes(decision.justification))) - // .put(timestampRoundedToBuffer(decision.decision_time)) + //TODO: new need the null terminator, also in the exchange + .put(hash(stringToBytes(decision.justification)))//check null + .put(timestampRoundedToBuffer(decision.decision_time)) .put(amountToBuffer(decision.new_threshold)) .put(decodeCrock(decision.h_payto)) - // .put(hash(stringToBytes(decision.kyc_requirements))) + .put(zero) //kyc_requirement .put(bufferForUint32(decision.new_state)) .build(); diff --git a/packages/aml-backoffice-ui/src/hooks/useCases.ts b/packages/aml-backoffice-ui/src/hooks/useCases.ts index c5a0fc489..c07bd5f18 100644 --- a/packages/aml-backoffice-ui/src/hooks/useCases.ts +++ b/packages/aml-backoffice-ui/src/hooks/useCases.ts @@ -85,7 +85,6 @@ export function useCases( const records = !afterData ? [] : ((afterData ?? lastAfter).data ?? { records: [] }).records; - console.log("afterdata", afterData, lastAfter, records) if (loadingAfter) return { loading: true, data: { records } }; if (afterData) { return { ok: true, data: { records }, ...pagination }; diff --git a/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx b/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx index 13e78b169..429cfb9ca 100644 --- a/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx +++ b/packages/aml-backoffice-ui/src/pages/NewFormEntry.tsx @@ -38,7 +38,7 @@ export function NewFormEntry({ fullName: "loggedIn_user_fullname", when: AbsoluteTime.now(), state: AmlExchangeBackend.AmlState.pending, - threshold: Amounts.parseOrThrow("ARS:1000"), + threshold: Amounts.parseOrThrow("KUDOS:1000"), }; const api = useAmlCasesAPI() diff --git a/packages/anastasis-cli/src/index.ts b/packages/anastasis-cli/src/index.ts index 560574276..7c011569f 100644 --- a/packages/anastasis-cli/src/index.ts +++ b/packages/anastasis-cli/src/index.ts @@ -1,20 +1,78 @@ import { clk } from "@gnu-taler/taler-util/clk"; import { + discoverPolicies, getBackupStartState, getRecoveryStartState, reduceAction, } from "@gnu-taler/anastasis-core"; import fs from "fs"; +import { j2s } from "@gnu-taler/taler-util"; -export const reducerCli = clk - .program("reducer", { - help: "Command line interface for Anastasis.", +export const reducerCli = clk.program("anastasis-cli", { + help: "Command line interface for Anastasis.", +}); + +reducerCli + .subcommand("reducer", "reduce", { + help: "Run the anastasis reducer", }) .flag("initBackup", ["-b", "--backup"]) .flag("initRecovery", ["-r", "--restore"]) .maybeOption("argumentsJson", ["-a", "--arguments"], clk.STRING) .maybeArgument("action", clk.STRING) - .maybeArgument("stateFile", clk.STRING); + .maybeArgument("stateFile", clk.STRING) + .action(async (x) => { + if (x.reducer.initBackup) { + console.log(JSON.stringify(await getBackupStartState())); + return; + } else if (x.reducer.initRecovery) { + console.log(JSON.stringify(await getRecoveryStartState())); + return; + } + + const action = x.reducer.action; + if (!action) { + console.log("action required"); + return; + } + + let lastState: any; + if (x.reducer.stateFile) { + const s = fs.readFileSync(x.reducer.stateFile, { encoding: "utf-8" }); + lastState = JSON.parse(s); + } else { + const s = await read(process.stdin); + lastState = JSON.parse(s); + } + + let args: any; + if (x.reducer.argumentsJson) { + args = JSON.parse(x.reducer.argumentsJson); + } else { + args = {}; + } + + const nextState = await reduceAction(lastState, action, args); + console.log(JSON.stringify(nextState)); + }); + +reducerCli + .subcommand("discover", "discover", { + help: "Run the anastasis reducer", + }) + .maybeArgument("stateFile", clk.STRING) + .action(async (args) => { + let lastState: any; + if (args.discover.stateFile) { + const s = fs.readFileSync(args.discover.stateFile, { encoding: "utf-8" }); + lastState = JSON.parse(s); + } else { + const s = await read(process.stdin); + lastState = JSON.parse(s); + } + const res = await discoverPolicies(lastState); + console.log(j2s(res)); + }); async function read(stream: NodeJS.ReadStream): Promise { const chunks = []; @@ -24,41 +82,6 @@ async function read(stream: NodeJS.ReadStream): Promise { return Buffer.concat(chunks).toString("utf8"); } -reducerCli.action(async (x) => { - if (x.reducer.initBackup) { - console.log(JSON.stringify(await getBackupStartState())); - return; - } else if (x.reducer.initRecovery) { - console.log(JSON.stringify(await getRecoveryStartState())); - return; - } - - const action = x.reducer.action; - if (!action) { - console.log("action required"); - return; - } - - let lastState: any; - if (x.reducer.stateFile) { - const s = fs.readFileSync(x.reducer.stateFile, { encoding: "utf-8" }); - lastState = JSON.parse(s); - } else { - const s = await read(process.stdin); - lastState = JSON.parse(s); - } - - let args: any; - if (x.reducer.argumentsJson) { - args = JSON.parse(x.reducer.argumentsJson); - } else { - args = {}; - } - - const nextState = await reduceAction(lastState, action, args); - console.log(JSON.stringify(nextState)); -}); - export function reducerCliMain() { reducerCli.run(); } diff --git a/packages/anastasis-core/src/crypto.ts b/packages/anastasis-core/src/crypto.ts index 3a9483aa1..8bc004e95 100644 --- a/packages/anastasis-core/src/crypto.ts +++ b/packages/anastasis-core/src/crypto.ts @@ -151,7 +151,11 @@ export async function decryptPolicyMetadata( userId: UserIdentifier, metadataEnc: OpaqueData, ): Promise { + // @ts-ignore + console.log("metadataEnc", metadataEnc); const plain = await anastasisDecrypt(asOpaque(userId), metadataEnc, "rmd"); + // @ts-ignore + console.log("plain:", plain); const metadataBytes = decodeCrock(plain); const policyHash = encodeCrock(metadataBytes.slice(0, 64)); const secretName = bytesToString(metadataBytes.slice(64)); diff --git a/packages/demobank-ui/src/components/Loading.tsx b/packages/demobank-ui/src/components/Loading.tsx index 7cbdad681..b567e9056 100644 --- a/packages/demobank-ui/src/components/Loading.tsx +++ b/packages/demobank-ui/src/components/Loading.tsx @@ -21,9 +21,11 @@ export function Loading(): VNode {
@@ -33,7 +35,7 @@ export function Loading(): VNode { export function Spinner(): VNode { return ( -
+
diff --git a/packages/demobank-ui/src/i18n/it.po b/packages/demobank-ui/src/i18n/it.po index a3a599376..5dfebedae 100644 --- a/packages/demobank-ui/src/i18n/it.po +++ b/packages/demobank-ui/src/i18n/it.po @@ -14,8 +14,8 @@ msgstr "" "Project-Id-Version: Taler Wallet\n" "Report-Msgid-Bugs-To: taler@gnu.org\n" "POT-Creation-Date: 2016-11-23 00:00+0100\n" -"PO-Revision-Date: 2022-12-26 23:30+0000\n" -"Last-Translator: Stefan Kügel \n" +"PO-Revision-Date: 2023-08-15 07:28+0000\n" +"Last-Translator: Krystian Baran \n" "Language-Team: Italian \n" "Language: it\n" @@ -199,9 +199,9 @@ msgid "Amount to withdraw:" msgstr "Somma da ritirare" #: src/pages/home/WalletWithdrawForm.tsx:84 -#, fuzzy, c-format +#, c-format msgid "Withdraw" -msgstr "Conferma il ritiro" +msgstr "Prelevare" #: src/pages/home/WalletWithdrawForm.tsx:128 #, fuzzy, c-format @@ -231,12 +231,12 @@ msgstr "Trasferisci fondi a un altro conto di questa banca:" #: src/pages/home/Transactions.tsx:69 #, c-format msgid "Date" -msgstr "" +msgstr "Data" #: src/pages/home/Transactions.tsx:70 #, c-format msgid "Amount" -msgstr "Somma" +msgstr "Importo" #: src/pages/home/Transactions.tsx:71 #, c-format @@ -246,7 +246,7 @@ msgstr "Controparte" #: src/pages/home/Transactions.tsx:72 #, c-format msgid "Subject" -msgstr "Causale" +msgstr "Soggetto" #: src/pages/home/QrCodeSection.tsx:41 #, fuzzy, c-format diff --git a/packages/demobank-ui/src/pages/HomePage.tsx b/packages/demobank-ui/src/pages/HomePage.tsx index 20fcef39a..93a9bdfae 100644 --- a/packages/demobank-ui/src/pages/HomePage.tsx +++ b/packages/demobank-ui/src/pages/HomePage.tsx @@ -84,11 +84,11 @@ export function HomePage({ export function WithdrawalOperationPage({ operationId, onLoadNotOk, - onAbort, + onContinue, }: { operationId: string; onLoadNotOk: () => void; - onAbort: () => void; + onContinue: () => void; }): VNode { //FIXME: libeufin sandbox should return show to create the integration api endpoint //or return withdrawal uri from response @@ -99,12 +99,6 @@ export function WithdrawalOperationPage({ const parsedUri = parseWithdrawUri(uri); const { i18n } = useTranslationContext(); - const [settings, updateSettings] = useSettings(); - function clearCurrentWithdrawal(): void { - updateSettings("currentWithdrawalOperationId", undefined); - onAbort(); - } - if (!parsedUri) { notifyError({ title: i18n.str`The Withdrawal URI is not valid: "${uri}"`, @@ -115,10 +109,7 @@ export function WithdrawalOperationPage({ return ( { - notifyInfo(i18n.str`Withdrawal confirmed!`); - }} - onAborted={clearCurrentWithdrawal} + onContinue={onContinue} onLoadNotOk={onLoadNotOk} /> ); diff --git a/packages/demobank-ui/src/pages/Routing.tsx b/packages/demobank-ui/src/pages/Routing.tsx index 64f9b1208..f176c73db 100644 --- a/packages/demobank-ui/src/pages/Routing.tsx +++ b/packages/demobank-ui/src/pages/Routing.tsx @@ -40,7 +40,7 @@ export function Routing(): VNode { component={({ wopid }: { wopid: string }) => ( { + onContinue={() => { route("/account"); }} onLoadNotOk={() => { diff --git a/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx b/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx index da245b75d..cdb612155 100644 --- a/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx +++ b/packages/demobank-ui/src/pages/WithdrawalConfirmationQuestion.tsx @@ -33,7 +33,6 @@ import { ShowInputErrorLabel } from "./ShowInputErrorLabel.js"; const logger = new Logger("WithdrawalConfirmationQuestion"); interface Props { - onConfirmed: () => void; onAborted: () => void; withdrawUri: WithdrawUriResult; } @@ -42,7 +41,6 @@ interface Props { * Not providing a back button, only abort. */ export function WithdrawalConfirmationQuestion({ - onConfirmed, onAborted, withdrawUri, }: Props): VNode { @@ -119,7 +117,6 @@ export function WithdrawalConfirmationQuestion({ await confirmWithdrawal( withdrawUri.withdrawalOperationId, ); - onConfirmed(); } catch (error) { if (error instanceof RequestError) { notifyError( diff --git a/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx b/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx index 9f9c9925e..80fdac3c8 100644 --- a/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx +++ b/packages/demobank-ui/src/pages/WithdrawalQRCode.tsx @@ -24,6 +24,7 @@ import { Fragment, VNode, h } from "preact"; import { Loading } from "../components/Loading.js"; import { useWithdrawalDetails } from "../hooks/access.js"; import { notifyInfo } from "../hooks/notification.js"; +import { useSettings } from "../hooks/settings.js"; import { handleNotOkResult } from "./HomePage.js"; import { QrCodeSection } from "./QrCodeSection.js"; import { WithdrawalConfirmationQuestion } from "./WithdrawalConfirmationQuestion.js"; @@ -32,8 +33,7 @@ const logger = new Logger("WithdrawalQRCode"); interface Props { withdrawUri: WithdrawUriResult; - onAborted: () => void; - onConfirmed: () => void; + onContinue: () => void; onLoadNotOk: () => void; } /** @@ -43,10 +43,14 @@ interface Props { */ export function WithdrawalQRCode({ withdrawUri, - onConfirmed, - onAborted, + onContinue, onLoadNotOk, }: Props): VNode { + const [settings, updateSettings] = useSettings(); + function clearCurrentWithdrawal(): void { + updateSettings("currentWithdrawalOperationId", undefined); + onContinue(); + } const { i18n } = useTranslationContext(); const result = useWithdrawalDetails(withdrawUri.withdrawalOperationId); if (!result.ok) { @@ -64,13 +68,64 @@ export function WithdrawalQRCode({ } const { data } = result; - logger.trace("withdrawal status", data); - if (data.aborted || data.confirmation_done) { - // signal that this withdrawal is aborted - // will redirect to account info - notifyInfo(i18n.str`Operation completed`); - onAborted(); - return ; + if (data.aborted) { + return
+

{i18n.str`Operation aborted`}

+
+

+ + The wire transfer to the GNU Taler Exchange bank's account was aborted, your balance + was not affected. + +

+

+ + You can close this page now or continue to the account page. + +

+ { + e.preventDefault(); + clearCurrentWithdrawal() + onContinue() + }}> + {i18n.str`Continue`} + + +
+
+ } + + if (data.confirmation_done) { + return
+

{i18n.str`Operation completed`}

+ +
+

+ + The wire transfer to the GNU Taler Exchange bank's account is completed, now the + exchange will send the requested amount into your GNU Taler wallet. + +

+

+ + You can close this page now or continue to the account page. + +

+ +
+
} if (!data.selection_done) { @@ -79,25 +134,21 @@ export function WithdrawalQRCode({ withdrawUri={withdrawUri} onAborted={() => { notifyInfo(i18n.str`Operation canceled`); - onAborted(); - }} + clearCurrentWithdrawal() + onContinue() + }} /> ); } - // Wallet POSTed the withdrawal details! Ask the - // user to authorize the operation (here CAPTCHA). return ( { - notifyInfo(i18n.str`Operation confirmed`); - onConfirmed(); - }} onAborted={() => { notifyInfo(i18n.str`Operation canceled`); - onAborted(); - }} + clearCurrentWithdrawal() + onContinue() + }} /> ); -} +} \ No newline at end of file diff --git a/packages/demobank-ui/src/scss/bank.scss b/packages/demobank-ui/src/scss/bank.scss index 0089b9734..f8de0a984 100644 --- a/packages/demobank-ui/src/scss/bank.scss +++ b/packages/demobank-ui/src/scss/bank.scss @@ -314,4 +314,40 @@ h1.nav { [name=wire-transfer-form] > input { margin-bottom: 1em; -} \ No newline at end of file +} + +.lds-ring { + display: inline-block; + position: relative; + width: 80px; + height: 80px; +} +.lds-ring div { + box-sizing: border-box; + display: block; + position: absolute; + width: 64px; + height: 64px; + margin: 8px; + border: 8px solid black; + border-radius: 50%; + animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; + border-color: black transparent transparent transparent; +} +.lds-ring div:nth-child(1) { + animation-delay: -0.45s; +} +.lds-ring div:nth-child(2) { + animation-delay: -0.3s; +} +.lds-ring div:nth-child(3) { + animation-delay: -0.15s; +} +@keyframes lds-ring { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} diff --git a/packages/demobank-ui/src/utils.ts b/packages/demobank-ui/src/utils.ts index e60ba7f3b..4ce0f140e 100644 --- a/packages/demobank-ui/src/utils.ts +++ b/packages/demobank-ui/src/utils.ts @@ -134,7 +134,7 @@ export function buildRequestErrorMessage( specialCases.onClientError && specialCases.onClientError(cause.status); result = { title: title ? title : i18n.str`The server didn't accept the request`, - description: cause.payload.error.description, + description: cause?.payload?.error?.description, debug: JSON.stringify(cause), }; break; @@ -146,7 +146,7 @@ export function buildRequestErrorMessage( title: title ? title : i18n.str`The server had problems processing the request`, - description: cause.payload.error.description, + description: cause?.payload?.error?.description, debug: JSON.stringify(cause), }; break; @@ -154,7 +154,7 @@ export function buildRequestErrorMessage( case ErrorType.UNREADABLE: { result = { title: i18n.str`Unexpected error`, - description: `Response from ${cause.info?.url} is unreadable, status: ${cause.status}`, + description: `Response from ${cause?.info?.url} is unreadable, status: ${cause?.status}`, debug: JSON.stringify(cause), }; break; diff --git a/packages/merchant-backoffice-ui/src/Application.tsx b/packages/merchant-backoffice-ui/src/Application.tsx index 23510c456..f6a81ff8d 100644 --- a/packages/merchant-backoffice-ui/src/Application.tsx +++ b/packages/merchant-backoffice-ui/src/Application.tsx @@ -26,7 +26,7 @@ import { } from "@gnu-taler/web-util/browser"; import { Fragment, h, VNode } from "preact"; import { route } from "preact-router"; -import { useMemo } from "preact/hooks"; +import { useMemo, useState } from "preact/hooks"; import { ApplicationReadyRoutes } from "./ApplicationReadyRoutes.js"; import { Loading } from "./components/exception/loading.js"; import { @@ -42,6 +42,7 @@ import { useBackendConfig } from "./hooks/backend.js"; import { strings } from "./i18n/strings.js"; import LoginPage from "./paths/login/index.js"; import { HttpStatusCode } from "@gnu-taler/taler-util"; +import { Settings } from "./paths/settings/index.js"; export function Application(): VNode { return ( @@ -70,10 +71,19 @@ function ApplicationStatusRoutes(): VNode { : { currency: "unknown", version: "unknown" }; const ctx = useMemo(() => ({ currency, version }), [currency, version]); + const [showSettings, setShowSettings] = useState(false) + + if (showSettings) { + return + setShowSettings(true)} title="UI Settings" /> + + + } + if (!triedToLog) { return ( - + setShowSettings(true)} /> ); @@ -87,7 +97,7 @@ function ApplicationStatusRoutes(): VNode { ) { return ( - + setShowSettings(true)} /> ); @@ -98,7 +108,7 @@ function ApplicationStatusRoutes(): VNode { ) { return ( - + setShowSettings(true)} /> - + setShowSettings(true)} /> - + setShowSettings(true)} /> - + setShowSettings(true)} /> ; + if (showSettings) { + return + setShowSettings(true)} title="UI Settings" onLogout={clearTokenAndGoToRoot} /> + + + } + if (result.loading) return setShowSettings(true)} title="Loading..." />; let admin = true; let instanceNameByBackendURL; @@ -61,7 +69,7 @@ export function ApplicationReadyRoutes(): VNode { ) { return ( - + setShowSettings(true)} title="Login" onLogout={clearTokenAndGoToRoot} /> - + setShowSettings(true)} title="Error" onLogout={clearTokenAndGoToRoot} /> { + route("/settings") + }} path={path} onLogout={clearTokenAndGoToRoot} setInstanceName={setInstanceName} @@ -558,6 +564,7 @@ export function InstanceRoutes({ }} /> + {/** * Example pages */} diff --git a/packages/merchant-backoffice-ui/src/components/exception/login.tsx b/packages/merchant-backoffice-ui/src/components/exception/login.tsx index 42c5e89d0..f2f94a7c5 100644 --- a/packages/merchant-backoffice-ui/src/components/exception/login.tsx +++ b/packages/merchant-backoffice-ui/src/components/exception/login.tsx @@ -20,7 +20,7 @@ */ import { useTranslationContext } from "@gnu-taler/web-util/browser"; -import { h, VNode } from "preact"; +import { ComponentChildren, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { useBackendContext } from "../../context/backend.js"; import { useInstanceContext } from "../../context/instance.js"; @@ -40,7 +40,7 @@ function getTokenValuePart(t: string): string { } function normalizeToken(r: string): string { - return `secret-token:${encodeURIComponent(r)}`; + return `secret-token:${r}`; } function cleanUp(s: string): string { @@ -53,7 +53,7 @@ function cleanUp(s: string): string { export function LoginModal({ onConfirm, withMessage }: Props): VNode { const { url: backendUrl, token: baseToken } = useBackendContext(); - const { admin, token: instanceToken } = useInstanceContext(); + const { admin, token: instanceToken, id } = useInstanceContext(); const testLogin = useCredentialsChecker(); const currentToken = getTokenValuePart( (!admin ? baseToken : instanceToken) ?? "", @@ -63,6 +63,78 @@ export function LoginModal({ onConfirm, withMessage }: Props): VNode { const [url, setURL] = useState(cleanUp(backendUrl)); const { i18n } = useTranslationContext(); + if (admin && id !== "default") { + //admin trying to access another instance + return (
+
+ +
+
) + } + return (
@@ -137,8 +209,7 @@ export function LoginModal({ onConfirm, withMessage }: Props): VNode { borderTop: 0, }} > - +
); } + +function AsyncButton({ onClick, children }: { onClick: () => Promise, children: ComponentChildren }): VNode { + const [running, setRunning] = useState(false) + return +} diff --git a/packages/merchant-backoffice-ui/src/components/form/InputToggle.tsx b/packages/merchant-backoffice-ui/src/components/form/InputToggle.tsx new file mode 100644 index 000000000..61ddf3c84 --- /dev/null +++ b/packages/merchant-backoffice-ui/src/components/form/InputToggle.tsx @@ -0,0 +1,91 @@ +/* + This file is part of GNU Taler + (C) 2021-2023 Taler Systems S.A. + + GNU Taler is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + GNU Taler; see the file COPYING. If not, see + */ + +/** + * + * @author Sebastian Javier Marchano (sebasjm) + */ +import { h, VNode } from "preact"; +import { InputProps, useField } from "./useField.js"; + +interface Props extends InputProps { + name: T; + readonly?: boolean; + expand?: boolean; + threeState?: boolean; + toBoolean?: (v?: any) => boolean | undefined; + fromBoolean?: (s: boolean | undefined) => any; +} + +const defaultToBoolean = (f?: any): boolean | undefined => f || ""; +const defaultFromBoolean = (v: boolean | undefined): any => v as any; + +export function InputToggle({ + name, + readonly, + placeholder, + tooltip, + label, + help, + threeState, + expand, + fromBoolean = defaultFromBoolean, + toBoolean = defaultToBoolean, +}: Props): VNode { + const { error, value, onChange } = useField(name); + + const onCheckboxClick = (): void => { + const c = toBoolean(value); + if (c === false && threeState) return onChange(undefined as any); + return onChange(fromBoolean(!c)); + }; + + return ( +
+
+ +
+
+
+

+

+ + {help} +

+ {error &&

{error}

} +
+
+
+ ); +} diff --git a/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx index 9624a2c38..9f1b33893 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx @@ -20,7 +20,6 @@ */ import { h, VNode } from "preact"; -import { LangSelector } from "./LangSelector.js"; import logo from "../../assets/logo-2021.svg"; interface Props { @@ -65,7 +64,6 @@ export function NavigationBar({ onMobileMenu, title }: Props): VNode {
diff --git a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx index 6fee600eb..f3cf80b92 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx @@ -31,6 +31,7 @@ const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : undefined; interface Props { onLogout: () => void; + onShowSettings: () => void; mobile?: boolean; instance: string; admin?: boolean; @@ -40,6 +41,7 @@ interface Props { export function Sidebar({ mobile, instance, + onShowSettings, onLogout, admin, mimic, @@ -78,21 +80,8 @@ export function Sidebar({