aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/lists/ListOptions.tsx
diff options
context:
space:
mode:
authoromnitrix <gaobowei.ovo@gmail.com>2025-04-16 16:18:04 +0200
committerGitHub <noreply@github.com>2025-04-16 15:18:04 +0100
commit71a474268e6381f8630f6d906471c830342dc50f (patch)
treee7dc62795d4b7aad1daeff78c94c12e63c38f3ef /apps/web/components/dashboard/lists/ListOptions.tsx
parentdd990b51f3f85f70298a9b437b16ee7bbb406d24 (diff)
downloadkarakeep-71a474268e6381f8630f6d906471c830342dc50f.tar.zst
feat(web): Add support for merging lists (#1231)
* feat: Support list merging * some fixes * move @hoarder to @karakeep --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
Diffstat (limited to 'apps/web/components/dashboard/lists/ListOptions.tsx')
-rw-r--r--apps/web/components/dashboard/lists/ListOptions.tsx16
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/web/components/dashboard/lists/ListOptions.tsx b/apps/web/components/dashboard/lists/ListOptions.tsx
index 6b900265..9a979686 100644
--- a/apps/web/components/dashboard/lists/ListOptions.tsx
+++ b/apps/web/components/dashboard/lists/ListOptions.tsx
@@ -6,12 +6,13 @@ import {
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { useTranslation } from "@/lib/i18n/client";
-import { Pencil, Plus, Trash2 } from "lucide-react";
+import { FolderInput, Pencil, Plus, Trash2 } from "lucide-react";
import { ZBookmarkList } from "@karakeep/shared/types/lists";
import { EditListModal } from "../lists/EditListModal";
import DeleteListConfirmationDialog from "./DeleteListConfirmationDialog";
+import { MergeListModal } from "./MergeListModal";
export function ListOptions({
list,
@@ -28,6 +29,7 @@ export function ListOptions({
const [deleteListDialogOpen, setDeleteListDialogOpen] = useState(false);
const [newNestedListModalOpen, setNewNestedListModalOpen] = useState(false);
+ const [mergeListModalOpen, setMergeListModalOpen] = useState(false);
const [editModalOpen, setEditModalOpen] = useState(false);
return (
@@ -44,6 +46,11 @@ export function ListOptions({
setOpen={setEditModalOpen}
list={list}
/>
+ <MergeListModal
+ open={mergeListModalOpen}
+ setOpen={setMergeListModalOpen}
+ list={list}
+ />
<DeleteListConfirmationDialog
list={list}
open={deleteListDialogOpen}
@@ -67,6 +74,13 @@ export function ListOptions({
</DropdownMenuItem>
<DropdownMenuItem
className="flex gap-2"
+ onClick={() => setMergeListModalOpen(true)}
+ >
+ <FolderInput className="size-4" />
+ <span>{t("lists.merge_list")}</span>
+ </DropdownMenuItem>
+ <DropdownMenuItem
+ className="flex gap-2"
onClick={() => setDeleteListDialogOpen(true)}
>
<Trash2 className="size-4" />