@lobehub/lobehub 2.0.0-next.318 → 2.0.0-next.319
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.319](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.318...v2.0.0-next.319)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-20**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Slove commnuity user avatarUrl is wrong, should update others in profile.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Slove commnuity user avatarUrl is wrong, should update others in profile, closes [#11634](https://github.com/lobehub/lobe-chat/issues/11634) ([04465c8](https://github.com/lobehub/lobe-chat/commit/04465c8))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 2.0.0-next.318](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.317...v2.0.0-next.318)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2026-01-20**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.319",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -4,7 +4,7 @@ import { SiGithub, SiX } from '@icons-pack/react-simple-icons';
|
|
|
4
4
|
import { ActionIcon, Avatar, Button, Flexbox, Text, Tooltip, TooltipGroup } from '@lobehub/ui';
|
|
5
5
|
import { cssVar } from 'antd-style';
|
|
6
6
|
import { Globe } from 'lucide-react';
|
|
7
|
-
import { memo } from 'react';
|
|
7
|
+
import { memo, useMemo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
10
10
|
import { useUserDetailContext } from '../DetailProvider';
|
|
@@ -19,12 +19,31 @@ const UserHeader = memo(() => {
|
|
|
19
19
|
const displayName = user.displayName || user.userName || user.namespace;
|
|
20
20
|
const username = user.userName || user.namespace;
|
|
21
21
|
|
|
22
|
+
// Normalize avatar URL - convert relative paths to absolute URLs
|
|
23
|
+
const avatarUrl = useMemo(() => {
|
|
24
|
+
if (!user.avatarUrl) return undefined;
|
|
25
|
+
// If it's a relative path (starts with /), prepend the origin
|
|
26
|
+
if (user.avatarUrl.startsWith('/')) {
|
|
27
|
+
return `${window.location.origin}${user.avatarUrl}`;
|
|
28
|
+
}
|
|
29
|
+
return user.avatarUrl;
|
|
30
|
+
}, [user.avatarUrl]);
|
|
31
|
+
|
|
32
|
+
const bannerUrl = useMemo(() => {
|
|
33
|
+
if (!user.bannerUrl) return null;
|
|
34
|
+
// If it's a relative path (starts with /), prepend the origin
|
|
35
|
+
if (user.bannerUrl.startsWith('/')) {
|
|
36
|
+
return `${window.location.origin}${user.bannerUrl}`;
|
|
37
|
+
}
|
|
38
|
+
return user.bannerUrl;
|
|
39
|
+
}, [user.bannerUrl]);
|
|
40
|
+
|
|
22
41
|
return (
|
|
23
42
|
<>
|
|
24
|
-
<Banner avatar={
|
|
43
|
+
<Banner avatar={avatarUrl} bannerUrl={bannerUrl} />
|
|
25
44
|
<Flexbox gap={16}>
|
|
26
45
|
<Avatar
|
|
27
|
-
avatar={
|
|
46
|
+
avatar={avatarUrl}
|
|
28
47
|
shape={'square'}
|
|
29
48
|
size={64}
|
|
30
49
|
style={{ boxShadow: `0 0 0 4px ${cssVar.colorBgContainer}`, flexShrink: 0 }}
|
|
@@ -46,6 +46,9 @@ const UserDetailPage = memo<UserDetailPageProps>(({ mobile }) => {
|
|
|
46
46
|
// Call the original onSuccess callback if provided
|
|
47
47
|
onSuccess?.(profile);
|
|
48
48
|
|
|
49
|
+
// Refresh page data to show updated profile
|
|
50
|
+
mutate();
|
|
51
|
+
|
|
49
52
|
// Navigate to new URL if userName changed
|
|
50
53
|
const newUserName = profile.userName || profile.namespace;
|
|
51
54
|
if (newUserName && newUserName !== currentUserName) {
|
|
@@ -53,7 +56,7 @@ const UserDetailPage = memo<UserDetailPageProps>(({ mobile }) => {
|
|
|
53
56
|
}
|
|
54
57
|
});
|
|
55
58
|
},
|
|
56
|
-
[data?.user?.userName, data?.user?.namespace, openProfileSetup, navigate],
|
|
59
|
+
[data?.user?.userName, data?.user?.namespace, openProfileSetup, navigate, mutate],
|
|
57
60
|
);
|
|
58
61
|
|
|
59
62
|
const contextConfig = useMemo(() => {
|