aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/lib')
-rw-r--r--apps/web/lib/hooks/useImportSessions.ts20
-rw-r--r--apps/web/lib/i18n/locales/en/translation.json26
2 files changed, 44 insertions, 2 deletions
diff --git a/apps/web/lib/hooks/useImportSessions.ts b/apps/web/lib/hooks/useImportSessions.ts
index 4d095c0b..2cc632ad 100644
--- a/apps/web/lib/hooks/useImportSessions.ts
+++ b/apps/web/lib/hooks/useImportSessions.ts
@@ -1,7 +1,12 @@
"use client";
import { toast } from "@/components/ui/sonner";
-import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import {
+ useInfiniteQuery,
+ useMutation,
+ useQuery,
+ useQueryClient,
+} from "@tanstack/react-query";
import { useTRPC } from "@karakeep/shared-react/trpc";
@@ -131,3 +136,16 @@ export function useResumeImportSession() {
}),
);
}
+
+export function useImportSessionResults(
+ importSessionId: string,
+ filter: "all" | "accepted" | "rejected" | "skipped_duplicate" | "pending",
+) {
+ const api = useTRPC();
+ return useInfiniteQuery(
+ api.importSessions.getImportSessionResults.infiniteQueryOptions(
+ { importSessionId, filter, limit: 50 },
+ { getNextPageParam: (lastPage) => lastPage.nextCursor },
+ ),
+ );
+}
diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json
index 59d2098e..06cfd7a1 100644
--- a/apps/web/lib/i18n/locales/en/translation.json
+++ b/apps/web/lib/i18n/locales/en/translation.json
@@ -435,7 +435,31 @@
"delete_dialog_description": "Are you sure you want to delete \"{{name}}\"? This action cannot be undone. The bookmarks themselves will not be deleted.",
"delete_session": "Delete Session",
"pause_session": "Pause",
- "resume_session": "Resume"
+ "resume_session": "Resume",
+ "view_details": "View Details",
+ "detail": {
+ "page_title": "Import Session Details",
+ "back_to_import": "Back to Import",
+ "filter_all": "All",
+ "filter_accepted": "Accepted",
+ "filter_rejected": "Rejected",
+ "filter_duplicates": "Duplicates",
+ "filter_pending": "Pending",
+ "table_title": "Title / URL",
+ "table_type": "Type",
+ "table_result": "Result",
+ "table_reason": "Reason",
+ "table_bookmark": "Bookmark",
+ "result_accepted": "Accepted",
+ "result_rejected": "Rejected",
+ "result_skipped_duplicate": "Duplicate",
+ "result_pending": "Pending",
+ "result_processing": "Processing",
+ "no_results": "No results found for this filter.",
+ "view_bookmark": "View Bookmark",
+ "load_more": "Load More",
+ "no_title": "No title"
+ }
},
"backups": {
"backups": "Backups",