diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-12-08 10:35:17 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-08 10:35:17 +0000 |
| commit | 20d3761c89d566cf28ef1a22db14ad4f6eef2f17 (patch) | |
| tree | 3a665014c098603f5e631970afc66cb17586d054 /packages/shared | |
| parent | b6c2dadd88540eb7181b1af157ea4577157763a5 (diff) | |
| download | karakeep-20d3761c89d566cf28ef1a22db14ad4f6eef2f17.tar.zst | |
fix: check import quota before importing bookmarks (#2232)
* feat: check import quota before importing bookmarks
Add quota validation before bookmark import to prevent users from
exceeding their bookmark limits. The implementation includes:
- New QuotaService.canImportBookmarks() method to check if user can import N bookmarks
- New tRPC checkImportQuota procedure for client-side quota validation
- Updated useBookmarkImport hook to parse files and check quota before import
- Added error banner in ImportExport component to display quota errors
- Optimized file parsing to avoid reading the file twice
The quota check displays remaining bookmarks and provides clear error
messages when the import would exceed the user's quota.
* fix
* some fixes
---------
Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'packages/shared')
| -rw-r--r-- | packages/shared/import-export/index.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/shared/import-export/index.ts b/packages/shared/import-export/index.ts index 2d720d0b..dd266e06 100644 --- a/packages/shared/import-export/index.ts +++ b/packages/shared/import-export/index.ts @@ -1,3 +1,4 @@ export * from "./exporters"; export * from "./importer"; export type { ImportSource, ParsedBookmark } from "./parsers"; +export { parseImportFile } from "./parsers"; |
