@lobehub/chat 0.82.3 → 0.82.5
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,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.82.5](https://github.com/lobehub/lobe-chat/compare/v0.82.4...v0.82.5)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-09-29**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Update theme color and styling of mobile settings page.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Update theme color and styling of mobile settings page ([1acfb71](https://github.com/lobehub/lobe-chat/commit/1acfb71))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.82.4](https://github.com/lobehub/lobe-chat/compare/v0.82.3...v0.82.4)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-09-29**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: 修正 localStorage 不存在造成设置页刷新 500 保存的问题.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: 修正 localStorage 不存在造成设置页刷新 500 保存的问题 ([b894cc8](https://github.com/lobehub/lobe-chat/commit/b894cc8))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.82.3](https://github.com/lobehub/lobe-chat/compare/v0.82.2...v0.82.3)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-09-29**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.5",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
package/src/app/metadata.ts
CHANGED
|
@@ -43,7 +43,7 @@ const metadata: Metadata = {
|
|
|
43
43
|
url: homepage,
|
|
44
44
|
},
|
|
45
45
|
themeColor: [
|
|
46
|
-
{ color: '#
|
|
46
|
+
{ color: '#f8f8f8', media: '(prefers-color-scheme: light)' },
|
|
47
47
|
{ color: '#000', media: '(prefers-color-scheme: dark)' },
|
|
48
48
|
],
|
|
49
49
|
title: title,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Divider } from 'antd';
|
|
4
|
+
import { createStyles } from 'antd-style';
|
|
4
5
|
import { memo } from 'react';
|
|
5
6
|
import { Center } from 'react-layout-kit';
|
|
6
7
|
|
|
8
|
+
import pkg from '@/../package.json';
|
|
7
9
|
import AgentCardBanner from '@/app/market/features/AgentCard/AgentCardBanner';
|
|
8
10
|
import Header from '@/app/market/features/Header';
|
|
9
11
|
import AvatarWithUpload from '@/features/AvatarWithUpload';
|
|
@@ -15,8 +17,20 @@ import { AVATAR } from '@/store/session/slices/chat/actions/share';
|
|
|
15
17
|
import List from '../features/SideBar/List';
|
|
16
18
|
import ExtraList from './ExtraList';
|
|
17
19
|
|
|
20
|
+
const useStyles = createStyles(({ css, token }) => ({
|
|
21
|
+
divider: css`
|
|
22
|
+
height: 6px;
|
|
23
|
+
background: ${token.colorFillTertiary};
|
|
24
|
+
`,
|
|
25
|
+
footer: css`
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
color: ${token.colorTextQuaternary};
|
|
28
|
+
`,
|
|
29
|
+
}));
|
|
30
|
+
|
|
18
31
|
const Setting = memo(() => {
|
|
19
32
|
const avatar = useGlobalStore((s) => s.settings.avatar);
|
|
33
|
+
const { styles } = useStyles();
|
|
20
34
|
useSwitchSideBarOnInit(SidebarTabKey.Setting);
|
|
21
35
|
return (
|
|
22
36
|
<AppMobileLayout navBar={<Header />} showTabBar>
|
|
@@ -24,17 +38,21 @@ const Setting = memo(() => {
|
|
|
24
38
|
mask
|
|
25
39
|
meta={{ avatar: avatar || AVATAR }}
|
|
26
40
|
size={10}
|
|
27
|
-
style={{ height:
|
|
41
|
+
style={{ height: 172, marginBottom: 0 }}
|
|
28
42
|
>
|
|
29
43
|
<Center style={{ position: 'absolute', zIndex: 2 }}>
|
|
30
|
-
<AvatarWithUpload size={
|
|
44
|
+
<AvatarWithUpload size={88} />
|
|
31
45
|
</Center>
|
|
32
46
|
</AgentCardBanner>
|
|
33
47
|
<div style={{ width: '100%' }}>
|
|
34
|
-
<Divider style={{ margin: '0 0 8px' }} />
|
|
35
48
|
<List />
|
|
36
|
-
<
|
|
49
|
+
<div className={styles.divider} />
|
|
37
50
|
<ExtraList />
|
|
51
|
+
<Center style={{ paddingInline: 64 }}>
|
|
52
|
+
<Divider>
|
|
53
|
+
<span className={styles.footer}>LobeChat v{pkg.version}</span>
|
|
54
|
+
</Divider>
|
|
55
|
+
</Center>
|
|
38
56
|
</div>
|
|
39
57
|
</AppMobileLayout>
|
|
40
58
|
);
|
|
@@ -2,6 +2,7 @@ import { StorageValue } from 'zustand/middleware/persist';
|
|
|
2
2
|
|
|
3
3
|
export const createLocalStorage = <State extends any>() => ({
|
|
4
4
|
getItem: <T extends State>(name: string): StorageValue<T> | undefined => {
|
|
5
|
+
if (!global.localStorage) return undefined;
|
|
5
6
|
const string = localStorage.getItem(name);
|
|
6
7
|
|
|
7
8
|
if (string) return JSON.parse(string) as StorageValue<T>;
|
|
@@ -9,9 +10,9 @@ export const createLocalStorage = <State extends any>() => ({
|
|
|
9
10
|
return undefined;
|
|
10
11
|
},
|
|
11
12
|
removeItem: (name: string) => {
|
|
12
|
-
localStorage.removeItem(name);
|
|
13
|
+
if (global.localStorage) localStorage.removeItem(name);
|
|
13
14
|
},
|
|
14
15
|
setItem: <T extends State>(name: string, state: T, version: number | undefined) => {
|
|
15
|
-
localStorage.setItem(name, JSON.stringify({ state, version }));
|
|
16
|
+
if (global.localStorage) localStorage.setItem(name, JSON.stringify({ state, version }));
|
|
16
17
|
},
|
|
17
18
|
});
|