dev #1

Merged
liuyonghe merged 4 commits from dev into main 2025-11-24 03:51:02 +00:00
6 changed files with 845 additions and 373 deletions
Showing only changes of commit c7bf1f9824 - Show all commits

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 { dirname } from "path";
import { fileURLToPath } from "url"; import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename); const __dirname = dirname(__filename);
const compat = new FlatCompat({ const eslintConfig = [...nextCoreWebVitals, ...nextTypescript, {
baseDirectory: __dirname, ignores: ["node_modules/**", ".next/**", "out/**", "build/**", "next-env.d.ts"]
}); }];
const eslintConfig = [
...compat.extends("next/core-web-vitals", "next/typescript"),
];
export default eslintConfig; 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", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev --turbopack", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint", "lint": "eslint .",
"i18n:scan": "i18next-scanner", "i18n:scan": "i18next-scanner",
"i18n:scan-custom": "tsx scripts/i18n-scan.ts", "i18n:scan-custom": "tsx scripts/i18n-scan.ts",
"i18n:convert": "node scripts/convert-to-i18n.js" "i18n:convert": "node scripts/convert-to-i18n.js"
@ -49,13 +49,13 @@
"keen-slider": "^6.8.6", "keen-slider": "^6.8.6",
"lamejs": "^1.2.1", "lamejs": "^1.2.1",
"lucide-react": "^0.525.0", "lucide-react": "^0.525.0",
"next": "15.3.5", "next": "16.0.3",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"nim-web-sdk-ng": "^10.9.41", "nim-web-sdk-ng": "^10.9.41",
"numeral": "^2.0.6", "numeral": "^2.0.6",
"qs": "^6.14.0", "qs": "^6.14.0",
"react": "^19.0.0", "react": "19.2.0",
"react-dom": "^19.0.0", "react-dom": "19.2.0",
"react-easy-crop": "^5.5.0", "react-easy-crop": "^5.5.0",
"react-hook-form": "^7.60.0", "react-hook-form": "^7.60.0",
"react-photo-view": "^1.2.7", "react-photo-view": "^1.2.7",
@ -67,19 +67,18 @@
"zod": "^4.0.5" "zod": "^4.0.5"
}, },
"devDependencies": { "devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4", "@tailwindcss/postcss": "^4",
"@types/js-cookie": "^3.0.6", "@types/js-cookie": "^3.0.6",
"@types/node": "^20", "@types/node": "^20",
"@types/numeral": "^2.0.5", "@types/numeral": "^2.0.5",
"@types/qs": "^6.14.0", "@types/qs": "^6.14.0",
"@types/react": "^19", "@types/react": "19.2.5",
"@types/react-dom": "^19", "@types/react-dom": "19.2.3",
"acorn": "^8.15.0", "acorn": "^8.15.0",
"acorn-jsx": "^5.3.2", "acorn-jsx": "^5.3.2",
"acorn-typescript": "^1.4.13", "acorn-typescript": "^1.4.13",
"eslint": "^9", "eslint": "^9",
"eslint-config-next": "15.3.5", "eslint-config-next": "16.0.3",
"globby": "^15.0.0", "globby": "^15.0.0",
"i18next-scanner": "^4.6.0", "i18next-scanner": "^4.6.0",
"msw": "^2.10.4", "msw": "^2.10.4",
@ -95,5 +94,9 @@
"workerDirectory": [ "workerDirectory": [
"public" "public"
] ]
},
"overrides": {
"@types/react": "19.2.5",
"@types/react-dom": "19.2.3"
} }
} }

View File

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

View File

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

View File

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