diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components')
-rw-r--r-- | packages/merchant-backoffice-ui/src/components/exception/login.tsx | 12 | ||||
-rw-r--r-- | packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx | 2 |
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 }}> |