Skip to content

Commit 2124da6

Browse files
authored
Feat 572 user avatars (#607)
* Add image field to group table * Track package lock of opencode now that they migrated to node * Move upload logic to util file * Add fields for updating images on the backend * Implement profile picture upload * Allow clearing the profile picture * Rename updateName component to better match new features
1 parent 3262a64 commit 2124da6

17 files changed

Lines changed: 633 additions & 164 deletions

File tree

.opencode/package-lock.json

Lines changed: 115 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"react": "19.2.1",
6666
"react-day-picker": "^9.7.0",
6767
"react-dom": "19.2.1",
68+
"react-easy-crop": "^5.5.7",
6869
"react-hook-form": "^7.50.1",
6970
"react-i18next": "^15.5.3",
7071
"react-plaid-link": "4.1.1",

pnpm-lock.yaml

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- AlterTable
2+
ALTER TABLE "public"."Group"
3+
ADD COLUMN "image" TEXT;

prisma/schema.prisma

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ model Group {
9595
id Int @id @default(autoincrement())
9696
publicId String @unique
9797
name String
98+
image String?
9899
userId Int
99100
defaultCurrency String @default("USD")
100101
createdAt DateTime @default(now())

public/locales/en/common.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@
1818
},
1919
"download_splitpro_data": "Download SplitPro data",
2020
"edit_name": {
21+
"apply_avatar": "Apply avatar",
22+
"avatar_label": "Profile picture",
23+
"avatar_preview": "Avatar preview",
2124
"placeholder": "Enter name",
22-
"title": "Edit name"
25+
"remove_avatar": "Remove avatar",
26+
"select_avatar": "Select picture",
27+
"zoom": "Zoom",
28+
"title": "Edit details"
2329
},
2430
"follow_on_x": "Follow us on X",
2531
"import_from_splitwise": "Import from Splitwise",
@@ -35,8 +41,8 @@
3541
},
3642
"logout": "Logout",
3743
"messages": {
38-
"submit_error": "Failed to submit feedback",
39-
"submit_success": "Feedback submitted"
44+
"submit_error": "Failed to update details",
45+
"submit_success": "Details updated"
4046
},
4147
"notifications": {
4248
"disable_notification": "Disable notification",
@@ -251,6 +257,7 @@
251257
"group_info": {
252258
"actions": "Actions",
253259
"archive_group": "Archive group",
260+
"edit_group": "Edit group",
254261
"archive_group_details": {
255262
"can_archive": "This group will be archived and hidden from your main groups list. You can still access it later if needed.",
256263
"cant_archive": "Cannot archive group with outstanding balances. All balances must be settled first.",
@@ -292,7 +299,7 @@
292299
"messages": {
293300
"balances_recalculated": "Balances recalculated successfully",
294301
"group_archived": "Group archived successfully",
295-
"group_name_updated": "Updated group name"
302+
"group_name_updated": "Updated group details"
296303
},
297304
"no_members": {
298305
"add_members": "Add members",

0 commit comments

Comments
 (0)