block editor

This commit is contained in:
2023-10-14 18:06:36 +03:00
parent 9e37a7f730
commit 2e81d27ff6
21 changed files with 523 additions and 141 deletions
+26 -17
View File
@@ -5,7 +5,7 @@
const channel = getContext("channel");
let email = "";
let successAlert;
let message = "";
function login(e) {
e.preventDefault();
@@ -15,7 +15,8 @@
email: email,
})
.then((response) => {
console.log(response)
message = "You will receive an email with a login link"
})
.catch((error) => {
});
@@ -23,24 +24,32 @@
</script>
<SuccessAlert bind:this={successAlert}/>
<div class="wrapper-tiny">
<form on:submit={login}>
<div class="mb-3">
<label for="emailaddress" class="form-label">Email address</label>
<input
type="email"
bind:value={email}
class="form-control"
id="emailaddress"
/>
{#if message}
<div class="alert alert-info" role="alert">
{message}
</div>
{:else}
<div class="text-center mt-5 d-block">
<SpinnerButton label="Login"/>
</div>
</form>
<form on:submit={login}>
<div class="mb-3">
<label for="emailaddress" class="form-label">Email address</label>
<input
type="email"
bind:value={email}
class="form-control"
id="emailaddress"
required
/>
</div>
<div class="text-center mt-5 d-block">
<SpinnerButton label="Login"/>
</div>
</form>
{/if}
</div>