@lobehub/chat 0.77.0 → 0.77.2
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/.github/workflows/auto-merge.yml +3 -10
- package/.github/workflows/sync.yml +1 -1
- package/CHANGELOG.md +50 -0
- package/bun.lockb +0 -0
- package/locales/en_US/market.json +1 -1
- package/locales/en_US/setting.json +1 -1
- package/locales/ru_RU/market.json +1 -1
- package/locales/zh_CN/common.json +1 -1
- package/locales/zh_CN/empty.json +1 -1
- package/locales/zh_CN/error.json +1 -1
- package/locales/zh_CN/market.json +1 -1
- package/locales/zh_CN/plugin.json +1 -1
- package/locales/zh_CN/setting.json +1 -1
- package/locales/zh_CN/welcome.json +1 -1
- package/package.json +1 -1
- package/src/locales/resources/en_US.ts +1 -1
- package/src/locales/resources/index.ts +6 -6
- package/src/locales/resources/ru_RU.ts +1 -1
- package/src/locales/resources/zh_CN.ts +1 -1
- package/src/pages/settings/features/Banner/index.tsx +95 -0
- package/src/pages/settings/features/Header/Desktop.tsx +2 -5
- package/src/pages/settings/features/Header/Mobile.tsx +1 -1
- package/src/pages/settings/features/Settings/index.tsx +16 -77
|
@@ -11,18 +11,11 @@ jobs:
|
|
|
11
11
|
steps:
|
|
12
12
|
- uses: actions/checkout@v3
|
|
13
13
|
|
|
14
|
-
- name: Install
|
|
15
|
-
uses:
|
|
16
|
-
with:
|
|
17
|
-
version: 7
|
|
18
|
-
|
|
19
|
-
- name: Setup Node.js environment
|
|
20
|
-
uses: actions/setup-node@v3
|
|
21
|
-
with:
|
|
22
|
-
node-version: '18'
|
|
14
|
+
- name: Install bun
|
|
15
|
+
uses: oven-sh/setup-bun@v1
|
|
23
16
|
|
|
24
17
|
- name: Install deps
|
|
25
|
-
run:
|
|
18
|
+
run: bun i
|
|
26
19
|
|
|
27
20
|
- name: Merge
|
|
28
21
|
uses: ahmadnassri/action-dependabot-auto-merge@v2
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.77.2](https://github.com/lobehub/lobe-chat/compare/v0.77.1...v0.77.2)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-09-15**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **settings**: Fix settings route.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **settings**: Fix settings route, closes [#195](https://github.com/lobehub/lobe-chat/issues/195) ([1b7d84e](https://github.com/lobehub/lobe-chat/commit/1b7d84e))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.77.1](https://github.com/lobehub/lobe-chat/compare/v0.77.0...v0.77.1)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-09-14**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fix lint.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Fix lint ([9f4f9d7](https://github.com/lobehub/lobe-chat/commit/9f4f9d7))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 0.77.0](https://github.com/lobehub/lobe-chat/compare/v0.76.2...v0.77.0)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-09-14**</sup>
|
package/bun.lockb
CHANGED
|
Binary file
|
package/locales/zh_CN/empty.json
CHANGED
package/locales/zh_CN/error.json
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import en_US from './en_US';
|
|
2
|
+
import ru_RU from './ru_RU';
|
|
3
|
+
import zh_CN from './zh_CN';
|
|
4
4
|
|
|
5
5
|
const resources = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
'en-US': en_US,
|
|
7
|
+
'ru-RU': ru_RU,
|
|
8
|
+
'zh-CN': zh_CN,
|
|
9
9
|
} as const;
|
|
10
10
|
export default resources;
|
|
11
11
|
export const defaultResources = zh_CN;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { GridBackground, Icon, Logo } from '@lobehub/ui';
|
|
2
|
+
import { createStyles, useResponsive } from 'antd-style';
|
|
3
|
+
import { PackageCheck } from 'lucide-react';
|
|
4
|
+
import { rgba } from 'polished';
|
|
5
|
+
import { ReactNode, memo } from 'react';
|
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
|
7
|
+
|
|
8
|
+
import pkg from '@/../package.json';
|
|
9
|
+
|
|
10
|
+
const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
11
|
+
background: css`
|
|
12
|
+
position: absolute;
|
|
13
|
+
bottom: -10%;
|
|
14
|
+
left: 0;
|
|
15
|
+
width: 100%;
|
|
16
|
+
`,
|
|
17
|
+
banner: css`
|
|
18
|
+
position: relative;
|
|
19
|
+
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
|
|
22
|
+
width: 100%;
|
|
23
|
+
max-width: 1024px;
|
|
24
|
+
height: 160px;
|
|
25
|
+
padding: 4px;
|
|
26
|
+
|
|
27
|
+
background: radial-gradient(
|
|
28
|
+
120% 120% at 20% 100%,
|
|
29
|
+
${isDarkMode ? rgba(token.colorBgContainer, 0.5) : token.colorBgContainer} 32%,
|
|
30
|
+
${isDarkMode ? token.colorPrimaryBgHover : rgba(token.colorPrimaryBgHover, 0.3)} 50%,
|
|
31
|
+
${isDarkMode ? token.colorPrimaryHover : rgba(token.colorPrimaryHover, 0.3)} 100%
|
|
32
|
+
);
|
|
33
|
+
border: 1px solid ${token.colorBorderSecondary};
|
|
34
|
+
border-radius: ${token.borderRadiusLG}px;
|
|
35
|
+
`,
|
|
36
|
+
logo: css`
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 50%;
|
|
39
|
+
left: 32px;
|
|
40
|
+
transform: translateY(-50%);
|
|
41
|
+
`,
|
|
42
|
+
mobile: css`
|
|
43
|
+
margin-top: -16px;
|
|
44
|
+
|
|
45
|
+
.ant-tabs-tab,
|
|
46
|
+
.ant-tabs-tab + .ant-tabs-tab {
|
|
47
|
+
margin: 4px 8px !important;
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
tag: css`
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 6px;
|
|
53
|
+
right: 12px;
|
|
54
|
+
|
|
55
|
+
font-family: ${token.fontFamilyCode};
|
|
56
|
+
font-size: 12px;
|
|
57
|
+
color: ${isDarkMode ? token.colorPrimaryBg : token.colorPrimaryActive};
|
|
58
|
+
|
|
59
|
+
opacity: 0.5;
|
|
60
|
+
`,
|
|
61
|
+
}));
|
|
62
|
+
|
|
63
|
+
const Banner = memo<{ nav: ReactNode }>(({ nav }) => {
|
|
64
|
+
const { styles, theme } = useStyles();
|
|
65
|
+
const { mobile } = useResponsive();
|
|
66
|
+
|
|
67
|
+
if (mobile)
|
|
68
|
+
return (
|
|
69
|
+
<Flexbox align={'flex-end'} className={styles.mobile} horizontal justify={'center'}>
|
|
70
|
+
{nav}
|
|
71
|
+
</Flexbox>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<Flexbox align={'flex-end'} className={styles.banner} horizontal justify={'center'}>
|
|
76
|
+
<GridBackground
|
|
77
|
+
animation
|
|
78
|
+
className={styles.background}
|
|
79
|
+
colorBack={theme.colorFillSecondary}
|
|
80
|
+
colorFront={theme.colorPrimary}
|
|
81
|
+
random
|
|
82
|
+
/>
|
|
83
|
+
{nav}
|
|
84
|
+
<div className={styles.logo}>
|
|
85
|
+
<Logo extra={'Chat'} type={'text'} />
|
|
86
|
+
</div>
|
|
87
|
+
<Flexbox align={'center'} className={styles.tag} gap={4} horizontal>
|
|
88
|
+
<Icon icon={PackageCheck} />
|
|
89
|
+
<div>{`${pkg.version}`}</div>
|
|
90
|
+
</Flexbox>
|
|
91
|
+
</Flexbox>
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export default Banner;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ChatHeader, ChatHeaderTitle } from '@lobehub/ui';
|
|
2
|
-
import Router from 'next/router';
|
|
1
|
+
import { ChatHeader, ChatHeaderTitle, Logo } from '@lobehub/ui';
|
|
3
2
|
import { memo } from 'react';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
5
4
|
|
|
@@ -8,9 +7,7 @@ const Index = memo(() => {
|
|
|
8
7
|
|
|
9
8
|
return (
|
|
10
9
|
<ChatHeader
|
|
11
|
-
left={<ChatHeaderTitle title={t('header.global')} />}
|
|
12
|
-
onBackClick={() => Router.back()}
|
|
13
|
-
showBackButton
|
|
10
|
+
left={<ChatHeaderTitle title={<Logo extra={t('header.global')} type={'text'} />} />}
|
|
14
11
|
/>
|
|
15
12
|
);
|
|
16
13
|
});
|
|
@@ -1,65 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createStyles } from 'antd-style';
|
|
3
|
-
import { PackageCheck } from 'lucide-react';
|
|
4
|
-
import { rgba } from 'polished';
|
|
1
|
+
import { TabsNav } from '@lobehub/ui';
|
|
5
2
|
import { memo, useMemo } from 'react';
|
|
6
3
|
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { Center
|
|
4
|
+
import { Center } from 'react-layout-kit';
|
|
8
5
|
|
|
9
6
|
import { useGlobalStore } from '@/store/global';
|
|
10
7
|
|
|
11
|
-
import
|
|
8
|
+
import Banner from '../Banner';
|
|
12
9
|
import Agent from './Agent';
|
|
13
10
|
import Common from './Common';
|
|
14
11
|
import LLM from './LLM';
|
|
15
12
|
|
|
16
|
-
const useStyles = createStyles(({ css, token, isDarkMode }) => ({
|
|
17
|
-
background: css`
|
|
18
|
-
position: absolute;
|
|
19
|
-
bottom: -10%;
|
|
20
|
-
left: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
`,
|
|
23
|
-
logo: css`
|
|
24
|
-
position: absolute;
|
|
25
|
-
top: 50%;
|
|
26
|
-
left: 32px;
|
|
27
|
-
transform: translateY(-50%);
|
|
28
|
-
`,
|
|
29
|
-
tabs: css`
|
|
30
|
-
position: relative;
|
|
31
|
-
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
|
|
34
|
-
width: 100%;
|
|
35
|
-
max-width: 1024px;
|
|
36
|
-
height: 160px;
|
|
37
|
-
padding: 4px;
|
|
38
|
-
|
|
39
|
-
background: radial-gradient(
|
|
40
|
-
120% 120% at 20% 100%,
|
|
41
|
-
${isDarkMode ? rgba(token.colorBgContainer, 0.5) : token.colorBgContainer} 32%,
|
|
42
|
-
${isDarkMode ? token.colorPrimaryBgHover : rgba(token.colorPrimaryBgHover, 0.3)} 50%,
|
|
43
|
-
${isDarkMode ? token.colorPrimaryHover : rgba(token.colorPrimaryHover, 0.3)} 100%
|
|
44
|
-
);
|
|
45
|
-
border: 1px solid ${token.colorBorderSecondary};
|
|
46
|
-
border-radius: ${token.borderRadiusLG}px;
|
|
47
|
-
`,
|
|
48
|
-
tag: css`
|
|
49
|
-
position: absolute;
|
|
50
|
-
top: 6px;
|
|
51
|
-
right: 12px;
|
|
52
|
-
|
|
53
|
-
font-family: ${token.fontFamilyCode};
|
|
54
|
-
font-size: 12px;
|
|
55
|
-
color: ${isDarkMode ? token.colorPrimaryBg : token.colorPrimaryActive};
|
|
56
|
-
|
|
57
|
-
opacity: 0.5;
|
|
58
|
-
`,
|
|
59
|
-
}));
|
|
60
|
-
|
|
61
13
|
const Settings = memo(() => {
|
|
62
|
-
const { styles, theme } = useStyles();
|
|
63
14
|
const { t } = useTranslation('setting');
|
|
64
15
|
|
|
65
16
|
const [tab, setTab] = useGlobalStore((s) => [s.settingsTab, s.switchSettingTabs]);
|
|
@@ -81,31 +32,19 @@ const Settings = memo(() => {
|
|
|
81
32
|
|
|
82
33
|
return (
|
|
83
34
|
<Center gap={16} width={'100%'}>
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{ key: 'agent', label: t('tab.agent') },
|
|
98
|
-
]}
|
|
99
|
-
onChange={(e) => setTab(e as any)}
|
|
100
|
-
/>
|
|
101
|
-
<div className={styles.logo}>
|
|
102
|
-
<Logo extra={'Chat'} type={'text'} />
|
|
103
|
-
</div>
|
|
104
|
-
<Flexbox align={'center'} className={styles.tag} gap={4} horizontal>
|
|
105
|
-
<Icon icon={PackageCheck} />
|
|
106
|
-
<div>{`${pkg.version}`}</div>
|
|
107
|
-
</Flexbox>
|
|
108
|
-
</Flexbox>
|
|
35
|
+
<Banner
|
|
36
|
+
nav={
|
|
37
|
+
<TabsNav
|
|
38
|
+
activeKey={tab}
|
|
39
|
+
items={[
|
|
40
|
+
{ key: 'common', label: t('tab.common') },
|
|
41
|
+
{ key: 'llm', label: t('tab.llm') },
|
|
42
|
+
{ key: 'agent', label: t('tab.agent') },
|
|
43
|
+
]}
|
|
44
|
+
onChange={(e) => setTab(e as any)}
|
|
45
|
+
/>
|
|
46
|
+
}
|
|
47
|
+
/>
|
|
109
48
|
{content}
|
|
110
49
|
</Center>
|
|
111
50
|
);
|