Merge branch 'main' into batchdl

This commit is contained in:
Spencer Woo
2021-12-14 21:52:02 +08:00
committed by GitHub
6 changed files with 1379 additions and 726 deletions
+3 -2
View File
@@ -10,13 +10,13 @@
---
<h5>This is <a href="https://github.com/spencerwooo/onedrive-cf-index">onedrive-cf-index</a>'s little brother, basically the same, but powered by Next.js and Vercel.</h5>
> 🩺 *Under quarantine.* PR, issue response, and development is **temporarily on hold.**
## Features
🚧 **_This is currently a work in progress._**
- [x] File preview (PDF, markdown, code, plain text, ...)
- [x] File preview (PDF, EPUB, markdown, code, plain text, ...)
- [x] Image preview in gallery mode
- [x] Video and audio preview (mp4, mp3, ...)
- [x] Office documents preview (docx, pptx, xlsx, ...)
@@ -25,6 +25,7 @@
- [x] Dark mode
- [x] Protected routes (password protection and authentication) through `.password` files
- [x] Pagination for folders with more than 200 items
- [ ] Documentation for deployment and FAQs
## Discussion
+1 -1
View File
@@ -407,7 +407,7 @@ const FileListing: FunctionComponent<{ query?: ParsedUrlQuery }> = ({ query }) =
title="Copy raw file permalink"
className="hover:bg-gray-300 dark:hover:bg-gray-600 p-2 rounded cursor-pointer"
onClick={() => {
clipboard.copy(`${getBaseUrl()}/api?path=${path === '/' ? '' : path}/${c.name}&raw=true`)
clipboard.copy(`${getBaseUrl()}/api?path=${path === '/' ? '' : path}/${encodeURIComponent(c.name)}&raw=true`)
toast.success('Copied raw file permalink.')
}}
>
+4
View File
@@ -38,6 +38,10 @@ const PDFPreview: FunctionComponent<{ file: any }> = ({ file }) => {
onLoadProgress={({ loaded, total }) => {
setLoadingText(`Loading PDF ${Math.round((loaded / total) * 100)}%`)
}}
options={{
cMapUrl: `//cdn.jsdelivr.net/npm/pdfjs-dist@${pdfjs.version}/cmaps/`,
cMapPacked: true,
}}
>
<Page
pageNumber={pageNumber}
-1
View File
@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
+1370 -721
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -19,7 +19,7 @@
"crypto-js": "^4.1.1",
"emoji-regex": "^9.2.2",
"jszip": "^3.7.1",
"next": "^11.1.0",
"next": "^12.0.7",
"preview-office-docs": "^1.0.2",
"prismjs": "^1.23.0",
"react": "17.0.2",