This is a parody of leetcode.com for designers. It's being developed live on Twitch.tv/zedashaw to demonstrate how to make a parody of a website.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
pixelperfectionist/client/pages/Login.svelte

26 lines
745 B

<script>
import Login from '$/client/components/Login.svelte';
import Layout from '$/client/Layout.svelte';
import { user } from '$/client/stores.js';
import { push } from 'svelte-spa-router';
import { log } from "$/client/logging.js";
$: if($user.authenticated) {
log.debug("user is already authenticated");
push("/");
}
const force_home = () => {
window.location = "/";
}
</script>
<Layout testid="page-login" centered={ true }>
{#if $user.new_registration}
<callout style="width: var(--width-card);">Welcome! Your registration is complete. Log in with your username/password to begin.
</callout>
{/if}
<Login on:authenticated={ () => push('/') }
on:canceled={ force_home } />
</Layout>