first commit

This commit is contained in:
2025-10-19 13:31:11 +00:00
commit 8bfc183b66
1248 changed files with 195992 additions and 0 deletions

27
.gitignore vendored Executable file
View File

@@ -0,0 +1,27 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
# same build output folder as fe v3
build
dist-ssr
dev-dist
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

1
.husky/pre-commit Executable file
View File

@@ -0,0 +1 @@
npx lint-staged

1
.prettierignore Executable file
View File

@@ -0,0 +1 @@

3
.prettierrc Executable file
View File

@@ -0,0 +1,3 @@
{
"printWidth": 120
}

30
README.md Executable file
View File

@@ -0,0 +1,30 @@
# React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level `parserOptions` property like this:
```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list

18
eslint.config.js Executable file
View File

@@ -0,0 +1,18 @@
import pluginReact from "eslint-plugin-react";
import { defineConfig } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";
export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
languageOptions: { globals: globals.browser },
settings: {
react: {
version: "detect",
},
},
},
tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
]);

BIN
frontend-master.zip Executable file

Binary file not shown.

118
index.html Executable file
View File

@@ -0,0 +1,118 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="{pwa_small_icon}" sizes="64x64" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,shrink-to-fit=no"
/>
<meta name="theme-color" content="" />
<link rel="manifest" href="/manifest.json" />
<meta name="description" content="{siteDes}" />
<title>{siteName}</title>
<script>
window.subTitle = "{siteName}";
</script>
<style>
#app-loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #f5f5f5;
z-index: 9999;
}
#app-loader .logo {
width: 120px;
height: 120px;
margin-bottom: 32px;
background-image: url("{pwa_medium_icon}");
background-position: center;
background-repeat: no-repeat;
background-size: contain;
opacity: 0;
transform: scale(0.8);
animation: fadeIn 0.6s ease-out 0.3s forwards;
}
#app-loader .spinner {
width: 28px;
height: 28px;
position: relative;
opacity: 0;
transform: scale(0.8);
animation: fadeIn 0.6s ease-out 0.3s forwards;
}
#app-loader .spinner {
display: inline-block;
width: 40px;
height: 40px;
}
#app-loader .spinner svg {
display: block;
}
#app-loader .spinner .stroke {
stroke: var(--defaultThemeColor);
stroke-linecap: round;
animation: spinDash 1.4s ease-in-out infinite;
}
#app-loader .spinner .background {
stroke: rgba(0, 0, 0, 0.1)
}
@keyframes spinDash {
0% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100px, 200px;
stroke-dashoffset: -15px;
}
100% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: -126px;
}
}
@keyframes fadeIn {
to {
opacity: 1;
transform: scale(1);
}
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="app-loader">
<div class="logo"></div>
<div class="spinner">
<svg viewBox="22 22 44 44">
<circle class="background" cx="44" cy="44" r="20" fill="none" stroke-width="4"></circle>
<circle class="stroke" cx="44" cy="44" r="20" fill="none" stroke-width="4"></circle>
</svg>
</div>
</div>
<script async type="module" src="/src/main.tsx"></script>
<div id="root"></div>
<script>
document.addEventListener("DOMContentLoaded", function () {
// Hide loader when the app has loaded
const appRoot = document.getElementById("root");
const observer = new MutationObserver(function (mutations) {
if (appRoot.children.length > 0) {
document.getElementById("app-loader").style.display = "none";
observer.disconnect();
}
});
observer.observe(appRoot, { childList: true });
});
</script>
</body>
{siteScript}
</html>

3300
package-lock.json generated Executable file

File diff suppressed because it is too large Load Diff

119
package.json Executable file
View File

@@ -0,0 +1,119 @@
{
"name": "cloudreve-frontend",
"private": true,
"version": "4.0.0-next",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build-prod": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"format": "prettier --write .",
"format:check": "prettier --check .",
"prepare": "husky"
},
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@excalidraw/excalidraw": "^0.18.0",
"@fontsource/roboto": "^5.0.8",
"@giscus/react": "^3.1.0",
"@iconify/react": "^6.0.0",
"@marsidev/react-turnstile": "^1.1.0",
"@mdxeditor/editor": "^3.39.0",
"@mui/icons-material": "^6.0.0",
"@mui/lab": "^6.0.0-beta.30",
"@mui/material": "^6.4.6",
"@mui/x-date-pickers": "^6.20.2",
"@mui/x-tree-view": "^6.17.0",
"@reduxjs/toolkit": "^2.0.1",
"@types/path-browserify": "^1.0.2",
"@types/streamsaver": "^2.0.4",
"@uiw/color-convert": "^2.1.1",
"@uiw/react-color-sketch": "^2.1.1",
"artplayer": "5.2.2",
"artplayer-plugin-chapter": "^1.0.0",
"artplayer-plugin-hls-control": "^1.0.1",
"axios": "^1.6.2",
"dayjs": "^1.11.10",
"fuse.js": "^7.0.0",
"heic-to": "^1.1.14",
"hls.js": "^1.6.2",
"i18next": "^23.7.11",
"i18next-browser-languagedetector": "^7.2.0",
"i18next-chained-backend": "^4.6.2",
"i18next-http-backend": "^2.4.2",
"i18next-localstorage-backend": "^4.2.0",
"leaflet": "^1.9.4",
"livephotoskit": "^1.5.6",
"lodash": "^4.17.21",
"mapbox-gl": "^3.15.0",
"material-ui-popup-state": "^5.0.10",
"monaco-editor": "^0.49.0",
"mpegts.js": "^1.8.0",
"mui-one-time-password-input": "^2.0.1",
"notistack": "^3.0.1",
"nuqs": "^2.3.1",
"path-browserify": "^1.0.1",
"pdfjs-dist": "4.10.38",
"qrcode.react": "^4.1.0",
"react": "^18.2.0",
"react-animate-height": "^3.2.3",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-draggable": "^4.4.6",
"react-filerobot-image-editor": "^4.8.1",
"react-google-recaptcha": "^3.1.0",
"react-highlight-words": "^0.20.0",
"react-hotkeys-hook": "^4.5.1",
"react-i18next": "^14.0.0",
"react-image-crop": "^11.0.7",
"react-intersection-observer": "^9.5.3",
"react-konva": "^18.2.10",
"react-leaflet": "^4.2.1",
"react-reader": "^2.0.10",
"react-redux": "^9.0.4",
"react-router-dom": "^6.21.0",
"react-transition-group": "^4.4.5",
"react-virtuoso": "^4.10.4",
"recharts": "^2.15.1",
"redux": "^5.0.0",
"streamsaver": "^2.0.6",
"styled-components": "^6.1.11",
"timeago-react": "^3.0.6"
},
"devDependencies": {
"@types/leaflet": "^1.9.12",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.5",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/webappsec-credential-management": "^0.6.9",
"@types/wicg-file-system-access": "^2023.10.5",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.29.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"globals": "^16.2.0",
"husky": "^9.1.7",
"less": "^4.2.0",
"lint-staged": "^16.1.2",
"prettier": "3.1.1",
"typescript": "^5.2.2",
"typescript-eslint": "^8.34.1",
"vite": "5.4.6",
"vite-plugin-mkcert": "^1.17.6",
"vite-plugin-pwa": "^0.21.1",
"vite-plugin-static-copy": "^2.2.0"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css,scss,md}": [
"prettier --write"
]
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,3 @@
<03>RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE<53>CNS2-H

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,3 @@
<02>RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE<53> ETen-B5-H` ^

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,4 @@
<02>RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE!!<21><>]aX!!]`<60>21<32>> <09>p <0B>z<EFBFBD>$]<5D><06>"R<>d<EFBFBD>-U<>7<EFBFBD>*<17>
4<>%<25>+ <20>Z <20>{<7B>/<1F>%<25><<3C>9K<39>b<EFBFBD>1]<5D>.<2E>"<1F> <0C>`]<5D>,<2C>"]<5D>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
public/assets/pdfjs/cmaps/H.bcmap Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More