Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mabu2807 committed Jul 18, 2024
1 parent eeaee52 commit 3eae10a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 25 deletions.
7 changes: 2 additions & 5 deletions src/components/login/Login.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,8 @@
</div>

<div class="flex flex-row mt-3 justify-center text-center">
<button
on:click={handleSubmit}
disabled={!allInputFieldsFilled}
class="btn variant-filled-primary"
type="submit">{$t('login.submit.btn')}</button
<button disabled={!allInputFieldsFilled} class="btn variant-filled-primary" type="submit"
>{$t('login.submit.btn')}</button
>
</div>
</form>
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils/ErrorHandling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function handleRequestError(
toastStore: ToastStore,
resourceType: string | undefined
) {
toastStore.clear();
switch (status) {
case 401:
unauthorizedError(toastStore);
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<!--General layout of the pages-->
<Toast />
<Modal zIndex="1" components={modalRegistry} />
<Modal zIndex="10" components={modalRegistry} />
<!--Fixed layout: navbar at the top, then main content and footer at the bottom for each page-->
<AppShell>
<svelte:fragment slot="header"><Navbar /></svelte:fragment>
Expand Down
5 changes: 2 additions & 3 deletions src/routes/profile/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
editMode = false;
toastStore.trigger(createToast($t('profile.userDetails.changed'), 'success'));
newProfilePicture.set(undefined);
window.location.reload();
}
}
Expand Down Expand Up @@ -158,7 +157,7 @@
</script>

{#if profileData.statusCode == 200}
<main class=" flex flex-col items-center justify-start mt-[90px]">
<main class=" flex flex-col items-center justify-start mt-[90px] h-screen">
<div
class=" w-full min-h-[35vh] flex flex-col md:flex-row justify-center items-center border-b-4 border-indigo-800"
>
Expand Down Expand Up @@ -291,5 +290,5 @@
</div>
</main>
{:else}
<p class="text-2xl">{$t('profile.noUser')}</p>
<p class="text-2xl flex h-[80vh] justify-center items-center">{$t('profile.noUser')}</p>
{/if}
22 changes: 6 additions & 16 deletions src/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,9 @@ export default {
'profile.placeholder.newNickname': 'Set new nickname',
'profile.placeholder.newStatus': 'Set new status',
'profile.changeProfilePicture': 'Change Picture',
'prolile.userDetails.notFound': 'Userdetails not found',
'profile.userDetails.changed': 'Userdetails successfully changed',
'profile.userDetails.notChanged': 'Userdetails unsuccessfully changed',
'toastmessage.profile.follow.success': 'User successfully followed',
'toastmessage.profile.follow.error': 'User unsuccessfully followed',
'toastmessage.profile.unfollow.success': 'User successfully unfollowed',
'toastmessage.profile.unfollow.error': 'User unsuccessfully unfollowed',
'toastmessage.profile.changeUserDetails.success': 'Userdetails successfully changed',
'toastmessage.profile.changeUserDetails.error': 'Userdetails unsuccessfully changed',
'search.users.placeholder': 'Search for users...',
'search.users.noResults': 'No users found!',
'search.posts.noResults': 'No posts found!',
Expand Down Expand Up @@ -201,11 +195,12 @@ export default {
'requestError.resourceType.any': 'Ressource',
'requestError.notFound': 'not found',
'requestError.unauthorized': 'Unauthorized! You will now be logged out!',
'requestError.forbidden': 'Forbidden',
'requestError.forbidden': 'Forbidden! Please check your inputs!',
'requestError.internalServerError':
'An internal server error occurred. Please try again later.',
'requestError.unknown': 'An unknown error occurred. Please try again later.',
'requestError.password.wrong': 'Password is wrong'
'requestError.password.wrong':
'The credentials are invalid. Please check the credentials and try again.'
},
de: {
'imprint.frontend.header': 'Impressum Frontend',
Expand Down Expand Up @@ -319,15 +314,9 @@ export default {
'profile.placeholder.newNickname': 'Neuen Spitznamen eingeben',
'profile.placeholder.newStatus': 'Neuen Status eingeben',
'profile.changeProfilePicture': 'Bild ändern',
'prolile.userDetails.notFound': 'Userdetails nicht gefunden',
'profile.userDetails.changed': 'Nutzerdetails erfolgreich geändert',
'profile.userDetails.notChanged': 'Nutzerdetails konnten nicht geändert werden',
'toastmessage.profile.follow.success': 'User erfolgreich abonniert',
'toastmessage.profile.follow.error': 'Fehler beim Abonnieren des Users',
'toastmessage.profile.unfollow.success': 'User erfolgreich deabonniert',
'toastmessage.profile.unfollow.error': 'Fehler beim Deabonnieren des Users',
'toastmessage.profile.changeUserDetails.success': 'Userdetails erfolgreich geändert',
'toastmessage.profile.changeUserDetails.error': 'Userdetails konnten nicht geändert werden',
'search.users.placeholder': 'Suche Nutzer...',
'search.users.noResults': 'Keine Nutzer gefunden!',
'search.posts.noResults': 'Keine Beiträge gefunden!',
Expand Down Expand Up @@ -407,13 +396,14 @@ export default {
'requestError.resourceType.any': 'Ressource',
'requestError.notFound': 'konnte nicht gefunden werden',
'requestError.unauthorized': 'Zugriff ist nicht erlaubt! Sie werden nun ausgeloggt!',
'requestError.forbidden': 'Zugriff ist nicht erlaubt',
'requestError.forbidden': 'Zugriff verweigert! Bitte überprüfen Sie Ihre Eingaben!',
'requestError.internalServerError':
'Ein interner Serverfehler ist aufgetreten. Bitte versuche es später erneut.',
'requestError.badRequest':
'Ein unbekannter Fehler ist aufgetreten. Bitte versuche es später erneut.',
'requestError.unknown':
'Ein unbekannter Fehler ist aufgetreten. Bitte versuche es später erneut.',
'requestError.password.wrong': 'Passwort ist falsch'
'requestError.password.wrong':
'Die Anmeldeinformationen sind ungültig. Bitte überprüfen Sie die Anmeldedaten und versuchen Sie es erneut.'
}
};

0 comments on commit 3eae10a

Please sign in to comment.