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

Add Email to Sign / In and Sign Up Page, Settings Page, User can delete all Messages #232

Merged
merged 42 commits into from
Aug 2, 2024

Conversation

Gamius00
Copy link
Collaborator

@Gamius00 Gamius00 commented Jun 15, 2024

  • Added email field
  • user can create a delete all messages request and the other user can accept or reject
  • update userdata, user can update the own userdata (firstname, lastname, email)
Bildschirmaufnahme.2024-07-11.031549.mp4

Copy link

vercel bot commented Jun 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
chat-io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2024 11:53pm

  - Setings
  - Privacy
  - Notifications
  - Chats

- Added Emailformat check
  - Added Email to Sign Up Page
  - Added Email to Convex / Clerk
package.json Outdated Show resolved Hide resolved
  - Show Error is Email already taken.
Copy link

gitguardian bot commented Jun 19, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Gamius00 added 3 commits June 19, 2024 20:44
# Conflicts:
#	pnpm-lock.yaml
#	src/app/(internal-sites)/profile/page.tsx
#	src/app/(internal-sites)/profile/settings/page.tsx
@Gamius00 Gamius00 linked an issue Jul 9, 2024 that may be closed by this pull request
@Gamius00 Gamius00 marked this pull request as ready for review July 9, 2024 13:45
@Gamius00 Gamius00 changed the title Profile Redesign Add Email to Sign / In and Sign Up Page, Settings Page Jul 9, 2024
@Gamius00 Gamius00 linked an issue Jul 11, 2024 that may be closed by this pull request
@Gamius00 Gamius00 changed the title Add Email to Sign / In and Sign Up Page, Settings Page Add Email to Sign / In and Sign Up Page, Settings Page, User can delete all Messages Jul 11, 2024
@@ -79,6 +79,7 @@ export const initialConvexSetup = mutation({
username: identity.nickname,
clerkId: identity.tokenIdentifier,
firstName: identity.givenName,
email: identity.email,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Set the value of the emailfield

@@ -39,6 +39,56 @@ export const getMessages = query({
},
});

export const createDeleteRequest = mutation({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the mutation for creating a delete all messages request

deleted: false,
readBy: [convexUser._id],
});
},
});

export const deleteAllMessagesInChat = mutation({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the mutation for delete all messages

},
});

export const rejectRequest = mutation({
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the reject request mutation

@@ -22,6 +23,7 @@ const schema = defineEntSchema({

messages: defineEnt({})
.field("content", v.string())
.field("type", v.string(), { default: "message" })
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the type of a message.
I need a difference between the normal messages and the request messages

@@ -104,6 +104,7 @@ export default function Page({ params }: { params: { chatId: string } }) {
_creationTime: now,
content,
deleted: false,
type: "message",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the normal type of any message that is not a request

) : (
<div className="xl:mt-4">{user?.username}</div>
)}
<p className="my-10 text-xl font-bold sm:text-2xl">Profile</p>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is only the profilepage

},
{ status: 400 },
);
if (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a email error

@@ -274,11 +327,47 @@ export const Message = ({
<Ban />
<p className="ml-2.5">This message was deleted</p>
</div>
) : message.type != "message" ? (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added the UI of the delete messages request

@@ -25,6 +25,7 @@ const config = {
dark: "#005C8F",
white: "#009BFA",
},
accept: "#00834C",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added new color for the accept button

package.json Outdated
@@ -56,7 +56,7 @@
"sonner": "^1.5.0",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.23.8"
"zod": "3.23.8"

Choose a reason for hiding this comment

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

Make it as it was before (^^^^^^)

Choose a reason for hiding this comment

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

Whats this file doing? Why not use the same dialog as for the add user dialog?

@FleetAdmiralJakob FleetAdmiralJakob self-requested a review July 11, 2024 03:43
@FleetAdmiralJakob FleetAdmiralJakob dismissed their stale review July 11, 2024 03:43

was pressing wrong button

@Gamius00 Gamius00 linked an issue Aug 1, 2024 that may be closed by this pull request
@Gamius00 Gamius00 merged commit 0cc87e1 into main Aug 2, 2024
5 checks passed
@FleetAdmiralJakob FleetAdmiralJakob deleted the profile-redesign branch November 25, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants