mirror of
https://github.com/docmost/docmost.git
synced 2026-05-20 00:14:10 +08:00
ec12e80423
* initial commit * added recycle bin modal, updated api routes * updated page service & controller, recycle bin modal * updated page-query.ts, use-tree-mutation.ts, recycled-pages.ts * removed quotes from openRestorePageModal prompt * Updated page.repo.ts * move button to space menu * fix react issues * opted to reload to enact changes in the client * lint * hide deleted pages in recents, handle restore child page * fix null check * WIP * WIP * feat: implement dedicated trash page - Replace modal-based trash view with dedicated route `/s/:spaceSlug/trash` - Add pagination support for deleted pages - Other improvements * fix translation * trash cleanup cron * cleanup --------- Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { Modal, Text, ScrollArea } from "@mantine/core";
|
|
import { useTranslation } from "react-i18next";
|
|
import ReadonlyPageEditor from "@/features/editor/readonly-page-editor.tsx";
|
|
|
|
interface Props {
|
|
opened: boolean;
|
|
onClose: () => void;
|
|
pageTitle: string;
|
|
pageContent: any;
|
|
}
|
|
|
|
export default function TrashPageContentModal({
|
|
opened,
|
|
onClose,
|
|
pageTitle,
|
|
pageContent,
|
|
}: Props) {
|
|
const { t } = useTranslation();
|
|
const title = pageTitle || t("Untitled");
|
|
|
|
return (
|
|
<Modal.Root size={1200} opened={opened} onClose={onClose}>
|
|
<Modal.Overlay />
|
|
<Modal.Content style={{ overflow: "hidden" }}>
|
|
<Modal.Header>
|
|
<Modal.Title>
|
|
<Text size="md" fw={500}>
|
|
{t("Preview")}
|
|
</Text>
|
|
</Modal.Title>
|
|
<Modal.CloseButton />
|
|
</Modal.Header>
|
|
<Modal.Body p={0}>
|
|
<ScrollArea h="650" w="100%" scrollbarSize={5}>
|
|
<ReadonlyPageEditor title={title} content={pageContent} />
|
|
</ScrollArea>
|
|
</Modal.Body>
|
|
</Modal.Content>
|
|
</Modal.Root>
|
|
);
|
|
}
|