bullet-proof login ux

This commit is contained in:
2023-02-05 13:25:22 +01:00
parent e0f400a800
commit ea08127927
3 changed files with 24 additions and 13 deletions

View File

@@ -62,7 +62,7 @@
</div>
{/if}
{/if}
{#if $api_endpoint && !$apikey}
{#if $api_endpoint?.includes("://") && (!$apikey || $apikey == null)}
<form
class="flex flex-col pt-3 md:pt-8"
onsubmit="event.preventDefault();"
@@ -117,6 +117,9 @@
class="flex flex-col pt-3 md:pt-8"
onsubmit="event.preventDefault();"
on:submit={() => {
if (api_endpoint_input.includes("api/")) {
api_endpoint_input = api_endpoint_input.replace("api/", "");
}
if (api_endpoint_input.substr(-1) !== "/") {
api_endpoint_input = api_endpoint_input + "/";
}