Skip to content
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

Feature/change password dashboard #38

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ashmit-coder
Copy link
Contributor

FIxes: #18
Adds the funtionality to change password through dashboard.

src/routes/dashboard/+layout.svelte Outdated Show resolved Hide resolved
src/routes/dashboard/settings/+page.server.ts Outdated Show resolved Hide resolved
src/routes/dashboard/settings/+page.server.ts Outdated Show resolved Hide resolved
@ashmit-coder
Copy link
Contributor Author

Hey @Yureien any updates on this pr?

Copy link
Owner

@Yureien Yureien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested some changes

@@ -24,7 +24,7 @@
</script>

<div class="p-2 min-h-screen w-screen flex flex-col text-primary">
<div class="pb-4">
<div>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this empty div needed?

return { settings: user?.settings as UserSettings };
return {
settings: user?.settings as UserSettings,
username: user?.username as string,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think we need to use as string, since it is already a string.

>
{#if form?.defaultsForm !== undefined && form?.defaultsForm.success}
<span class="text-green-500">Saved</span>
<!-- {:else if form?.defaultsForm.error}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the commented lines please?

<button class="bg-amber-500 text-black text-lg px-4 py-1"
>Save</button
>
{#if form?.defaultsForm !== undefined && form?.defaultsForm.success}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be simplied as {#if form?.defaultsForm?.success}

>
{#if form?.passwordForm?.success}
<span class="text-green-500">Saved</span>
{/if}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use if/else here instead of two different if statements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard for users
2 participants