aboutsummaryrefslogtreecommitdiffstats
path: root/apps/portal/src/app/pages/login.svelte
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-06-05 18:45:16 +0200
committerivarlovlie <git@ivarlovlie.no>2022-06-05 18:45:16 +0200
commit3211ef25f7bc321832c9962eb73c7201d221e2a6 (patch)
treee23cdd830e0b22e19f0f35fa86e86bc3e1b0e017 /apps/portal/src/app/pages/login.svelte
parentb0dd482d29122ffaae9dc147dd48b99805e5e683 (diff)
downloadgreatoffice-3211ef25f7bc321832c9962eb73c7201d221e2a6.tar.xz
greatoffice-3211ef25f7bc321832c9962eb73c7201d221e2a6.zip
refactor: Update style on portal forms
Diffstat (limited to 'apps/portal/src/app/pages/login.svelte')
-rw-r--r--apps/portal/src/app/pages/login.svelte101
1 files changed, 52 insertions, 49 deletions
diff --git a/apps/portal/src/app/pages/login.svelte b/apps/portal/src/app/pages/login.svelte
index 3324056..df8d537 100644
--- a/apps/portal/src/app/pages/login.svelte
+++ b/apps/portal/src/app/pages/login.svelte
@@ -4,6 +4,7 @@
import {api_base, projects_base, IconNames} from "$shared/lib/configuration";
import Button from "$shared/components/button.svelte";
import Alert from "$shared/components/alert.svelte";
+ import Tile from "$shared/components/tile.svelte";
import {login} from "$shared/lib/api/user";
import {is_email} from "$shared/lib/helpers";
import Layout from "./_layout.svelte";
@@ -92,54 +93,56 @@
</script>
<Layout>
- <form on:submit|preventDefault={loginForm.submit_form}
- class="margin-bottom-md max-width-xxs">
- <fieldset>
- <legend class="form-legend">
- <span class="margin-bottom-xs">Log into your account</span>
- <br/>
- <span class="text-sm">... or <a href="/signup"
- use:link>create a new one</a></span>
- </legend>
- <div class="margin-bottom-xxs max-width-xxs">
- <Alert visible={loginForm.alert.isVisible}
- title={loginForm.alert.title}
- message={loginForm.alert.message}
- type={loginForm.alert.type}/>
- </div>
- <div class="margin-bottom-xxs">
- <input type="email"
- placeholder="Email address"
- class="form-control width-100%"
- id="username"
- bind:value={loginForm.values.username}/>
- </div>
- <div class="margin-bottom-xxs">
- <input type="password"
- placeholder="Password"
- id="password"
- class="form-control width-100%"
- bind:value={loginForm.values.password}/>
- <div class="flex justify-end">
- <a tabindex="-1"
- class="text-sm"
- href="/forgot"
- use:link>Reset password</a>
+ <Tile>
+ <form on:submit|preventDefault={loginForm.submit_form}
+ class="max-width-xxs">
+ <fieldset>
+ <legend class="form-legend">
+ <span class="margin-bottom-xs">Log into your account</span>
+ <br/>
+ <span class="text-sm">... or <a href="/signup"
+ use:link>create a new one</a></span>
+ </legend>
+ <div class="margin-bottom-xxs max-width-xxs">
+ <Alert visible={loginForm.alert.isVisible}
+ title={loginForm.alert.title}
+ message={loginForm.alert.message}
+ type={loginForm.alert.type}/>
</div>
- </div>
- <div class="flex justify-between">
- <Button text="Login with Github"
- variant="secondary"
- icon="{IconNames.github}"
- icon_right_aligned="true"
- href={api_base("_/account/create-github-session")}
- loading={loginForm.loading}
- />
- <Button text="Login"
- type="submit"
- variant="primary"
- loading={loginForm.loading}/>
- </div>
- </fieldset>
- </form>
+ <div class="margin-bottom-xxs">
+ <input type="email"
+ placeholder="Email address"
+ class="form-control width-100%"
+ id="username"
+ bind:value={loginForm.values.username}/>
+ </div>
+ <div class="margin-bottom-xxs">
+ <input type="password"
+ placeholder="Password"
+ id="password"
+ class="form-control width-100%"
+ bind:value={loginForm.values.password}/>
+ <div class="flex justify-end">
+ <a tabindex="-1"
+ class="text-sm"
+ href="/forgot"
+ use:link>Reset password</a>
+ </div>
+ </div>
+ <div class="flex justify-between">
+ <Button text="Login with Github"
+ variant="secondary"
+ icon="{IconNames.github}"
+ icon_right_aligned="true"
+ href={api_base("_/account/create-github-session")}
+ loading={loginForm.loading}
+ />
+ <Button text="Login"
+ type="submit"
+ variant="primary"
+ loading={loginForm.loading}/>
+ </div>
+ </fieldset>
+ </form>
+ </Tile>
</Layout>