Some small portal fixes

This commit is contained in:
Dominic Ferrando
2026-07-03 20:05:20 -04:00
parent 13195dfd0a
commit 2ae4bbaf0c
2 changed files with 15 additions and 8 deletions
@@ -248,7 +248,7 @@
bind:value={calculation.player.metrics.weight} bind:value={calculation.player.metrics.weight}
> >
{#each range(400) as weight} {#each range(400) as weight}
<option value={String(lbToKg(weight))} <option value={lbToKg(weight)}
>{weight}</option >{weight}</option
> >
{/each} {/each}
+14 -7
View File
@@ -13,15 +13,22 @@
const password = new FormData(form).get("password")?.toString() ?? ""; const password = new FormData(form).get("password")?.toString() ?? "";
loading = true; loading = true;
const { status } = await api.auth.login.post({ password }); try {
loading = false; const { status } = await api.auth.login.post({ password });
if (status === 401) { if (status === 401) {
error = "Invalid password"; error = "Invalid password";
return; return;
}
await goto("/");
}
catch {
error = "Unable to reach the server. Please try again.";
}
finally {
loading = false;
} }
await goto("/");
} }
</script> </script>