@lobehub/chat 0.113.0 → 0.113.1
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 +25 -0
- package/locales/de_DE/setting.json +5 -0
- package/locales/en_US/setting.json +5 -0
- package/locales/es_ES/setting.json +5 -0
- package/locales/fr_FR/setting.json +5 -0
- package/locales/ja_JP/setting.json +5 -0
- package/locales/ko_KR/setting.json +5 -0
- package/locales/pt_BR/setting.json +5 -0
- package/locales/ru_RU/setting.json +5 -0
- package/locales/tr_TR/setting.json +5 -0
- package/locales/zh_CN/setting.json +5 -0
- package/locales/zh_TW/setting.json +5 -0
- package/package.json +1 -1
- package/src/app/chat/features/Conversation/ChatList/Extras/TTS/Player.tsx +1 -1
- package/src/app/chat/features/Conversation/index.tsx +29 -10
- package/src/app/settings/common/Common.tsx +27 -1
- package/src/features/AvatarWithUpload/index.tsx +1 -1
- package/src/features/PluginStore/PluginItem/index.tsx +11 -4
- package/src/locales/default/setting.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.113.1](https://github.com/lobehub/lobe-chat/compare/v0.113.0...v0.113.1)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-12-16**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix fontsize setting and audio download style.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix fontsize setting and audio download style, closes [#433](https://github.com/lobehub/lobe-chat/issues/433) ([6882752](https://github.com/lobehub/lobe-chat/commit/6882752))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 0.113.0](https://github.com/lobehub/lobe-chat/compare/v0.112.1...v0.113.0)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2023-12-16**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.113.
|
|
3
|
+
"version": "0.113.1",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot 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",
|
|
@@ -18,7 +18,7 @@ const Player = memo<PlayerProps>(({ onRetry, error, onDelete, audio, isLoading,
|
|
|
18
18
|
const { t } = useTranslation('chat');
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<Flexbox align={'center'} horizontal style={{ minWidth:
|
|
21
|
+
<Flexbox align={'center'} horizontal style={{ minWidth: 200, width: '100%' }}>
|
|
22
22
|
{error ? (
|
|
23
23
|
<Alert
|
|
24
24
|
action={
|
|
@@ -5,20 +5,38 @@ import { useTranslation } from 'react-i18next';
|
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
7
|
import SafeSpacing from '@/components/SafeSpacing';
|
|
8
|
+
import { settingsSelectors, useGlobalStore } from '@/store/global';
|
|
8
9
|
|
|
9
10
|
import ChatList from './ChatList';
|
|
10
11
|
import ChatScrollAnchor from './ScrollAnchor';
|
|
11
12
|
import { useInitConversation } from './useInitConversation';
|
|
12
13
|
|
|
13
|
-
const useStyles = createStyles(
|
|
14
|
-
(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const useStyles = createStyles(({ css, responsive, stylish, cx }, fontSize: number = 14) =>
|
|
15
|
+
cx(
|
|
16
|
+
css`
|
|
17
|
+
overflow: hidden scroll;
|
|
18
|
+
height: 100%;
|
|
19
|
+
|
|
20
|
+
${responsive.mobile} {
|
|
21
|
+
${stylish.noScrollbar}
|
|
22
|
+
width: 100vw;
|
|
23
|
+
}
|
|
24
|
+
`,
|
|
25
|
+
fontSize !== 14 &&
|
|
26
|
+
css`
|
|
27
|
+
article[data-code-type='markdown'] {
|
|
28
|
+
p,
|
|
29
|
+
code,
|
|
30
|
+
pre,
|
|
31
|
+
ul,
|
|
32
|
+
ol,
|
|
33
|
+
li,
|
|
34
|
+
blockquote {
|
|
35
|
+
font-size: ${fontSize}px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
`,
|
|
39
|
+
),
|
|
22
40
|
);
|
|
23
41
|
|
|
24
42
|
interface ConversationProps {
|
|
@@ -29,7 +47,8 @@ interface ConversationProps {
|
|
|
29
47
|
const Conversation = memo<ConversationProps>(({ mobile, chatInput }) => {
|
|
30
48
|
const ref = useRef(null);
|
|
31
49
|
const { t } = useTranslation('chat');
|
|
32
|
-
const
|
|
50
|
+
const fontSize = useGlobalStore((s) => settingsSelectors.currentSettings(s).fontSize);
|
|
51
|
+
const { styles } = useStyles(fontSize);
|
|
33
52
|
|
|
34
53
|
// init conversation
|
|
35
54
|
useInitConversation();
|
|
@@ -131,7 +131,33 @@ const Common = memo<SettingsCommonProps>(({ showAccessCodeConfig }) => {
|
|
|
131
131
|
name: 'language',
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
children:
|
|
134
|
+
children: (
|
|
135
|
+
<SliderWithInput
|
|
136
|
+
marks={{
|
|
137
|
+
12: {
|
|
138
|
+
label: t('settingTheme.fontSize.marks.small'),
|
|
139
|
+
style: {
|
|
140
|
+
marginTop: 4,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
14: {
|
|
144
|
+
label: t('settingTheme.fontSize.marks.normal'),
|
|
145
|
+
style: {
|
|
146
|
+
marginTop: 4,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
18: {
|
|
150
|
+
label: t('settingTheme.fontSize.marks.large'),
|
|
151
|
+
style: {
|
|
152
|
+
marginTop: 4,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
}}
|
|
156
|
+
max={18}
|
|
157
|
+
min={12}
|
|
158
|
+
step={1}
|
|
159
|
+
/>
|
|
160
|
+
),
|
|
135
161
|
desc: t('settingTheme.fontSize.desc'),
|
|
136
162
|
label: t('settingTheme.fontSize.title'),
|
|
137
163
|
name: 'fontSize',
|
|
@@ -35,7 +35,7 @@ interface AvatarWithUploadProps {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const AvatarWithUpload = memo<AvatarWithUploadProps>(
|
|
38
|
-
({ size = 40, compressSize =
|
|
38
|
+
({ size = 40, compressSize = 256, style, id }) => {
|
|
39
39
|
const [avatar, setSettings] = useGlobalStore((st) => [st.settings.avatar, st.setSettings]);
|
|
40
40
|
const { styles } = useStyle();
|
|
41
41
|
|
|
@@ -16,15 +16,18 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
|
16
16
|
desc: css`
|
|
17
17
|
margin: 0 !important;
|
|
18
18
|
font-size: 12px;
|
|
19
|
+
line-height: 1;
|
|
19
20
|
color: ${token.colorTextDescription};
|
|
20
21
|
`,
|
|
21
22
|
link: css`
|
|
23
|
+
overflow: hidden;
|
|
22
24
|
color: ${token.colorText};
|
|
23
25
|
`,
|
|
24
26
|
title: css`
|
|
27
|
+
margin: 0 !important;
|
|
25
28
|
font-size: 14px;
|
|
26
29
|
font-weight: bold;
|
|
27
|
-
line-height:
|
|
30
|
+
line-height: 1;
|
|
28
31
|
`,
|
|
29
32
|
}));
|
|
30
33
|
|
|
@@ -47,15 +50,19 @@ const PluginItem = memo<InstallPluginMeta>(({ identifier, homepage, author, type
|
|
|
47
50
|
style={{ overflow: 'hidden', position: 'relative' }}
|
|
48
51
|
>
|
|
49
52
|
<Avatar avatar={meta.avatar} style={{ flex: 'none', overflow: 'hidden' }} />
|
|
50
|
-
<Flexbox flex={1} style={{ overflow: 'hidden', position: 'relative' }}>
|
|
53
|
+
<Flexbox flex={1} gap={4} style={{ overflow: 'hidden', position: 'relative' }}>
|
|
51
54
|
<Flexbox align={'center'} gap={8} horizontal>
|
|
52
55
|
<Tooltip title={identifier}>
|
|
53
56
|
{homepage ? (
|
|
54
57
|
<Link className={styles.link} href={homepage} target={'_blank'}>
|
|
55
|
-
<
|
|
58
|
+
<Paragraph className={styles.title} ellipsis={{ rows: 1 }}>
|
|
59
|
+
{meta.title}
|
|
60
|
+
</Paragraph>
|
|
56
61
|
</Link>
|
|
57
62
|
) : (
|
|
58
|
-
<
|
|
63
|
+
<Paragraph className={styles.title} ellipsis={{ rows: 1 }}>
|
|
64
|
+
{meta.title}
|
|
65
|
+
</Paragraph>
|
|
59
66
|
)}
|
|
60
67
|
</Tooltip>
|
|
61
68
|
<PluginTag author={author} type={type} />
|