diff --git a/tfweb/.gitignore b/tfweb/.gitignore index 6635cf5..1373e81 100644 --- a/tfweb/.gitignore +++ b/tfweb/.gitignore @@ -8,3 +8,4 @@ node_modules !.env.example vite.config.js.timestamp-* vite.config.ts.timestamp-* +src/lib/config.ts \ No newline at end of file diff --git a/tfweb/.idea/tfweb.iml b/tfweb/.idea/tfweb.iml index 0c8867d..1f1d598 100644 --- a/tfweb/.idea/tfweb.iml +++ b/tfweb/.idea/tfweb.iml @@ -5,6 +5,8 @@ + + diff --git a/tfweb/src/lib/config.example.ts b/tfweb/src/lib/config.example.ts new file mode 100644 index 0000000..f2da56c --- /dev/null +++ b/tfweb/src/lib/config.example.ts @@ -0,0 +1,2 @@ +// Set this to the API root of your trifid-api instance. +export const API_ROOT = "http://localhost:8000"; \ No newline at end of file diff --git a/tfweb/src/lib/config.ts b/tfweb/src/lib/config.ts new file mode 100644 index 0000000..f2da56c --- /dev/null +++ b/tfweb/src/lib/config.ts @@ -0,0 +1,2 @@ +// Set this to the API root of your trifid-api instance. +export const API_ROOT = "http://localhost:8000"; \ No newline at end of file diff --git a/tfweb/src/lib/i18n/en.json b/tfweb/src/lib/i18n/en.json index 115fc8f..3397001 100644 --- a/tfweb/src/lib/i18n/en.json +++ b/tfweb/src/lib/i18n/en.json @@ -9,5 +9,11 @@ "lightMode": "Light mode", "darkMode": "Dark mode", "changeLang": "Change language" + }, + "login": { + "title": "Log in to your account", + "subtitle": "We'll send you an email with a \"magic link\".", + "prompt": "What's your email?", + "actionButtonText": "Log in" } } \ No newline at end of file diff --git a/tfweb/src/routes/auth/login/+page.svelte b/tfweb/src/routes/auth/login/+page.svelte index ecc2ccf..bfffa73 100644 --- a/tfweb/src/routes/auth/login/+page.svelte +++ b/tfweb/src/routes/auth/login/+page.svelte @@ -1,17 +1,80 @@ -

{t('login.title')}

-

{t('login.subtitle')}

+
+
+ {#if !isFinished} + +
+

{t('login.title')}

+

{t('login.subtitle')}

+
-
- - - -
+ +
+
+ + + {#if hasError} + {error} + {/if} +
+ + +
+ {:else} + +
+

{t('login.sentMagicLink')}

+

{t('login.magicLinkExplainer')}

+
+ {/if} +
+
\ No newline at end of file