diff --git a/web/src/lib/components/login-form.svelte b/web/src/lib/components/login-form.svelte index bf2f5cf..22a6a4d 100644 --- a/web/src/lib/components/login-form.svelte +++ b/web/src/lib/components/login-form.svelte @@ -1,265 +1,271 @@ {#snippet oauthLogin()} - {#await oauthProvider} - - {:then result} - {#if result.oauth_name != null} -
+ {#await oauthProvider} + + {:then result} + {#if result.oauth_name != null} +
Or continue with -
- - {/if} - {/await} +
+ + {/if} + {/await} {/snippet} - - - - - Login - Enter your email below to log in to your account - - -
-
- - -
-
- - -
+{#if login} + + + Login + Enter your email below to log in to your account + + + +
+ + +
+
+ + +
- {#if errorMessage} -

{errorMessage}

- {/if} + {#if errorMessage} + + + Error + {errorMessage} + + {/if} - - + + - {@render oauthLogin()} + {@render oauthLogin()} -
- -
-
-
-
- - - - Sign up - Enter your email and password below to sign up. - - -
-
- - -
-
-
- -
- -
+
+ +
+ + +{:else} + + + Sign up + Enter your email and password below to sign up. + + + +
+ + +
+
+
+ +
+ +
- {#if errorMessage} -

{errorMessage}

- {/if} + {#if errorMessage} +

{errorMessage}

+ {/if} - - - {@render oauthLogin()} + + + {@render oauthLogin()} -
- -
-
-
-
-
+
+ +
+ + +{/if} \ No newline at end of file diff --git a/web/src/routes/login/+layout.svelte b/web/src/routes/login/+layout.svelte new file mode 100644 index 0000000..9bef3fa --- /dev/null +++ b/web/src/routes/login/+layout.svelte @@ -0,0 +1,60 @@ + + +
+ + +
diff --git a/web/src/routes/login/+layout.ts b/web/src/routes/login/+layout.ts new file mode 100644 index 0000000..6240bee --- /dev/null +++ b/web/src/routes/login/+layout.ts @@ -0,0 +1,16 @@ +import type {LayoutLoad} from './$types'; +import {env} from '$env/dynamic/public'; + +const apiUrl = env.PUBLIC_API_URL; + +export const load: LayoutLoad = async ({fetch}) => { + const response = await fetch(apiUrl + '/auth/metadata', { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + credentials: 'include' + }); + + return {oauthProvider: await response.json()}; +}; \ No newline at end of file diff --git a/web/src/routes/login/+page.svelte b/web/src/routes/login/+page.svelte index 84a0aed..a3f9b4c 100644 --- a/web/src/routes/login/+page.svelte +++ b/web/src/routes/login/+page.svelte @@ -1,10 +1,9 @@ @@ -15,27 +14,5 @@ /> -
-
- -
-
- -
-
-
- -
+ + diff --git a/web/src/routes/login/+page.ts b/web/src/routes/login/+page.ts deleted file mode 100644 index dc24ab5..0000000 --- a/web/src/routes/login/+page.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { env } from '$env/dynamic/public'; -import type { PageLoad } from './$types'; - -const apiUrl = env.PUBLIC_API_URL; - -export const load: PageLoad = async ({ fetch }) => { - const response = await fetch(apiUrl + '/auth/metadata', { - method: 'GET', - headers: { - 'Content-Type': 'application/json' - }, - credentials: 'include' - }); - - return { oauthProvider: await response.json() }; -}; diff --git a/web/src/routes/login/forgot-password/+page.svelte b/web/src/routes/login/forgot-password/+page.svelte index 0720992..02b8d6d 100644 --- a/web/src/routes/login/forgot-password/+page.svelte +++ b/web/src/routes/login/forgot-password/+page.svelte @@ -67,90 +67,67 @@ /> -
-
-
- -
- MediaManager Logo + + + Forgot Password + + {#if isSuccess} + We've sent a password reset link to your email address if a SMTP server is + configured. Check your inbox and follow the instructions to reset your password. If + you didn't receive an email, please contact an administrator, the reset link will be + in the logs of MediaManager. + {:else} + Enter your email address and we'll send you a link to reset your password. + {/if} + + + + {#if isSuccess} +
+
+

+ Password reset email sent successfully! +

-

Media Manager

+
+

Didn't receive the email? Check your spam folder or

+ +
+
+ {:else} +
+
+ + +
+ +
+ {/if} +
-
-
- - - Forgot Password - - {#if isSuccess} - We've sent a password reset link to your email address if a SMTP server is - configured. Check your inbox and follow the instructions to reset your password. If - you didn't receive an email, please contact an administrator, the reset link will be - in the logs of MediaManager. - {:else} - Enter your email address and we'll send you a link to reset your password. - {/if} - - - - {#if isSuccess} -
-
-

- Password reset email sent successfully! -

-
-
-

Didn't receive the email? Check your spam folder or

- -
-
- {:else} -
-
- - -
- -
- {/if} - -
-
-
-
-
- -
+ + diff --git a/web/src/routes/login/reset-password/+page.svelte b/web/src/routes/login/reset-password/+page.svelte index b5b9d7f..2c402ac 100644 --- a/web/src/routes/login/reset-password/+page.svelte +++ b/web/src/routes/login/reset-password/+page.svelte @@ -81,80 +81,57 @@ -
-
-
- -
- MediaManager Logo -
-

Media Manager

+ + + Reset Password + Enter your new password below. + + +
+
+ + +
+
+ + +
+ +
+
-
-
- - - Reset Password - Enter your new password below. - - -
-
- - -
-
- - -
- -
- -
-
-
-
-
- -
+ + diff --git a/web/src/routes/login/signup/+page.svelte b/web/src/routes/login/signup/+page.svelte new file mode 100644 index 0000000..787770f --- /dev/null +++ b/web/src/routes/login/signup/+page.svelte @@ -0,0 +1,16 @@ + + + + Login - MediaManager + + + + diff --git a/web/src/routes/login/verify/+page.svelte b/web/src/routes/login/verify/+page.svelte index 760dc1f..810b5dc 100644 --- a/web/src/routes/login/verify/+page.svelte +++ b/web/src/routes/login/verify/+page.svelte @@ -11,33 +11,27 @@ -
-
- -
-
- -
-
-
- -
-

- Account Pending Activation -

-

- Your account has been successfully created, but activation by an administrator is required. -

-
- -
-

- The above button will only work once your account is verified. -

-

- If you have any questions, please contact an administrator. -

-
+
+
+
+
+ +
+

+ Account Pending Activation +

+

+ Your account has been successfully created, but activation by an administrator is required. +

+
+ +
+

+ The above button will only work once your account is verified. +

+

+ If you have any questions, please contact an administrator. +

+
+