Commit Graph

25 Commits

Author SHA1 Message Date
YuTengjing f72a5e6cc1 feat: betterauth username signin (#10607) 2025-12-05 01:35:20 +08:00
YuTengjing dc62cc969d feat: support better-auth (#10215) 2025-11-27 20:10:40 +08:00
Shinji-Li f445ab013c ♻️ refactor: refactor the root from nextjs router to react-router-dom (#10094)
* feat: change the root path to react-router-dom to render spa

* feat: disable / to /chat rewrite

* feat: change /settings labs image profile changelog to spa mode

* feat: use loading to dynamic loading

* fix: change the goback & knowledge/base url

* feat: change some nextjs router to react-router-dom use

* feat: link replace to react-router-dom

* fix: delete useless code

* feat: fix mobile agent settings page not work problem

* fix: fix the test

* fix: slove the router back

* fix: slove ts problem

* fix: change the router judge by servers

* feat: change AppRouter to Desktop Router & mobile Router to dynamic import

* fix: refactor the memory router to browser router

* feat: /chat delete pages & layouts dir

* feat: change all discover page to the spa

* feat: discover pages layout & pages routers get done

* feat: change all routes to outer routes

* feat: change the :slug to react-router loader to get

* feat: change NextJs Link useRouter useSearchParams change to react-router way

* fix: delete some layout tsx & update the ts

* feat: change local params get use ReactRouter Outlet context

* fix: fix hydrateFallback problem

* fix: fix build problem

* fix: change the changelog pages render

* feat: delete all nuqs

* feat: change the mobile me layout back

* chore: add mobile me layout back

* fix: discover find more  link error fixed

* fix: add nuqs back & useQueryState back in oath

* fix: add files back

* fix: add files back

* feat: use starTransition to navigate url

* fix: close the loading in the layout loading

* chore: update test.ts in TopActions.tsx

* fix: delete useless code

* fix: fix mobile router goback fc

* fix: delete the changelog modal page

* feat: fix a lot router problem

* fix: fix useNav in discover page error problem

* feat: rollback some changes about layout

* fix: fixed the desktop knowledge page router

* fix: fixed usage router error

* fix: fixed router link error

* fix: fixed the url & new url not path problem

* fix: fixed the test

* feat: update the useQueryParams throttleMs params

* feat: use more simple way to update session hydration

* fix: delete useless code

* fix: delete uesless code

* fix: mobile chat settings go back

* fix: fix the reload was loading page problem

* fix: fixed the test error

* fix: add router ErrorBoundary

* test: test the loading error

* fix: try to fixed

* fix: test mobile

* feat: add loading back
2025-11-17 20:54:37 +08:00
Arvin Xu 4ee4590630 ♻️ refactor: remove deperated code (#10001)
* remove

* improve

* remove chatModels

* remove user model list slice

* improve lab image

* remove deprecated code

* remove clerk_sign_up

* fix tests
2025-11-03 13:14:35 +08:00
YuTengjing de7368bc25 feat: add new setting for default image num (#9618) 2025-10-12 23:56:17 +08:00
Arvin Xu 2a3754a436 🐛 fix: fix subscription plan tag display (#8599) 2025-07-29 17:41:42 +08:00
YuTengjing a072b53311 ♻️ refactor: replace utility-types with type-fest (#8370) 2025-07-10 17:50:01 +08:00
Tsuki f433aca05f 💄 style: implement data analytics event tracking framework (#8352) 2025-07-10 11:33:35 +08:00
huangkairan d3141302dd 🐛 fix: fix missing email field to user (#7913)
* fix: pass email to user

* add test
2025-05-23 14:20:45 +08:00
RICHQAQ f15200d348 💄 style: Add avatar for server database upload to S3, removing SSO dependency for avatar management (#7152)
*  feat: 添加服务端头像上传功能,支持从 Base64 数据上传至 S3,并更新用户头像状态

* 🐛 fix: 修复更新头像后依旧有可能显示旧头像

* Undo changes of package.json and Clerk

* change message of loading to ui of loading in avatar-update

* Using the getFullFileUrl function

* fix file service

* Modify the user avatar upload and retrieval functions to support a private S3 bucket, use UUID to generate unique file names, and delete the old avatar.

---------

Co-authored-by: arvinxx <arvinx@foxmail.com>
2025-04-24 23:45:01 +08:00
Arvin Xu 4c1fb4a084 ♻️ refactor: refactor to get user info from api (#7444)
* support get user info from api

* fix

* Update client.ts
2025-04-16 23:21:55 +08:00
Arvin Xu 91912cf725 🐛 fix: fix language incorrect on page hydration (#5970)
* fix language issue

* refactor the language part

* fix tests
2025-02-10 20:58:20 +08:00
Arvin Xu e529108ff6 feat: refactor the auth condition in Next Auth (#5866)
This upgrade includes two changes:

For users deploying with Vercel using next-auth, it is necessary to add the environment variable `NEXT_PUBLIC_ENABLE_NEXT_AUTH=1` to ensure Next Auth is enabled; other users are not affected.
For users using clerk in self-built images, it is necessary to additionally configure `NEXT_PUBLIC_ENABLE_NEXT_AUTH=0` to disable Next Auth

Other standard deployment scenarios (using Clerk in Vercel and using next-auth in Docker) are not affected

For More detail, refer to https://github.com/lobehub/lobe-chat/issues/5804

本次升级存在两个变更:

- 针对使用 Vercel 部署中使用 next-auth 的用户,需要额外添加 `NEXT_PUBLIC_ENABLE_NEXT_AUTH=1` 环境变量来确保开启 Next Auth
- 针对使用自构建镜像中使用 clerk 的用户,需要额外配置 `NEXT_PUBLIC_ENABLE_NEXT_AUTH=0` 环境变量来关闭 Next Auth

其他标准部署场景(Vercel 中使用 Clerk 与 Docker 中使用 next-auth )不受影响

变更详情原因查看 https://github.com/lobehub/lobe-chat/issues/5804
2025-02-08 10:25:28 +08:00
Arvin Xu 4131f20583 feat: support to use pglite as client db (#4873)
*  feat: pglite 迁移实现

refactor modal name

pin pglite@0.2.13

add serverExternalPackages for pglite

fix tests

update model

remove migration

back previous test file

* 💚 build: fix build with ReactScan

* clean

* refactor with isDBinit

* fix test
2024-12-22 17:20:19 +08:00
Arvin Xu 5a542b4891 ️ perf: reduce server service bundle size by refactoring with constant fold (#4641)
* refactor

* clean code
2024-11-08 12:53:57 +08:00
Arvin Xu f99c9ce90e 💄 style: add optimistic loading for image uploading (#2700)
* 🚸 refactor: add optimistic loading for file uploading

*  test: fix tests

* 🚸 style: improve error fallback

* ♻️ refactor: improve swr type

*  test: fix tests
2024-05-28 23:57:14 +08:00
Arvin Xu 0dfcf8dd3f 💄 style: add SYSTEM_AGENT env (#2694) 2024-05-28 19:20:36 +08:00
Arvin Xu 4049bc703e ♻️ refactor: refactor keyVaults and rename endpoint to baseURL (#2673)
* ♻️ refactor: refactor endpoint to baseURL

*  test: fix test

* 🚨 ci: fix lint

*  test: fix migration test

* 🗃️ refactor: refactor the user setting client db
2024-05-27 10:08:59 +08:00
Arvin Xu bef8926532 🐛 fix: fix connection checker (#2672)
* 🐛 fix: fix check error

* 💄 style: improve bubble loading

* ♻️ refactor: add store devtools url control

* 🚚 refactor: move settings type folder

* ♻️ refactor: rename type

* 🐛 fix: fix check error
2024-05-26 23:33:01 +08:00
Arvin Xu 12726c24e1 🐛 fix: fix avatar missing on client DB mode (#2645)
* 🐛 fix: fix avatar missing

* 🐛 fix: fix user avatar

* ♻️ refactor: refactor to remove deprecated userId and avatar field

*  test: improve test
2024-05-24 23:51:19 +08:00
Arvin Xu ab4216e03d ♻️ refactor: refactor the home redirect implement (#2626)
* ♻️ refactor: refactor to improve loading rediect

* ♻️ refactor: refactor to improve loading rediect
2024-05-24 01:05:39 +08:00
Arvin Xu 81ea8865b1 🐛 fix: refactor user store and fix custom model list form (#2620)
* ♻️ refactor: refactor user store

* ♻️ refactor: refactor the user trace

* 🐛 fix: fix parser model

* 🐛 fix: fix parser model

* 🐛 fix: fix parser model

* ♻️ refactor: refactor modal

* 🐛 fix: try to fix modal

* 🐛 fix: fix model list select error

*  test: add test for model list
2024-05-23 22:33:07 +08:00
Arvin Xu 882ebbe940 feat: support upload images to s3 (#2547)
* ♻️ refactor: refactor file by file and upload for upload to s3

*  feat: support upload file to s3

*  test: fix test

* 🛂 feat: add auth for the upload path

*  test: fix circular deps

*  test: add more tests

*  test: add more tests

*  test: add more tests

*  test: add more tests
2024-05-18 22:30:48 +08:00
Arvin Xu 948b2578eb ♻️ refactor: user store add an auth slice (#2214)
* ♻️ refactor: refactor the user store with auth slice

* ♻️ refactor: separate common and sync slice

* 🧑‍💻 chore: add an isMobile selector

* ♻️ refactor: refactor the auth action and common action

* 🎨 chore: clean code
2024-05-03 09:52:15 +08:00
Arvin Xu a3cb53804d ♻️ refactor: rename globalStore to userStore (#2264)
* ♻️ refactor: rename globalStore to userStore

* ♻️ refactor: refactor the globalStore usage

* ♻️ refactor: clean the user preference

* 🐛 fix: fix preference init

* ♻️ refactor: refactor the global Store

* 🎨 chore: improve code
2024-04-28 23:28:17 +08:00