diff --git a/src/lib/elements/forms/button.svelte b/src/lib/elements/forms/button.svelte index 1b17010d2..641720d78 100644 --- a/src/lib/elements/forms/button.svelte +++ b/src/lib/elements/forms/button.svelte @@ -7,6 +7,7 @@ export let round = false; export let external = false; export let href: string = null; + export let fullWidth = false; //TODO: add option to add aria-label to buttons that are only icons @@ -20,7 +21,8 @@ class:is-only-icon={round} class:is-secondary={secondary} class:is-text={text} - class:is-danger={danger}> + class:is-danger={danger} + class:is-full-width={fullWidth}> {:else} @@ -32,6 +34,7 @@ class:is-secondary={secondary} class:is-danger={danger} class:is-text={text} + class:is-full-width={fullWidth} type={submit ? 'submit' : 'button'}> diff --git a/src/lib/images/login/login-dark-mode.svg b/src/lib/images/login/login-dark-mode.svg new file mode 100644 index 000000000..999b6b52a --- /dev/null +++ b/src/lib/images/login/login-dark-mode.svg @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/lib/images/login/login-light-mode.svg b/src/lib/images/login/login-light-mode.svg new file mode 100644 index 000000000..cc09c6267 --- /dev/null +++ b/src/lib/images/login/login-light-mode.svg @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/lib/layout/index.ts b/src/lib/layout/index.ts index 952f4817c..b0663de89 100644 --- a/src/lib/layout/index.ts +++ b/src/lib/layout/index.ts @@ -7,3 +7,4 @@ export { default as Notification } from './notification.svelte'; export { default as Notifications } from './notifications.svelte'; export { default as Shell } from './shell.svelte'; export { default as Breadcrumbs } from './breadcrumbs.svelte'; +export { default as Unauthenticated } from './unauthenticated.svelte'; diff --git a/src/lib/layout/unauthenticated.svelte b/src/lib/layout/unauthenticated.svelte new file mode 100644 index 000000000..2df130ce5 --- /dev/null +++ b/src/lib/layout/unauthenticated.svelte @@ -0,0 +1,86 @@ + + +
+
+
+ + Appwrite + +
+ +
+ +
+ {#if $app.themeInUse === 'dark'} + + {:else} + + {/if} +
+ +
+ +
+

Integrate with your favourite technologies

+
    + {#each technologies as tech} +
  • +
  • + {/each} +
+
+
+
+
+
+
+ +
+

+
+ +
+ + +
+ +
+

+ version 0.15.2.402 +

+
+
+
+
diff --git a/src/routes/login.svelte b/src/routes/login.svelte index 9d4fb293f..757e32123 100644 --- a/src/routes/login.svelte +++ b/src/routes/login.svelte @@ -12,6 +12,7 @@ import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; import { user } from '$lib/stores/user'; + import { Unauthenticated } from '$lib/layout'; let mail: string, pass: string; @@ -34,31 +35,41 @@ - Login + Appwrite - Sign in -

Login

- -
- - - - - - - -
- -Create an Account + + Sign in + +
+ + + + + + + +
+
+ + + + +
diff --git a/src/routes/recover.svelte b/src/routes/recover.svelte new file mode 100644 index 000000000..cb381b0dc --- /dev/null +++ b/src/routes/recover.svelte @@ -0,0 +1,56 @@ + + + + Appwrite - Recover + + + + Password Recovery + +
+ + + + + + + +
+
+ + + + +
diff --git a/src/routes/register.svelte b/src/routes/register.svelte index 14a9281cd..af0b7498e 100644 --- a/src/routes/register.svelte +++ b/src/routes/register.svelte @@ -11,6 +11,8 @@ } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; import { sdkForConsole } from '$lib/stores/sdk'; + import { Unauthenticated } from '$lib/layout'; + import FormList from '$lib/elements/forms/formList.svelte'; let name: string, mail: string, pass: string; @@ -29,27 +31,44 @@ - Register + Appwrite - Sign up -

Register

+ + Sign up + +
+ + + + - - - - - - - - -Login + + +
+ +
+ + + +
diff --git a/tests/e2e/login.spec.ts b/tests/e2e/login.spec.ts index 89252aaba..be178d202 100644 --- a/tests/e2e/login.spec.ts +++ b/tests/e2e/login.spec.ts @@ -15,7 +15,7 @@ test('login page has inputs and button', async ({ page }) => { await page.goto('/login'); const mail = page.locator('id=email'); const pass = page.locator('id=password'); - const button = page.locator('button:has-text("Login")'); + const button = page.locator('button:has-text("Sign in")'); expect(await mail.isVisible()); expect(await pass.isVisible()); expect(await button.isVisible()); @@ -45,7 +45,7 @@ test('login page shows error & response is 401 with wrong inputs', async ({ page await page.goto('/login'); await page.fill('id=email', 'wrongemail@apppwrite.io'); await page.fill('id=password', 'wrongpassword'); - await page.click('button:has-text("Login")'); + await page.click('button:has-text("Sign in")'); page.on('response', (response) => { expect(response.status()).toBe(401); });