diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-12-24 15:15:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-24 13:15:46 +0000 |
| commit | ef27670f5c027be87d279b9b32553e980e55d888 (patch) | |
| tree | aa30e49787c17499abbe7a12b7a3353d13dbec7d /packages | |
| parent | f7d3462790652c6e5ecd90ae0d699e05b0320a97 (diff) | |
| download | karakeep-ef27670f5c027be87d279b9b32553e980e55d888.tar.zst | |
feat: show bookmark owner icon in shared lists (#2277)
* feat: Add owner icon to bookmarks in shared lists
Display a small icon showing the bookmark owner's name and email on hover when viewing bookmarks from other users in shared lists. The icon appears in the top-right corner of bookmark cards across all layout types (grid, list, compact).
Changes:
- Add user field to ZBookmark type to include owner name and email
- Update bookmark queries to fetch user information via join
- Create BookmarkOwnerIcon component with tooltip showing owner details
- Integrate owner indicator into BookmarkLayoutAdaptingCard for all layouts
- Only show icon for bookmarks not owned by current user
* use icons in more places
* remove tooltip providers
* fix non list context
---------
Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/trpc/models/listInvitations.ts | 1 | ||||
| -rw-r--r-- | packages/trpc/models/lists.ts | 4 | ||||
| -rw-r--r-- | packages/trpc/routers/lists.ts | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/packages/trpc/models/listInvitations.ts b/packages/trpc/models/listInvitations.ts index 6bdc8ffa..2e17fa2e 100644 --- a/packages/trpc/models/listInvitations.ts +++ b/packages/trpc/models/listInvitations.ts @@ -372,6 +372,7 @@ export class ListInvitation { // This protects user privacy until they accept name: "Pending User", email: invitation.user.email || "", + image: null, }, })); } diff --git a/packages/trpc/models/lists.ts b/packages/trpc/models/lists.ts index 0968492a..29945b92 100644 --- a/packages/trpc/models/lists.ts +++ b/packages/trpc/models/lists.ts @@ -719,6 +719,7 @@ export abstract class List { id: true, name: true, email: true, + image: true, }, }, }, @@ -738,6 +739,7 @@ export abstract class List { id: true, name: true, email: true, + image: true, }, }); @@ -754,6 +756,7 @@ export abstract class List { name: c.user.name, // Only show email to the owner for privacy email: isOwner ? c.user.email : null, + image: c.user.image, }, }; }); @@ -766,6 +769,7 @@ export abstract class List { name: owner.name, // Only show owner email to the owner for privacy email: isOwner ? owner.email : null, + image: owner.image, } : null, }; diff --git a/packages/trpc/routers/lists.ts b/packages/trpc/routers/lists.ts index 296679f3..bca3dc53 100644 --- a/packages/trpc/routers/lists.ts +++ b/packages/trpc/routers/lists.ts @@ -302,6 +302,7 @@ export const listsAppRouter = router({ id: z.string(), name: z.string(), email: z.string().nullable(), + image: z.string().nullable(), }), }), ), @@ -310,6 +311,7 @@ export const listsAppRouter = router({ id: z.string(), name: z.string(), email: z.string().nullable(), + image: z.string().nullable(), }) .nullable(), }), |
