diff --git a/.env.example b/.env.example index 5bea85b..d5646e0 100644 --- a/.env.example +++ b/.env.example @@ -1,9 +1,9 @@ GD_SERVICE_B64="Base64 Encoded value from Google Drive Service Account JSON file" -NEXT_PUBLIC_ENCRYPTION_KEY= -NEXT_PUBLIC_SITE_PASSWORD= +ENCRYPTION_KEY= +SITE_PASSWORD= # Only fill with the domain name, without the protocol and trailing slash -# This will be used as a fallback if VERCEL_URL is not available -# Example: https://drive-demo.mbaharip.com -> drive.mbaharip.com +# This will be used, and will fallback to VERCEL_URL if it's not available +# Example: https://drive-demo.mbaharip.com -> drive-demo.mbaharip.com NEXT_PUBLIC_DOMAIN= diff --git a/package.json b/package.json index c9a1a5c..b25bd8f 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "clsx": "^2.1.0", "cmdk": "^1.0.0", "date-fns": "^3.6.0", - "embla-carousel-react": "^8.0.1", + "embla-carousel-react": "^8.0.2", "googleapis": "^118.0.0", "input-otp": "^1.2.3", "jsonwebtoken": "^9.0.0", @@ -55,6 +55,7 @@ "next-themes": "^0.3.0", "nextjs-toploader": "^1.6.11", "react": "^18", + "react-colorful": "^5.6.1", "react-day-picker": "^8.10.0", "react-dom": "^18", "react-h5-audio-player": "^3.9.1", @@ -69,6 +70,7 @@ "rehype-katex": "^6.0.3", "rehype-prism-plus": "^1.6.3", "rehype-raw": "6.1.1", + "remark-breaks": "^4.0.0", "remark-gfm": "^3.0.1", "remark-math": "^5.1.1", "remark-slug": "^7.0.1", @@ -76,6 +78,7 @@ "sonner": "^1.4.41", "tailwind-merge": "^2.2.2", "tailwindcss-animate": "^1.0.7", + "use-debouncy": "^5.0.1", "vaul": "^0.9.0", "zod": "^3.22.4" }, diff --git a/src/app/@file.grid.tsx b/src/app/@file.grid.tsx index f86b9ca..236a60d 100644 --- a/src/app/@file.grid.tsx +++ b/src/app/@file.grid.tsx @@ -260,22 +260,34 @@ export default function FileGrid({ data }: Props) { {/* File data */}
- {data.fileExtension + {config.siteConfig.showFileExtension + ? data.name + : data.fileExtension ? data.name.replace(new RegExp(`.${data.fileExtension}$`), "") : data.name}
- + {data.mimeType.includes("folder") ? "folder" : data.fileExtension} {!data.mimeType.includes("folder") && ( <> - + {config.siteConfig.showFileExtension ? null : ( + + )} {bytesToReadable(data.size || 0)} diff --git a/src/app/@file.list.tsx b/src/app/@file.list.tsx index e61a5ac..87041dd 100644 --- a/src/app/@file.list.tsx +++ b/src/app/@file.list.tsx @@ -248,22 +248,34 @@ export default function FileList({ data }: Props) { {/* File data */}
- {data.fileExtension + {config.siteConfig.showFileExtension + ? data.name + : data.fileExtension ? data.name.replace(new RegExp(`.${data.fileExtension}$`), "") : data.name}
- + {data.mimeType.includes("folder") ? "folder" : data.fileExtension} {!data.mimeType.includes("folder") && ( <> - + {config.siteConfig.showFileExtension ? null : ( + + )} {bytesToReadable(data.size || 0)} diff --git a/src/app/@footer.tsx b/src/app/@footer.tsx index 5830490..57710bf 100644 --- a/src/app/@footer.tsx +++ b/src/app/@footer.tsx @@ -1,6 +1,7 @@ "use client"; import ReactMarkdown from "react-markdown"; +import remarkBreaks from "remark-breaks"; type Props = { content: string; @@ -9,7 +10,7 @@ export default function Footer({ content }: Props) { return (