diff --git a/frontend/src/lib/components/UserLogin.svelte b/frontend/src/lib/components/UserLogin.svelte index edf17fa1..8be01585 100644 --- a/frontend/src/lib/components/UserLogin.svelte +++ b/frontend/src/lib/components/UserLogin.svelte @@ -131,7 +131,7 @@ @@ -140,7 +140,7 @@ Not registered? Create account diff --git a/frontend/src/lib/components/UserRegistration.svelte b/frontend/src/lib/components/UserRegistration.svelte index 21feb3de..3540adee 100644 --- a/frontend/src/lib/components/UserRegistration.svelte +++ b/frontend/src/lib/components/UserRegistration.svelte @@ -9,45 +9,42 @@ import { CheckCircleOutline } from 'flowbite-svelte-icons'; import { _ } from 'svelte-i18n'; - const userData: RegisterRegisterData = { body: { - email: "", - password: "" + email: '', + password: '' } }; async function submitData() { - - const equalPW = data[1].value !== "" && data[2].value === data[1].value; + const equalPW = data[1].value !== '' && data[2].value === data[1].value; if (equalPW) { - userData.body.email = data[0].value - userData.body.password = data[1].value - const result = await registerRegister(userData) + userData.body.email = data[0].value; + userData.body.password = data[1].value; + const result = await registerRegister(userData); if (result.error) { - console.log('error: ', result.error); + console.log('error: ', result.error); showAlert = true; - data.map((element)=> {element.value = "";}); - } - else { + data.map((element) => { + element.value = ''; + }); + } else { console.log('successful transmission: ', result.response.status); - success=true; + success = true; } - } - else { - showAlert = true; - alertMessage = $_('registration.alertMessagePasswords') + } else { + showAlert = true; + alertMessage = $_('registration.alertMessagePasswords'); } } - const data = [ { component: Input, props: { - label: $_('registration.emailLabel'), + label: $_('registration.emailLabel'), type: 'email', placeholder: $_('registration.emailLabel'), required: true, @@ -65,7 +62,6 @@ id: 'password' }, value: '' - }, { component: Input, @@ -82,7 +78,7 @@ let showAlert: boolean = false; let success: boolean = false; - let alertMessage = $_('registration.alertMessageMissing'); + let alertMessage = $_('registration.alertMessageMissing'); @@ -93,13 +89,13 @@ infopage="{base}/info" infotitle="Was passiert mit den Daten" onclick={() => { - showAlert = false; + showAlert = false; }} /> {/if} - + {$_('registration.submitButtonLabel')} + type="submit" + class="dark:bg-primay-700 w-full bg-primary-700 text-center text-sm text-white hover:bg-primary-800 hover:text-white dark:hover:bg-primary-800" + >{$_('registration.submitButtonLabel')} {:else} -
- +
+
- {$_('registration.successMessage')} + {$_('registration.successMessage')}
- {/if} diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 2f480037..15cba320 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -38,8 +38,8 @@ "images": "Bilder" }, "registration": { - "heading": "Als neuer Benutzer registrieren", - "alertMessageMissing": "Bitte füllen Sie alle Felder aus.", + "heading": "Als neuer Benutzer registrieren", + "alertMessageMissing": "Bitte füllen Sie alle Felder aus.", "alertMessagePasswords": "Passwörter stimmen nicht überein", "alertMessageTitle": "Fehler", "usernameLabel": "Benutzername", @@ -51,8 +51,8 @@ "scientistRole": "Wissenschaftler", "adminRole": "Admin", "submitButtonLabel": "Absenden", - "selectPlaceholder": "Bitte auswählen", - "successMessage": "Bitte überprüfen sie ihr E-Mail Postfach", + "selectPlaceholder": "Bitte auswählen", + "successMessage": "Bitte überprüfen sie ihr E-Mail Postfach", "goHome": "Zur Hauptseite" }, "login": { diff --git a/frontend/src/routes/userLand/userRegistration/+page.svelte b/frontend/src/routes/userLand/userRegistration/+page.svelte index 52c3eade..104f34b5 100644 --- a/frontend/src/routes/userLand/userRegistration/+page.svelte +++ b/frontend/src/routes/userLand/userRegistration/+page.svelte @@ -1,6 +1,5 @@