Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

fix: simplify delete folder and dataroom

Marc Seitz2e10cd2784b4
diff --git a/components/datarooms/settings/delete-dataroooom/delete-dataroom-modal.tsx b/components/datarooms/settings/delete-dataroooom/delete-dataroom-modal.tsx
index bcee167f..ffec6be2 100644
--- a/components/datarooms/settings/delete-dataroooom/delete-dataroom-modal.tsx
+++ b/components/datarooms/settings/delete-dataroooom/delete-dataroom-modal.tsx
@@ -76,8 +76,11 @@ function DeleteDataroomModal({
>
<div className="flex flex-col items-center justify-center space-y-3 border-b border-border bg-white px-4 py-4 pt-8 dark:border-gray-900 dark:bg-gray-900 sm:px-8">
<CardTitle>Delete Dataroom</CardTitle>
+ <CardDescription className="text-md font-semibold text-foreground">
+ {dataroomName}
+ </CardDescription>
<CardDescription>
- Warning: This will permanently delete your dataroom, all associated
+ Warning: This will permanently delete your dataroom and all associated
links and their respective views.
</CardDescription>
</div>
@@ -93,31 +96,6 @@ function DeleteDataroomModal({
}}
className="flex flex-col space-y-6 bg-muted px-4 py-8 text-left dark:bg-gray-900 sm:px-8"
>
- <div>
- <label
- htmlFor="dataroom-name"
- className="block text-sm font-medium text-muted-foreground"
- >
- Enter the dataroom name{" "}
- <span className="font-semibold text-foreground">
- {dataroomName}
- </span>{" "}
- to continue:
- </label>
- <div className="relative mt-1 rounded-md shadow-sm">
- <Input
- type="text"
- name="dataroom-name"
- id="dataroom-name"
- autoFocus={!isMobile}
- autoComplete="off"
- required
- pattern={dataroomName}
- className="bg-white dark:border-gray-500 dark:bg-gray-800 focus:dark:bg-transparent"
- />
- </div>
- </div>
-
<div>
<label
htmlFor="verification"
diff --git a/components/documents/delete-folder-modal.tsx b/components/documents/delete-folder-modal.tsx
index 2a6b16af..e96651f7 100644
--- a/components/documents/delete-folder-modal.tsx
+++ b/components/documents/delete-folder-modal.tsx
@@ -29,8 +29,6 @@ export function DeleteFolderModal({
handleButtonClick?: any;
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
}) {
- const { isMobile } = useMediaQuery();
-
return (
<Modal showModal={open} setShowModal={setOpen}>
<div className="flex flex-col items-center justify-center space-y-3 border-b border-border bg-white px-4 py-4 pt-8 dark:border-gray-900 dark:bg-gray-900 sm:px-8">
@@ -39,6 +37,9 @@ export function DeleteFolderModal({
{isDataroom
? "This will remove the folder and its contents from this dataroom. The original documents will remain in your workspace."
: "This will permanently delete the folder and all its contents, including subfolders, documents, dataroom references, and any visitor analytics."}
+ <div className="mt-3 text-sm font-medium text-foreground">
+ {folderName}
+ </div>
<div className="mt-3 flex items-center gap-5">
<span className="flex items-center gap-1 text-xs font-medium text-destructive">
<FileIcon size={15} /> {documents}{" "}
@@ -59,30 +60,6 @@ export function DeleteFolderModal({
}}
className="flex flex-col space-y-6 bg-muted px-4 py-8 text-left dark:bg-gray-900 sm:px-8"
>
- <div>
- <label
- htmlFor="dataroom-name"
- className="block text-sm font-medium text-muted-foreground"
- >
- Enter the folder name{" "}
- <span className="font-semibold text-foreground">{folderName}</span>{" "}
- to continue:
- </label>
-
- <div className="relative mt-1 rounded-md shadow-sm">
- <Input
- type="text"
- name="dataroom-name"
- id="dataroom-name"
- autoFocus={!isMobile}
- autoComplete="off"
- required
- pattern={folderName}
- className="bg-white dark:border-gray-500 dark:bg-gray-800 focus:dark:bg-transparent"
- />
- </div>
- </div>
-
<div>
<label
htmlFor="verification"