-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backend connection to user login #115
Merged
Merged
Changes from 24 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
07678d7
add de localization for login, put data into component
MaHaWo cf3b2f3
Merge branch 'add-forgot-password-component' into add-backend-connect…
MaHaWo 6681845
use localization, remove some mock functions for backend
MaHaWo 98a5a65
add button styling
MaHaWo 9e2a73c
add new verify logic skeleton
MaHaWo 1a59ef1
Merge branch 'main' into add-backend-connection-to-user-login
MaHaWo 24c17a2
work on using backend in user registration
MaHaWo 5d92407
work on submission of data in userregistration
MaHaWo 60deb5b
add user registration verify and success page
MaHaWo 93d2b7e
remove commented out code
MaHaWo 2b2a4ca
update openapi.json & openapi-ts client, run pnpm format
github-actions[bot] 3f99112
Merge branch 'main' into add-backend-connection-to-user-login
MaHaWo 32f3aec
add role, e-mail to login
MaHaWo 2fc5758
add store for current user
MaHaWo 4c0e3a2
work on making login persistent
MaHaWo e914f4c
add localizations
MaHaWo f221554
update openapi.json & openapi-ts client, run pnpm format
github-actions[bot] 122d477
change around debug output
MaHaWo 38c296c
update openapi.json & openapi-ts client, run pnpm format
github-actions[bot] d13f4b4
add verified warning page
MaHaWo 8c4624f
Merge branch 'add-backend-connection-to-user-login' of github.com:ssc…
MaHaWo ebc9bb0
update openapi.json & openapi-ts client, run pnpm format
github-actions[bot] 4fce6e6
add data deletion
MaHaWo e1241e6
Merge branch 'add-backend-connection-to-user-login' of github.com:ssc…
MaHaWo 9d3e45f
some corrections
MaHaWo 46b1fa0
update openapi.json & openapi-ts client, run pnpm format
github-actions[bot] 8676995
add database writing to on_after_register
MaHaWo f149b6f
fix error in database rewriting
MaHaWo 4e43ab7
better comment
MaHaWo ac61c69
update comments
MaHaWo 39cc4b2
use async_session_maker and session.get to set user as verified
lkeegan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,53 @@ | ||
<script lang="ts"> | ||
import { activeTabChildren, activeTabPersonal, componentTable } from '$lib/stores/componentStore'; | ||
import { currentUser } from '$lib/stores/userStore'; | ||
import { TabItem, Tabs } from 'flowbite-svelte'; | ||
import { GridPlusSolid, ProfileCardSolid } from 'flowbite-svelte-icons'; | ||
import { get } from 'svelte/store'; | ||
import UserVerify from './UserVerify.svelte'; | ||
|
||
import { activeTabChildren, activeTabPersonal, componentTable } from '$lib/stores/componentStore'; | ||
import { onDestroy } from 'svelte'; | ||
|
||
export let userData: any[]; | ||
const isVerifed = get(currentUser)?.is_verified; | ||
let currentPersonal = 'userDataInput'; | ||
let currentChildren = 'childrenGallery'; | ||
export let userData: any[]; | ||
|
||
const unsubscribePersonal = activeTabPersonal.subscribe((value) => { | ||
console.log('personal tab: ', value); | ||
currentPersonal = value; | ||
}); | ||
|
||
const unsubscribeChildren = activeTabChildren.subscribe((value) => { | ||
console.log('children tab: ', value); | ||
currentChildren = value; | ||
}); | ||
|
||
onDestroy(() => { | ||
unsubscribeChildren(); | ||
unsubscribePersonal(); | ||
}); | ||
console.log('user: ', get(currentUser)); | ||
console.log(' verified: ', isVerifed); | ||
</script> | ||
|
||
<div class="m-2 p-2"> | ||
<Tabs tabStyle="pill"> | ||
<TabItem open={true}> | ||
<div slot="title" class="flex items-center gap-2 text-lg"> | ||
<ProfileCardSolid size="lg" /> | ||
Persönliche Daten | ||
</div> | ||
<svelte:component this={componentTable[currentPersonal]} data={userData} /> | ||
</TabItem> | ||
<TabItem> | ||
<div slot="title" class="flex items-center gap-2 text-lg"> | ||
<GridPlusSolid size="lg" /> | ||
Kinder | ||
</div> | ||
<svelte:component this={componentTable[currentChildren]} /> | ||
</TabItem> | ||
</Tabs> | ||
</div> | ||
{#if isVerifed === true} | ||
<div class="m-2 p-2"> | ||
<Tabs tabStyle="pill"> | ||
<TabItem open={true}> | ||
<div slot="title" class="flex items-center gap-2 text-lg"> | ||
<ProfileCardSolid size="lg" /> | ||
Persönliche Daten | ||
</div> | ||
<svelte:component this={componentTable[currentPersonal]} data={userData} /> | ||
</TabItem> | ||
<TabItem> | ||
<div slot="title" class="flex items-center gap-2 text-lg"> | ||
<GridPlusSolid size="lg" /> | ||
Kinder | ||
</div> | ||
<svelte:component this={componentTable[currentChildren]} /> | ||
</TabItem> | ||
</Tabs> | ||
</div> | ||
{:else} | ||
<UserVerify /> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes more sense to make the backend set is_verified=true on signup for now until #109 is implemented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok... did that now in
on_after_register
in the users.py file. find entry in database corresponding to the passeduser
object, set the verified flag -> write back to database.