aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/preview (follow)
Commit message (Collapse)AuthorAgeFilesLines
* feat: Add notes feature to highlights (#2154)Mohamed Bassem2025-11-232-44/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Add note-taking functionality to highlights This commit adds the ability to add and edit notes on highlights, allowing users to capture their thoughts alongside highlighted text. Changes: - Updated zUpdateHighlightSchema to include optional note field - Modified Highlight.update() method to persist notes to database - Added note button (MessageSquare icon) beside color picker in highlight menu - Implemented note dialog with textarea for adding/editing notes - Updated Highlight interface to include optional note field - Modified ReaderView to pass notes through create and update operations - Enhanced HighlightCard to display notes below highlighted text The note button appears alongside the color picker for both new and existing highlights. Notes are displayed in a smaller, muted font below the highlighted text in the HighlightCard component. * refactor: Convert highlight UI to inline form Changed the highlight creation/editing interface from a modal dialog to an inline form for a more streamlined user experience. Changes: - Replaced ColorPickerMenu and Dialog with a unified HighlightForm component - Form now displays color selector and note textarea together inline - Added labels for "Color" and "Note" sections - Textarea is now optional and inline (placeholder: "Add a note (optional)...") - Consolidated Save and Cancel buttons in the form - Delete button appears only for existing highlights - Removed MessageSquare icon - notes are now always visible in the form - Simplified state management by removing separate dialog state The form appears in a popover when text is selected or an existing highlight is clicked, showing both color options and note input in a single 320px wide form. * fixes --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add collaborative lists (#2146)Mohamed Bassem2025-11-177-38/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Add collaborative lists backend implementation This commit implements the core backend functionality for collaborative lists, allowing multiple users to share and interact with bookmark lists. Database changes: - Add listCollaborators table to track users with access to lists and their roles (viewer/editor) - Add addedBy field to bookmarksInLists to track who added bookmarks - Add relations for collaborative list functionality Access control updates: - Update List model to support role-based access (owner/editor/viewer) - Add methods to check and enforce permissions for list operations - Update Bookmark model to allow access through collaborative lists - Modify bookmark queries to include bookmarks from collaborative lists List collaboration features: - Add/remove/update collaborators - Get list of collaborators - Get lists shared with current user - Only manual lists can have collaborators tRPC procedures: - addCollaborator: Add a user as a collaborator to a list - removeCollaborator: Remove a collaborator from a list - updateCollaboratorRole: Change a collaborator's role - getCollaborators: Get all collaborators for a list - getSharedWithMe: Get all lists shared with the current user - cloneBookmark: Clone a bookmark to the current user's collection Implementation notes: - Editors can add/remove bookmarks from the list (must own the bookmark) - Viewers can only view bookmarks in the list - Only the list owner can manage collaborators and list metadata - Smart lists cannot have collaborators (only manual lists) - Users cannot edit bookmarks they don't own, even in shared lists * feat: Add collaborative lists frontend UI This commit implements the frontend user interface for collaborative lists, allowing users to view shared bookmarks and manage list collaborators. New pages: - /dashboard/shared: Shows bookmarks from lists shared with the user - Displays bookmarks from all collaborative lists - Uses SharedBookmarks component - Shows empty state when no lists are shared Navigation: - Added "Shared with you" link to sidebar with Users icon - Positioned after "Home" in main navigation - Available in both desktop and mobile sidebar Collaborator management: - ManageCollaboratorsModal component for managing list collaborators - Add collaborators by user ID with viewer/editor role - View current collaborators with their roles - Update collaborator roles inline - Remove collaborators - Shows empty state when no collaborators - Integrated into ListOptions dropdown menu - Accessible via "Manage Collaborators" menu item Components created: - SharedBookmarks.tsx: Server component fetching shared lists/bookmarks - ManageCollaboratorsModal.tsx: Client component with tRPC mutations - /dashboard/shared/page.tsx: Route for shared bookmarks page UI features: - Role selector for viewer/editor permissions - Real-time collaborator list updates - Toast notifications for success/error states - Loading states for async operations - Responsive design matching existing UI patterns Implementation notes: - Uses existing tRPC endpoints (getSharedWithMe, getCollaborators, etc.) - Follows established modal patterns from ShareListModal - Integrates seamlessly with existing list UI - Currently uses user ID for adding collaborators (email lookup TBD) * fix typecheck * add collaborator by email * add shared list in the sidebar * fix perm issue * hide UI components from non list owners * list leaving * fix shared bookmarks showing up in homepage * fix getBookmark access check * e2e tests * hide user specific fields from shared lists * simplify bookmark perm checks * disable editable fields in bookmark preview * hide lists if they don't have options * fix list ownership * fix highlights * move tests to trpc * fix alignment of leave list * make tag lists unclickable * allow editors to remove from list * add a badge for shared lists * remove bookmarks of user when they're removed from a list * fix tests * show owner in the manage collab modal * fix hasCollab * drop shared with you * i18n * beta badge * correctly invalidate caches on collab change * reduce unnecessary changes * Add ratelimits * stop manually removing bookmarks on remove * some fixes * fixes * remove unused function * improve tests --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add support for user uploaded files (#2100)Mohamed Bassem2025-11-081-26/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add user file upload support for bookmarks Add a new "user-uploaded" asset type that allows users to upload and attach their own files to bookmarks from the attachment box in the bookmark preview page. Changes: - Add USER_UPLOADED asset type to database schema - Add userUploaded to zAssetTypesSchema for type safety - Update attachment permissions to allow attaching/detaching user files - Add fileName field to asset schema for displaying custom filenames - Add "Upload File" button in AttachmentBox component - Display actual filename for user-uploaded files - Allow any file type for user uploads (respects existing upload limits) - Add Upload icon for user-uploaded files Fixes #1863 related asset attachment improvements * fix: ensure fileName is returned and remove edit button for user uploads - Fix attachAsset mutation to fetch and return complete asset with fileName instead of just returning the input (which lacks fileName) - Remove replace/edit button for user-uploaded files - users can only delete and re-upload instead - This ensures the filename displays correctly in the UI immediately after upload Fixes fileName propagation issue for user-uploaded assets * fix asset file name * remove filename from attach asset api --------- Co-authored-by: Claude <noreply@anthropic.com>
* chore: Silence lint on <a> and <img> tags when it's intentionalMohamed Bassem2025-09-281-0/+3
|
* fix: Incremental polling interval for ongoing crawlsMohamed Bassem2025-08-311-6/+2
|
* fix: preserve selected section in link preview in query paramsMohamedBassem2025-08-231-2/+4
|
* fix(security): Add CSP policies on asset serving pathMohamedBassem2025-08-231-0/+1
|
* feat: Add an error boundary around the custom rendererMohamedBassem2025-08-041-2/+35
|
* feat(web): Add special cards for specific websites. Fixes #1344MohamedBassem2025-08-039-2/+465
|
* feat: Render author, publisher and pub data in the bookmark viewMohamed Bassem2025-07-261-1/+49
|
* fix: Avoid prefetching assets and tags in the link component. Fixes #1759Mohamed Bassem2025-07-261-0/+2
|
* feat: Add a proper reader modeMohamed Bassem2025-07-194-157/+206
|
* fix(web): Add icons to preview selectorsMohamed Bassem2025-07-041-4/+19
|
* chore: migrate away from eslint to oxlint (#1642)xuatz2025-06-221-3/+4
| | | | | | | * chore: migrate away from eslint to oxlint * revert turbo task name lint * it seems like we can remove the seemingly default globals
* refactor: Move bookmark utils from shared-react to sharedMohamed Bassem2025-05-314-5/+5
|
* fix(web): Switch to a tab view in small screens for bookmark previewsOlicorne2025-05-181-36/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: Implement tabbed layout for bookmark preview content and details * feat: Enable swipe gesture to switch between content and details tabs * feat: add scroll-based tab bar hide/show functionality * fix: adjust tab bar layout to maintain content space when hidden * fix: bg-muted was stopping midway in the background * fix: disable mouse tracking for swipe detection in BookmarkPreview * fix: improve scroll behavior to prevent glitchy tab bar animation * Update apps/web/components/dashboard/preview/BookmarkPreview.tsx Co-authored-by: xuatz <xzlow10@gmail.com> * Update apps/web/components/dashboard/preview/BookmarkPreview.tsx Co-authored-by: xuatz <xzlow10@gmail.com> * feat: add responsive layout with tabs and swipe for BookmarkPreview * Remove react swipe, scroll handlers and do screen detection using media queries * Revert the grey background for the main content * remove react-swip from the package.json * more fixes * Fix the black area under the tab bar --------- Co-authored-by: xuatz <xzlow10@gmail.com> Co-authored-by: Mohamed Bassem <me@mbassem.com>
* feat: position highlight menu based on device type (#1348)Mark :)2025-05-181-6/+17
| | | | | * feat: position highlight menu based on device type * fix: re-run prettier
* fix: Rename cached content into reader modeMohamed Bassem2025-04-211-4/+4
|
* fix: Dont download html content by default in the bookmark grid. Fixes #1198Mohamed Bassem2025-04-131-14/+22
|
* chore: Rename hoarder packages to karakeepMohamedBassem2025-04-128-18/+18
|
* feat: Allow editing bookmark detailsMohamedBassem2025-04-083-63/+32
|
* ui(web): Clicking view original now opens in a blank tab. Fixes #1114 (#1196)ekambains2025-04-051-0/+1
|
* feat: Add a setting page to manage assets. Fixes #730Mohamed Bassem2025-02-231-30/+5
|
* feat: Add PDF screenshot generation and display (#995)Ahmad Mujahid2025-02-172-28/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Updated pdf2json to 3.1.5 * Extract and store a screenshot from PDF files using pdf2pic * Installing graphicsmagick and ghostscript * Generate Missing PDF screenshot with tidyAssets worker for backward support * Display PDF screenshot instead of the PDF in web if it exists. * Display PDF screenshot in mobile app if exists. * Updated pnpm-lock.yaml * Removed console.log * Revert the unnecessary changes in package.json * Revert pnpm-lock changes * Prevent rendering PDF files if the screenshot is not generated * refactor: replace useEffect with useMemo for section initialization * feat: show PDF file download button and handle large PDFs by defaulting to screenshot view * feat: add file size to openapi spec * feature: Add Assets preprocessing in fix mode to admin actions * i18n: add reprocess_assets_fix_mode translation * i18n: Add missing ar translations * A bunch of fixes * Fix openspec schema --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* fix: Dont rearchive singlefile uploads and consider them as archivesMohamed Bassem2025-02-021-2/+7
|
* fix: Keep user selection on text highlightMohamed Bassem2025-01-121-4/+30
|
* feat: Add support for singlefile extension uploads. #172Mohamed Bassem2025-01-111-0/+1
|
* fix: Fix truncated long text in bookmark preview modal. Fixe #793Mohamed Bassem2025-01-051-1/+1
|
* feat: Add delete bookmark confirmation dialog. Fixes #776 (#787)Nicole Li2024-12-311-22/+15
|
* feat: Implement the all highlights page. Fixes #620Mohamed Bassem2024-12-283-76/+9
|
* feat: Implement highlights support for links. Fixes #620Mohamed Bassem2024-12-275-6/+524
|
* feature: WYSIWYG markdown for notes. Fixes #701 (#715)Giuseppe2024-12-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #701 Improve note support : WYSIWYG markdown First implementation with a wysiwyg markdown editor. Update: - Add Lexical markdown editor - consistent rendering between card and preview - removed edit modal, replaced by preview with save action - simple markdown shortcut: underline, bold, italic etc... * #701 Improve note support : WYSIWYG markdown improved performance to not rerender all note card when one is updated * Use markdown shortcuts * Remove the alignment actions * Drop history buttons * Fix code and highlighting buttons * Remove the unneeded update markdown plugin * Remove underline support as it's not markdown native * - added ListPlugin because if absent, there's a bug where you can't escape a list with enter + enter - added codeblock plugin - added prose dark:prose-invert prose-p:m-0 like you said (there's room for improvement I think, don't took the time too deep dive in) and removed theme - Added a switch to show raw markdown - Added back the react markdown for card (SSR) * delete theme.ts * add theme back for code element to be more like prism theme from markdown-readonly * move the new editor back to the edit menu * move the bookmark markdown component into dashboard/bookmark * move the tooltip into its own component * move save button to toolbar * Better raw markdown --------- Co-authored-by: Giuseppe Lapenta <giuseppe.lapenta@enovacom.com> Co-authored-by: Mohamed Bassem <me@mbassem.com>
* feature: Add i18n support. Fixes #57 (#635)Mohamed Bassem2024-11-174-11/+23
| | | | | | | | | | | | | * feature(web): Add basic scaffolding for i18n * refactor: Switch most of the app's strings to use i18n strings * fix: Remove unused i18next-resources-for-ts command * Add user setting * More translations * Drop the german translation for now
* feature: Archive videos using yt-dlp. Fixes #215 (#525)kamtschatka2024-10-282-0/+21
| | | | | | | | | | | | | | | | | | | | | * Allow downloading more content from a webpage and index it #215 Added a worker that allows downloading videos depending on the environment variables refactored the code a bit added new video asset updated documentation * Some tweaks * Drop the dependency on the yt-dlp wrapper * Update openapi specs * Dont log an error when the url is not supported * Better handle supported websites that dont download anything --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
* feature: Add a summarize with AI button for linksMohamed Bassem2024-10-271-0/+2
|
* refactor: Start tracking bookmark assets in the assets tableMohamedBassem2024-10-061-55/+57
|
* feature: Allow attaching custom banners to notes. Fixes: #106MohamedBassem2024-10-052-3/+27
|
* feature: Persevere the source URL of clipped texts from the extension.MohamedBassem2024-10-051-10/+1
| | | | Fixes #448
* feature(web): Show attachments and allow users to manipulate them.MohamedBassem2024-09-222-0/+211
|
* feature(web): Manage tags in bulk actionsMohamedBassem2024-09-011-2/+2
|
* refactor: added the bookmark type to the database (#256)kamtschatka2024-07-015-16/+20
| | | | | | | | | | | | | | | | | * refactoring asset types Extracted out functions to silently delete assets and to update them after crawling Generalized the mapping of assets to bookmark fields to make extending them easier * Added the bookmark type to the database Introduced an enum to have better type safety cleaned up the code and based some code on the type directly * add BookmarkType.UNKNWON * lint and remove unused function --------- Co-authored-by: MohamedBassem <me@mbassem.com>
* feature: add support for PDF links. Fixes #28 (#216)kamtschatka2024-06-221-2/+14
| | | | | | | | | | | | | | | | | * feature request: pdf support #28 Added a new sourceUrl column to the asset bookmarks Added transforming a link bookmark pointing at a pdf to an asset bookmark made sure the "View Original" link is also shown for asset bookmarks that have a sourceURL updated gitignore for IDEA * remove pdf parsing from the crawler * extract the http logic into its own function to avoid duplicating the post-processing actions (openai/index) * Add 5s timeout to the content type fetch --------- Co-authored-by: MohamedBassem <me@mbassem.com>
* feature(web): Add syntax highlighting to code blocks and a quick copy ↵kamtschatka2024-06-091-4/+2
| | | | | | | | | | | | | | | | | button. Fixes #195 (#197) * Any plans to support copy to clipboard (markdown code) for notes? #195 added a button to copy the markdown and added code highlighting * Any plans to support copy to clipboard (markdown code) for notes? #195 Changed the copy-button to a generic one added a safeguard and a message to the copy button if copying is not possible * Some code cleanups --------- Co-authored-by: kamtschatka <simon.schatka@gmx.at> Co-authored-by: MohamedBassem <me@mbassem.com>
* feature: Full page archival with monolith. Fixes #132MohamedBassem2024-05-261-0/+18
|
* ui(web): Set tag input field in preview modal to 100% width to fix overflow ↵Cari2024-05-191-2/+2
| | | | | | | issues on select dropdown (#165) ui(web): Fixed issue with rounded corners on tag input field in preview modal ui(web): Adjusted styles for labels and fields in preview modal for visual consistency
* feature(web): Clicking an image in the preview modal will open it in a new ↵Cari2024-05-161-6/+12
| | | | tab (#159)
* ui(web): Fixed overflow issues for very long titles (#152)Cari2024-05-161-2/+2
| | | | | | | | | | | * ui(web): Titles that exceed the allotted space now terminate with an ellipsis ui(web): Very long titles now break in edit mode instead of overflowing horizontally * ui(web): Titles on bookmark cards longer than two lines will terminate with an ellipsis ui(web): Tooltips for long titles now wrap to multiple lines as needed ui(web): Aligned titles in preview panes to the left margin
* feature: Take full page screenshots #143 (#148)kamtschatka2024-05-121-2/+4
| | | | | | Added the fullPage flag to take full screen screenshots updated the UI accordingly to properly show the screenshots instead of scaling it down Co-authored-by: kamtschatka <simon.schatka@gmx.at>
* feature(web): Add ability to rename, merge and fast delete tags. Fixes #105 ↵Mohamed Bassem2024-04-251-130/+25
| | | | | | | (#125) * feature(web): Allow deleting tags from the all tags page * feature(web): Add ability to rename, merge and fast delete tags. Fixes #105
* ui(web): Show bookmark URL when maximizing a bookmarkMohamedBassem2024-04-242-2/+12
|