Skip to content

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

chore: cleanup

Marc Seitze10bc9b56e71
diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx
index d0603646..581ef4e6 100644
--- a/components/Sidebar.tsx
+++ b/components/Sidebar.tsx
@@ -5,6 +5,7 @@ import { useEffect, useState } from "react";
import { TeamContextType, initialState, useTeam } from "@/context/team-context";
import Cookies from "js-cookie";
import {
+ CogIcon,
FolderIcon as FolderLucideIcon,
FolderOpenIcon,
PaletteIcon,
@@ -13,7 +14,6 @@ import {
import { useSession } from "next-auth/react";
import MenuIcon from "@/components/shared/icons/menu";
-import SettingsIcon from "@/components/shared/icons/settings";
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
import { usePlan } from "@/lib/swr/use-billing";
@@ -24,6 +24,7 @@ import ProBanner from "./billing/pro-banner";
import { UpgradePlanModal } from "./billing/upgrade-plan-modal";
import ProfileMenu from "./profile-menu";
import SiderbarFolders from "./sidebar-folders";
+import { AddTeamModal } from "./teams/add-team-modal";
import SelectTeam from "./teams/select-team";
import { ScrollArea } from "./ui/scroll-area";
@@ -128,7 +129,7 @@ export const SidebarComponent = ({ className }: { className?: string }) => {
{
name: "Settings",
href: "/settings/general",
- icon: SettingsIcon,
+ icon: CogIcon,
current:
router.pathname.includes("settings") &&
!router.pathname.includes("branding") &&
diff --git a/components/datarooms/settings/duplicate-dataroom.tsx b/components/datarooms/settings/duplicate-dataroom.tsx
index 005e3974..c7e4f0e9 100644
--- a/components/datarooms/settings/duplicate-dataroom.tsx
+++ b/components/datarooms/settings/duplicate-dataroom.tsx
@@ -62,8 +62,8 @@ export default function DuplicateDataroom({
};
return (
- <div className="rounded-lg bg-background">
- <Card>
+ <div className="rounded-lg">
+ <Card className="bg-transparent">
<CardHeader>
<CardTitle>Duplicate Dataroom</CardTitle>
<CardDescription>
@@ -84,21 +84,5 @@ export default function DuplicateDataroom({
</CardFooter>
</Card>
</div>
- // <div className="rounded-lg border border-gray-200 bg-white">
- // <div className="flex flex-col space-y-3 p-5 sm:p-10">
- // <h2 className="text-xl font-medium">Duplicate Dataroom</h2>
- // <p className="text-sm text-gray-500">
- // Create a new data room with the same content (folders and files) as
- // this data room.
- // </p>
- // </div>
- // <div className="border-b border-gray-200" />
-
- // <div className="flex items-center justify-end px-5 py-4 sm:px-10">
- // <Button onClick={(e) => handleDuplicateDataroom(e)} loading={loading}>
- // Duplicate Dataroom
- // </Button>
- // </div>
- // </div>
);
}
diff --git a/components/teams/add-team-modal.tsx b/components/teams/add-team-modal.tsx
index 0bb143d6..314c14b8 100644
--- a/components/teams/add-team-modal.tsx
+++ b/components/teams/add-team-modal.tsx
@@ -5,6 +5,7 @@ import { useState } from "react";
import { usePlausible } from "next-plausible";
import { toast } from "sonner";
+import { Button } from "@/components/ui/button";
import {
Dialog,
DialogContent,
@@ -14,10 +15,8 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
-
-import { Button } from "../ui/button";
-import { Input } from "../ui/input";
-import { Label } from "../ui/label";
+import { Input } from "@/components/ui/input";
+import { Label } from "@/components/ui/label";
export function AddTeamModal({ children }: { children: React.ReactNode }) {
const router = useRouter();
diff --git a/components/teams/select-team.tsx b/components/teams/select-team.tsx
index bed85ed3..4b86d1c8 100644
--- a/components/teams/select-team.tsx
+++ b/components/teams/select-team.tsx
@@ -53,7 +53,7 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {
key={team.id}
onClick={() => switchTeam(team)}
className={cn(
- `flex w-full cursor-pointer items-center justify-between truncate px-3 py-2 text-sm font-normal transition-all duration-75 hover:bg-gray-200 hover:dark:bg-gray-800 `,
+ `flex w-full cursor-pointer items-center justify-between truncate px-3 py-2 text-sm font-normal transition-all duration-75 hover:bg-gray-200 hover:dark:bg-gray-800`,
team.id === currentTeam?.id && "font-medium",
)}
>
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 0fff9ed1..c8ec03da 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -79,7 +79,7 @@ export default function App({
enabled={process.env.NEXT_PUBLIC_VERCEL_ENV === "production"}
>
<main className={inter.className}>
- <Toaster closeButton richColors />
+ <Toaster closeButton />
<TooltipProvider delayDuration={100}>
{EXCLUDED_PATHS.includes(router.pathname) ? (
<Component {...pageProps} />
diff --git a/pages/datarooms/[id]/settings/index.tsx b/pages/datarooms/[id]/settings/index.tsx
index 0628a6d7..a26ea462 100644
--- a/pages/datarooms/[id]/settings/index.tsx
+++ b/pages/datarooms/[id]/settings/index.tsx
@@ -85,7 +85,7 @@ export default function Settings() {
placeholder: "My Dataroom",
maxLength: 32,
}}
- helpText="Max 32 characters."
+ helpText="Max 32 characters"
handleSubmit={(updateData) =>
fetch(`/api/teams/${teamId}/datarooms/${dataroom.id}`, {
method: "PATCH",
diff --git a/styles/globals.css b/styles/globals.css
index f5cf75c0..ce105eea 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -1,73 +1,73 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
-
+
@layer base {
:root {
- --background: 0 0% 100%;
- --foreground: 224 71.4% 4.1%;
-
- --muted: 220 14.3% 95.9%;
- --muted-foreground: 220 8.9% 46.1%;
-
- --popover: 0 0% 100%;
- --popover-foreground: 224 71.4% 4.1%;
-
- --card: 0 0% 100%;
- --card-foreground: 224 71.4% 4.1%;
-
- --border: 220 13% 91%;
- --input: 220 13% 91%;
-
- --primary: 220.9 39.3% 11%;
- --primary-foreground: 210 20% 98%;
-
- --secondary: 220 14.3% 95.9%;
- --secondary-foreground: 220.9 39.3% 11%;
-
- --accent: 220 14.3% 95.9%;
- --accent-foreground: 220.9 39.3% 11%;
-
- --destructive: 0 84.2% 60.2%;
- --destructive-foreground: 210 20% 98%;
-
- --ring: 217.9 10.6% 64.9%;
-
- --radius: 0.5rem;
+ --background: 0 0% 100%; /* white */
+ --foreground: 224 71.4% 4.1%; /* gray-950 */
+
+ --muted: 220 14.3% 95.9%; /* gray-100 */
+ --muted-foreground: 220 8.9% 46.1%; /* gray-500 */
+
+ --popover: 0 0% 100%; /* white */
+ --popover-foreground: 224 71.4% 4.1%; /* gray-950 */
+
+ --card: 0 0% 100%; /* white */
+ --card-foreground: 224 71.4% 4.1%; /* gray-950 */
+
+ --border: 220 13% 91%; /* gray-200 */
+ --input: 216 12.2% 83.9%; /* gray-300 */
+
+ --primary: 220.9 39.3% 11%; /* gray-900 */
+ --primary-foreground: 210 20% 98%; /* gray-50 */
+
+ --secondary: 220 14.3% 95.9%; /* gray-100 */
+ --secondary-foreground: 220.9 39.3% 11%; /* gray-900 */
+
+ --accent: 220 14.3% 95.9%; /* gray-100 */
+ --accent-foreground: 220.9 39.3% 11%; /* gray-900 */
+
+ --destructive: 0 84.2% 60.2%; /* red-500 */
+ --destructive-foreground: 210 20% 98%; /* gray-50 */
+
+ --ring: 217.9 10.6% 64.9%; /* gray-400 */
+
+ --radius: 0.5rem; /* md */
}
-
+
.dark {
- --background: 224 71.4% 4.1%;
- --foreground: 210 20% 98%;
-
- --muted: 215 27.9% 16.9%;
- --muted-foreground: 217.9 10.6% 64.9%;
-
- --popover: 224 71.4% 4.1%;
- --popover-foreground: 210 20% 98%;
-
- --card: 224 71.4% 4.1%;
- --card-foreground: 210 20% 98%;
-
- --border: 215 27.9% 16.9%;
- --input: 215 27.9% 16.9%;
-
- --primary: 210 20% 98%;
- --primary-foreground: 220.9 39.3% 11%;
-
- --secondary: 215 27.9% 16.9%;
- --secondary-foreground: 210 20% 98%;
-
- --accent: 215 27.9% 16.9%;
- --accent-foreground: 210 20% 98%;
-
- --destructive: 0 62.8% 30.6%;
- --destructive-foreground: 0 85.7% 97.3%;
-
- --ring: 215 27.9% 16.9%;
+ --background: 224 71.4% 4.1%; /* gray-950 */
+ --foreground: 210 20% 98%; /* gray-50 */
+
+ --muted: 215 27.9% 16.9%; /* gray-800 */
+ --muted-foreground: 217.9 10.6% 64.9%; /* gray-400 */
+
+ --popover: 224 71.4% 4.1%; /* gray-950 */
+ --popover-foreground: 210 20% 98%; /* gray-50 */
+
+ --card: 224 71.4% 4.1%; /* gray-950 */
+ --card-foreground: 210 20% 98%; /* gray-50 */
+
+ --border: 215 27.9% 16.9%; /* gray-800 */
+ --input: 216.9 19.1% 26.7%; /* gray-700 */
+
+ --primary: 210 20% 98%; /* gray-50 */
+ --primary-foreground: 220.9 39.3% 11%; /* gray-900 */
+
+ --secondary: 215 27.9% 16.9%; /* gray-800 */
+ --secondary-foreground: 210 20% 98%; /* gray-50 */
+
+ --accent: 215 27.9% 16.9%; /* gray-800 */
+ --accent-foreground: 210 20% 98%; /* gray-50 */
+
+ --destructive: 0 62.8% 30.6%; /* red-900 */
+ --destructive-foreground: 0 85.7% 97.3%; /* red-50 */
+
+ --ring: 215 27.9% 16.9%; /* gray-800 */
}
}
-
+
@layer base {
* {
@apply border-border;
@@ -75,4 +75,4 @@
body {
@apply bg-background text-foreground;
}
-}
\ No newline at end of file
+}