diff --git a/frontend/.npmrc b/frontend/.npmrc index b6f27f1..fbf7f9a 100644 --- a/frontend/.npmrc +++ b/frontend/.npmrc @@ -1 +1,2 @@ engine-strict=true +auto-install-peers=true diff --git a/frontend/src/lib/LoginForm.svelte b/frontend/src/lib/LoginForm.svelte index 6fb6f81..ec1c4c1 100644 --- a/frontend/src/lib/LoginForm.svelte +++ b/frontend/src/lib/LoginForm.svelte @@ -1,11 +1,19 @@ -
+ +

{description}

+ + + +
+ + + {#if api_endpoint === 'login'} + + {/if} + + {#await promise} +

+ {:then} +

+ {:catch error} + + {/await} + -{#await promise} -

Logging in...

-{:then} -

-{:catch error} -

{error}

-{/await} - - diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte new file mode 100644 index 0000000..3022560 --- /dev/null +++ b/frontend/src/routes/+layout.svelte @@ -0,0 +1,25 @@ + + + + +
+ +
+ + diff --git a/frontend/src/routes/+layout.ts b/frontend/src/routes/+layout.ts index c8cacf0..189f71e 100644 --- a/frontend/src/routes/+layout.ts +++ b/frontend/src/routes/+layout.ts @@ -1 +1 @@ -export const prerender = true; \ No newline at end of file +export const prerender = true; diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 350dab7..b589ee2 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,6 +1,4 @@ +Pomme +

Welcome to pomme!

There will be something here one day :)

- -Login -Register -Logout diff --git a/frontend/src/routes/login/+page.svelte b/frontend/src/routes/login/+page.svelte index 190bf70..fa773f4 100644 --- a/frontend/src/routes/login/+page.svelte +++ b/frontend/src/routes/login/+page.svelte @@ -2,4 +2,4 @@ import LoginForm from '$lib/LoginForm.svelte'; - + diff --git a/frontend/src/routes/logout/+page.svelte b/frontend/src/routes/logout/+page.svelte index 6b39660..705a10f 100644 --- a/frontend/src/routes/logout/+page.svelte +++ b/frontend/src/routes/logout/+page.svelte @@ -13,6 +13,8 @@ }); +

Logging out...

+Click here if you do not get redirected automatically. {#await promise}

{:then} diff --git a/frontend/src/routes/register/+page.svelte b/frontend/src/routes/register/+page.svelte index 4da5eb7..3ff4a66 100644 --- a/frontend/src/routes/register/+page.svelte +++ b/frontend/src/routes/register/+page.svelte @@ -2,4 +2,4 @@ import LoginForm from '$lib/LoginForm.svelte'; - + diff --git a/frontend/src/routes/upload/+page.svelte b/frontend/src/routes/upload/+page.svelte new file mode 100644 index 0000000..e69de29 diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js index 167dfb9..98a5f76 100644 --- a/frontend/svelte.config.js +++ b/frontend/svelte.config.js @@ -1,11 +1,12 @@ import adapter from '@sveltejs/adapter-static'; +import { optimizeImports } from 'carbon-preprocess-svelte'; import { vitePreprocess } from '@sveltejs/kit/vite'; /** @type {import('@sveltejs/kit').Config} */ const config = { // Consult https://kit.svelte.dev/docs/integrations#preprocessors // for more information about preprocessors - preprocess: vitePreprocess(), + preprocess: [vitePreprocess(), optimizeImports()], kit: { adapter: adapter()