aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/components
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-03-10 01:25:22 -0300
committerSebastian <sebasjm@gmail.com>2023-03-10 01:25:22 -0300
commit8ddc551cc83a81ade3206e6e04c516ff15215993 (patch)
tree31145c0f17472b38cdce5520bd038e7c4d6d8df9 /packages/merchant-backoffice-ui/src/components
parent2291d460e833bd6b63df0a7e9a9a16f801f39007 (diff)
downloadwallet-core-8ddc551cc83a81ade3206e6e04c516ff15215993.tar.xz
remove webui from login url, ad qr for template, fix navbar size,
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components')
-rw-r--r--packages/merchant-backoffice-ui/src/components/exception/login.tsx12
-rw-r--r--packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx2
2 files changed, 11 insertions, 3 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/exception/login.tsx b/packages/merchant-backoffice-ui/src/components/exception/login.tsx
index 552e76ed6..9a0411642 100644
--- a/packages/merchant-backoffice-ui/src/components/exception/login.tsx
+++ b/packages/merchant-backoffice-ui/src/components/exception/login.tsx
@@ -42,6 +42,14 @@ function normalizeToken(r: string | undefined): string | undefined {
return r ? `secret-token:${encodeURIComponent(r)}` : undefined;
}
+function cleanUp(s: string): string {
+ let result = s;
+ if (result.indexOf("webui/") !== -1) {
+ result = result.substring(0, result.indexOf("webui/"));
+ }
+ return result;
+}
+
export function LoginModal({ onConfirm, withMessage }: Props): VNode {
const { url: backendUrl, token: baseToken } = useBackendContext();
const { admin, token: instanceToken } = useInstanceContext();
@@ -50,11 +58,11 @@ export function LoginModal({ onConfirm, withMessage }: Props): VNode {
);
const [token, setToken] = useState(currentToken);
- const [url, setURL] = useState(backendUrl);
+ const [url, setURL] = useState(cleanUp(backendUrl));
const { i18n } = useTranslationContext();
return (
- <div class="columns is-centered">
+ <div class="columns is-centered" style={{ margin: "auto" }}>
<div class="column is-two-thirds ">
<div class="modal-card" style={{ width: "100%", margin: 0 }}>
<header
diff --git a/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx
index 8bd85d0ef..9624a2c38 100644
--- a/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx
+++ b/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx
@@ -61,7 +61,7 @@ export function NavigationBar({ onMobileMenu, title }: Props): VNode {
class="navbar-start is-justify-content-center is-flex-grow-1"
href="https://taler.net"
>
- <img src={logo} style={{ height: 50, margin: 10 }} />
+ <img src={logo} style={{ height: 35, margin: 10 }} />
</a>
<div class="navbar-end">
<div class="navbar-item" style={{ paddingTop: 4, paddingBottom: 4 }}>