- Add `FavPlayerDAO` for database operations (create, read, delete, check) against `user_fav` table. - Integrate Prisma ORM with MariaDB adapter in `src/prisma/db.ts`. - Implement backend API routes (`/api/fav`) to handle GET, PUT, and DELETE requests for managing favorites based on user audience (aud). - Create `FavePlayersPage` with support for: - Viewing local stored favorites. - Syncing server-side favorites via Logto authentication. - Visual distinction between "Local" and "Account" favorite lists using Segmented control. - Loading states and empty state handling with Ant Design components. - Enhance `Logto/Callback` to redirect users back to their intended destination (e.g., `FavePlayersPage`) after authentication if a `redirect` param was stored in session storage. - Update `UserCenter` page to include "Backup Codes" management option under account settings. - Add necessary dependencies: `@logto/react`, `ahooks`, and update UI imports accordingly.
36 lines
981 B
JSON
36 lines
981 B
JSON
{
|
|
"name": "my-kaiqiuwang",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "bun --hot src/index.tsx",
|
|
"build": "bun build ./src/index.html --outdir=dist --sourcemap --target=browser --minify --define:process.env.NODE_ENV='\"production\"' --env='BUN_PUBLIC_*'",
|
|
"start": "NODE_ENV=production bun src/index.tsx"
|
|
},
|
|
"dependencies": {
|
|
"@ant-design/icons": "^6.1.0",
|
|
"@logto/react": "^4.0.13",
|
|
"@prisma/adapter-mariadb": "^7.4.2",
|
|
"@prisma/client": "^7.4.2",
|
|
"ahooks": "^3.9.6",
|
|
"antd": "^6.2.1",
|
|
"cheerio": "^1.2.0",
|
|
"dayjs": "^1.11.19",
|
|
"lodash": "^4.17.23",
|
|
"mariadb": "^3.5.2",
|
|
"react": "^19",
|
|
"react-dom": "^19",
|
|
"react-router": "^7.13.0",
|
|
"styled-components": "^6.3.8",
|
|
"zustand": "^5.0.10"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "latest",
|
|
"@types/lodash": "^4.17.23",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"prisma": "^7.4.2"
|
|
}
|
|
}
|