feat: 升级版本

This commit is contained in:
liuyonghe0111 2025-11-17 14:20:53 +08:00
parent 5804258501
commit c7bf1f9824
6 changed files with 845 additions and 373 deletions

View File

@ -1,16 +1,13 @@
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
import nextTypescript from "eslint-config-next/typescript";
import { dirname } from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];
const eslintConfig = [...nextCoreWebVitals, ...nextTypescript, {
ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"]
}];
export default eslintConfig;

1152
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,10 +3,10 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint": "eslint .",
"i18n:scan": "i18next-scanner",
"i18n:scan-custom": "tsx scripts/i18n-scan.ts",
"i18n:convert": "node scripts/convert-to-i18n.js"
@ -49,13 +49,13 @@
"keen-slider": "^6.8.6",
"lamejs": "^1.2.1",
"lucide-react": "^0.525.0",
"next": "15.3.5",
"next": "16.0.3",
"next-themes": "^0.4.6",
"nim-web-sdk-ng": "^10.9.41",
"numeral": "^2.0.6",
"qs": "^6.14.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-easy-crop": "^5.5.0",
"react-hook-form": "^7.60.0",
"react-photo-view": "^1.2.7",
@ -67,19 +67,18 @@
"zod": "^4.0.5"
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@types/js-cookie": "^3.0.6",
"@types/node": "^20",
"@types/numeral": "^2.0.5",
"@types/qs": "^6.14.0",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/react": "19.2.5",
"@types/react-dom": "19.2.3",
"acorn": "^8.15.0",
"acorn-jsx": "^5.3.2",
"acorn-typescript": "^1.4.13",
"eslint": "^9",
"eslint-config-next": "15.3.5",
"eslint-config-next": "16.0.3",
"globby": "^15.0.0",
"i18next-scanner": "^4.6.0",
"msw": "^2.10.4",
@ -95,5 +94,9 @@
"workerDirectory": [
"public"
]
},
"overrides": {
"@types/react": "19.2.5",
"@types/react-dom": "19.2.3"
}
}

View File

@ -29,9 +29,6 @@ const ChatPage = () => {
refreshBeforeExpireMinutes: 5
});
const handleOpenChatProfileDrawer = () => {
setIsChatProfileDrawerOpen(true);
};
const isShowRedDot = hasRedDot(RED_DOT_KEYS.CHAT_BACKGROUND) || hasRedDot(RED_DOT_KEYS.CHAT_BUBBLE);
@ -47,7 +44,7 @@ const ChatPage = () => {
<ChatMessageList />
<ChatMessageAction />
<div className="absolute right-6 top-6 w-8 h-8">
<IconButton iconfont="icon-icon_chatroom_more" variant="ghost" size="small" onClick={handleOpenChatProfileDrawer} />
<IconButton iconfont="icon-icon_chatroom_more" variant="ghost" size="small" onClick={() => setIsChatProfileDrawerOpen(true)} />
{isShowRedDot && <Badge variant="dot" className="absolute top-0 right-0" />}
</div>
</div>

View File

@ -35,7 +35,7 @@ function generateDeviceId(userAgent?: string): string {
return `did_${timestamp}_${randomStr}_${browserInfo}`.toLowerCase()
}
export default function middleware(request: NextRequest) {
export default function proxy(request: NextRequest) {
const { pathname } = request.nextUrl
// console.log('🔄 [MIDDLEWARE] 开始处理路径:', pathname)
// console.log('🔄 [MIDDLEWARE] 请求方法:', request.method)

View File

@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@ -11,7 +15,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"jsx": "react-jsx",
"incremental": true,
"plugins": [
{
@ -19,9 +23,20 @@
}
],
"paths": {
"@/*": ["./src/*"]
"@/*": [
"./src/*"
]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/types/**/*.d.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"src/types/**/*.d.ts",
".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}