2023-10-02 23:10:49 +03:00
|
|
|
<script>
|
2026-05-06 23:16:09 +03:00
|
|
|
import { getContext } from "svelte";
|
|
|
|
|
import { apiPost } from "../../helpers";
|
2023-10-02 23:10:49 +03:00
|
|
|
|
|
|
|
|
const channel = getContext("channel");
|
|
|
|
|
export let email;
|
|
|
|
|
export let token;
|
|
|
|
|
|
|
|
|
|
function login(e) {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
2026-05-06 23:16:09 +03:00
|
|
|
apiPost(channel.lucentUrl + "/verify", {
|
|
|
|
|
email: email,
|
|
|
|
|
token: token,
|
|
|
|
|
})
|
2023-10-02 23:10:49 +03:00
|
|
|
.then((response) => {
|
|
|
|
|
window.location = channel.lucentUrl;
|
|
|
|
|
})
|
2026-05-06 23:16:09 +03:00
|
|
|
.catch((error) => {});
|
2023-10-02 23:10:49 +03:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-05-06 23:16:09 +03:00
|
|
|
<div class="scope-login">
|
|
|
|
|
<div class="bg-image"></div>
|
|
|
|
|
<div class="login-form">
|
|
|
|
|
<div class="form">
|
|
|
|
|
<h2 class="mb-5">Welcome to Lucent</h2>
|
|
|
|
|
<form on:submit={login}>
|
|
|
|
|
<button class="bt bt-primary">
|
|
|
|
|
Enter as {email}
|
|
|
|
|
<img
|
|
|
|
|
alt="indicator"
|
|
|
|
|
id="indicator"
|
|
|
|
|
class="htmx-indicator"
|
|
|
|
|
src="/img/spinner.svg"
|
|
|
|
|
/>
|
|
|
|
|
</button>
|
|
|
|
|
</form>
|
|
|
|
|
<div class="form-errors"></div>
|
2023-10-02 23:10:49 +03:00
|
|
|
</div>
|
2026-05-06 23:16:09 +03:00
|
|
|
</div>
|
2023-10-02 23:10:49 +03:00
|
|
|
</div>
|