-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
784 additions
and
7 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mutation ChangePassword($oldPassword: String!, $newPassword: String!) { | ||
changePassword( | ||
input: { oldPassword: $oldPassword, newPassword: $newPassword } | ||
) { | ||
success | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
apps/homepage/src/graphql/Model/User/ProfileSettingsForm_User.graphql
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fragment ProfileSettingsForm_User on User { | ||
id | ||
name | ||
username | ||
avatarUrl | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
mutation UpdateUser($id: UUID!, $patch: UserPatch!) { | ||
updateUser(input: { id: $id, patch: $patch }) { | ||
clientMutationId | ||
user { | ||
id | ||
name | ||
username | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
apps/homepage/src/graphql/Model/UserEmail/AddEmail.graphql
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#import "./EmailsForm_UserEmail.graphql" | ||
|
||
mutation AddEmail($email: String!) { | ||
createUserEmail(input: { userEmail: { email: $email } }) { | ||
user { | ||
id | ||
userEmails(first: 50) { | ||
nodes { | ||
id | ||
...EmailsForm_UserEmail | ||
} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
apps/homepage/src/graphql/Model/UserEmail/DeleteEmail.graphql
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#import "./EmailsForm_UserEmail.graphql" | ||
|
||
mutation DeleteEmail($emailId: UUID!) { | ||
deleteUserEmail(input: { id: $emailId }) { | ||
user { | ||
id | ||
userEmails(first: 50) { | ||
nodes { | ||
id | ||
...EmailsForm_UserEmail | ||
} | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/homepage/src/graphql/Model/UserEmail/EmailsForm_User.graphql
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#import "./EmailsForm_UserEmail.graphql" | ||
|
||
fragment EmailsForm_User on User { | ||
id | ||
userEmails(first: 50) { | ||
nodes { | ||
...EmailsForm_UserEmail | ||
id | ||
isVerified | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
apps/homepage/src/graphql/Model/UserEmail/EmailsForm_UserEmail.graphql
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fragment EmailsForm_UserEmail on UserEmail { | ||
id | ||
isVerified | ||
isPrimary | ||
createdAt | ||
} |
13 changes: 13 additions & 0 deletions
13
apps/homepage/src/graphql/Model/UserEmail/MakeEmailPrimary.graphql
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
mutation MakeEmailPrimary($emailId: UUID!) { | ||
makeEmailPrimary(input: { emailId: $emailId }) { | ||
user { | ||
id | ||
userEmails(first: 50) { | ||
nodes { | ||
id | ||
isPrimary | ||
} | ||
} | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
apps/homepage/src/graphql/Pages/Settings/SettingsEmailsPage.graphql
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#import "./EmailsForm_User.graphql" | ||
|
||
query SettingsEmailsPage { | ||
...SharedLayout_Query | ||
currentUser { | ||
id | ||
isVerified | ||
...EmailsForm_User | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
apps/homepage/src/graphql/Pages/Settings/SettingsPasswordPage.graphql
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
query SettingsPasswordPage { | ||
currentUser { | ||
id | ||
hasPassword | ||
userEmails(first: 1, condition: { isPrimary: true }) { | ||
nodes { | ||
id | ||
} | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
apps/homepage/src/graphql/Pages/Settings/SettingsProfilePage.graphql
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#import "./ProfileSettingsForm_User.graphql" | ||
|
||
query SettingsProfilePage { | ||
...SharedLayout_Query | ||
currentUser { | ||
id | ||
...ProfileSettingsForm_User | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { SharedLayoutLoggedIn } from "@/components/SharedLayoutLoggedIn"; | ||
import { Link, Text } from "@chakra-ui/react"; | ||
import { supportEmail } from "@repo/config"; | ||
import { useSharedQuery } from "@repo/graphql"; | ||
import { NextPage } from "next"; | ||
import React from "react"; | ||
|
||
const Settings_Accounts: NextPage = () => { | ||
const query = useSharedQuery(); | ||
return ( | ||
<SharedLayoutLoggedIn title="Delete Account" query={query} noHandleErrors> | ||
<Text> | ||
Automatic deletion is not supported yet. If you want to proceed, please | ||
send an email to{" "} | ||
<Link href={`mailto:${supportEmail}`}>{supportEmail}</Link>. Sorry for | ||
the inconvenience. | ||
</Text> | ||
</SharedLayoutLoggedIn> | ||
); | ||
}; | ||
|
||
export default Settings_Accounts; |
Oops, something went wrong.