aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/bookmarks
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-12-30 13:30:35 +0200
committerGitHub <noreply@github.com>2025-12-30 11:30:35 +0000
commit7a76216e5c971a300e9db32c93509b0376f6f47e (patch)
tree2e383482c7dbfb127c2c3c725125ad253c6b4aa0 /apps/web/components/dashboard/bookmarks
parentb20ba9cfccd22159bf8263165cca76aab3147d9c (diff)
downloadkarakeep-7a76216e5c971a300e9db32c93509b0376f6f47e.tar.zst
feat: Add bulk remove from list (#2279)
* feat: Add bulk remove from list action in list context - Add "Remove from List" button in bulk actions menu - Only visible when in a manual list context with editor/owner role - Includes confirmation dialog before removal - Uses same concurrency pattern as bulk add (50 concurrent operations) - Displays success count in toast notification - Add translation key "actions.remove" for consistency This complements the existing bulk add to list functionality and allows users to efficiently remove multiple bookmarks from a list at once. * fmt * fix list context * add remove from list --------- Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'apps/web/components/dashboard/bookmarks')
-rw-r--r--apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx b/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx
index f726c703..ab7bafb3 100644
--- a/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx
+++ b/apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx
@@ -16,6 +16,7 @@ import Masonry from "react-masonry-css";
import resolveConfig from "tailwindcss/resolveConfig";
import type { ZBookmark } from "@karakeep/shared/types/bookmarks";
+import { useBookmarkListContext } from "@karakeep/shared-react/hooks/bookmark-list-context";
import BookmarkCard from "./BookmarkCard";
import EditorCard from "./EditorCard";
@@ -64,6 +65,7 @@ export default function BookmarksGrid({
const gridColumns = useGridColumns();
const bulkActionsStore = useBulkActionsStore();
const inBookmarkGrid = useInBookmarkGridStore();
+ const withinListContext = useBookmarkListContext();
const breakpointConfig = useMemo(
() => getBreakpointConfig(gridColumns),
[gridColumns],
@@ -72,10 +74,13 @@ export default function BookmarksGrid({
useEffect(() => {
bulkActionsStore.setVisibleBookmarks(bookmarks);
+ bulkActionsStore.setListContext(withinListContext);
+
return () => {
bulkActionsStore.setVisibleBookmarks([]);
+ bulkActionsStore.setListContext(undefined);
};
- }, [bookmarks]);
+ }, [bookmarks, withinListContext?.id]);
useEffect(() => {
inBookmarkGrid.setInBookmarkGrid(true);