@lobehub/chat 0.129.0 → 0.129.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 CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.129.1](https://github.com/lobehub/lobe-chat/compare/v0.129.0...v0.129.1)
6
+
7
+ <sup>Released on **2024-02-22**</sup>
8
+
9
+ <br/>
10
+
11
+ <details>
12
+ <summary><kbd>Improvements and Fixes</kbd></summary>
13
+
14
+ </details>
15
+
16
+ <div align="right">
17
+
18
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
19
+
20
+ </div>
21
+
5
22
  ## [Version 0.129.0](https://github.com/lobehub/lobe-chat/compare/v0.128.10...v0.129.0)
6
23
 
7
24
  <sup>Released on **2024-02-22**</sup>
@@ -19,6 +19,7 @@
19
19
  "title": "دردشة عشوائية"
20
20
  },
21
21
  "input": {
22
+ "more": "المزيد",
22
23
  "onlyAdd": "إضافة الرسالة فقط",
23
24
  "send": "إرسال",
24
25
  "sendWithCmdEnter": "اضغط {{meta}} + Enter للإرسال",
@@ -19,6 +19,7 @@
19
19
  "title": "Lass uns plaudern"
20
20
  },
21
21
  "input": {
22
+ "more": "Mehr",
22
23
  "onlyAdd": "Nur Nachricht hinzufügen",
23
24
  "send": "Senden",
24
25
  "sendWithCmdEnter": "Mit {{meta}} + Eingabetaste senden",
@@ -19,6 +19,7 @@
19
19
  "title": "Just Chat"
20
20
  },
21
21
  "input": {
22
+ "more": "more",
22
23
  "onlyAdd": "Only add message",
23
24
  "send": "Send",
24
25
  "sendWithCmdEnter": "Press {{meta}} + Enter to send",
@@ -19,6 +19,7 @@
19
19
  "title": "Charla casual"
20
20
  },
21
21
  "input": {
22
+ "more": "más",
22
23
  "onlyAdd": "Añadir solo",
23
24
  "send": "Enviar",
24
25
  "sendWithCmdEnter": "Enviar con {{meta}} + Enter",
@@ -19,6 +19,7 @@
19
19
  "title": "Discutons un peu"
20
20
  },
21
21
  "input": {
22
+ "more": "Plus",
22
23
  "onlyAdd": "Ajouter uniquement",
23
24
  "send": "Envoyer",
24
25
  "sendWithCmdEnter": "Envoyer avec {{meta}} + Entrée",
@@ -19,6 +19,7 @@
19
19
  "title": "Chiacchierata casuale"
20
20
  },
21
21
  "input": {
22
+ "more": "Ulteriori",
22
23
  "onlyAdd": "Solo aggiungi messaggio",
23
24
  "send": "Invia",
24
25
  "sendWithCmdEnter": "Invia premendo {{meta}} + Invio",
@@ -19,6 +19,7 @@
19
19
  "title": "気軽におしゃべり"
20
20
  },
21
21
  "input": {
22
+ "more": "もっと",
22
23
  "onlyAdd": "メッセージのみ追加",
23
24
  "send": "送信",
24
25
  "sendWithCmdEnter": "{{meta}} + Enter キーで送信",
@@ -19,6 +19,7 @@
19
19
  "title": "무작위 대화"
20
20
  },
21
21
  "input": {
22
+ "more": "더 많은",
22
23
  "onlyAdd": "메시지만 추가",
23
24
  "send": "전송",
24
25
  "sendWithCmdEnter": "{{meta}} + Enter 키로 전송",
@@ -19,6 +19,7 @@
19
19
  "title": "Praat maar raak"
20
20
  },
21
21
  "input": {
22
+ "more": "Meer",
22
23
  "onlyAdd": "Alleen bericht toevoegen",
23
24
  "send": "Verzenden",
24
25
  "sendWithCmdEnter": "Verzenden met {{meta}} + Enter",
@@ -19,6 +19,7 @@
19
19
  "title": "Pogadajmy sobie"
20
20
  },
21
21
  "input": {
22
+ "more": "więcej",
22
23
  "onlyAdd": "Tylko dodaj wiadomość",
23
24
  "send": "Wyślij",
24
25
  "sendWithCmdEnter": "Wyślij za pomocą klawisza {{meta}} + Enter",
@@ -19,6 +19,7 @@
19
19
  "title": "Conversa Aleatória"
20
20
  },
21
21
  "input": {
22
+ "more": "mais",
22
23
  "onlyAdd": "Apenas adicionar mensagem",
23
24
  "send": "Enviar",
24
25
  "sendWithCmdEnter": "Pressione {{meta}} + Enter para enviar",
@@ -19,6 +19,7 @@
19
19
  "title": "Просто поболтаем"
20
20
  },
21
21
  "input": {
22
+ "more": "больше",
22
23
  "onlyAdd": "Только добавить сообщение",
23
24
  "send": "Отправить",
24
25
  "sendWithCmdEnter": "Отправить с помощью {{meta}} + Enter",
@@ -19,6 +19,7 @@
19
19
  "title": "Sohbet Et"
20
20
  },
21
21
  "input": {
22
+ "more": "Daha fazla",
22
23
  "onlyAdd": "Sadece mesaj ekle",
23
24
  "send": "Gönder",
24
25
  "sendWithCmdEnter": "{{meta}} + Enter tuşuna basarak gönder",
@@ -19,6 +19,7 @@
19
19
  "title": "Chuyện phiếm"
20
20
  },
21
21
  "input": {
22
+ "more": "Thêm",
22
23
  "onlyAdd": "Chỉ thêm tin nhắn",
23
24
  "send": "Gửi",
24
25
  "sendWithCmdEnter": "Nhấn {{meta}} + Enter để gửi",
@@ -19,6 +19,7 @@
19
19
  "title": "随便聊聊"
20
20
  },
21
21
  "input": {
22
+ "more": "更多",
22
23
  "onlyAdd": "仅添加消息",
23
24
  "send": "发送",
24
25
  "sendWithCmdEnter": "按 {{meta}} + Enter 键发送",
@@ -19,6 +19,7 @@
19
19
  "title": "隨便聊聊"
20
20
  },
21
21
  "input": {
22
+ "more": "更多",
22
23
  "onlyAdd": "僅新增訊息",
23
24
  "send": "發送",
24
25
  "sendWithCmdEnter": "按 {{meta}} + Enter 鍵發送",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.129.0",
3
+ "version": "0.129.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",
@@ -82,9 +82,9 @@
82
82
  "@icons-pack/react-simple-icons": "^9",
83
83
  "@lobehub/chat-plugin-sdk": "latest",
84
84
  "@lobehub/chat-plugins-gateway": "latest",
85
- "@lobehub/icons": "^1.10.2",
85
+ "@lobehub/icons": "^1.11.1",
86
86
  "@lobehub/tts": "latest",
87
- "@lobehub/ui": "latest",
87
+ "@lobehub/ui": "^1.129.2",
88
88
  "@vercel/analytics": "^1",
89
89
  "ahooks": "^3",
90
90
  "ai": "^2",
Binary file
@@ -179,6 +179,7 @@ const Footer = memo<{ setExpand?: (expand: boolean) => void }>(({ setExpand }) =
179
179
  trigger={['hover']}
180
180
  >
181
181
  <Button
182
+ aria-label={t('input.more')}
182
183
  className={styles.arrow}
183
184
  icon={<Icon icon={LucideChevronDown} />}
184
185
  type={'primary'}
@@ -1,4 +1,4 @@
1
- import { Viewport } from 'next';
1
+ import { ResolvingViewport } from 'next';
2
2
  import { cookies } from 'next/headers';
3
3
  import { PropsWithChildren } from 'react';
4
4
  import { isRtlLang } from 'rtl-detect';
@@ -12,6 +12,7 @@ import {
12
12
  LOBE_THEME_PRIMARY_COLOR,
13
13
  } from '@/const/theme';
14
14
  import Layout from '@/layout/GlobalLayout';
15
+ import { isMobileDevice } from '@/utils/responsive';
15
16
 
16
17
  import StyleRegistry from './StyleRegistry';
17
18
 
@@ -50,15 +51,20 @@ export default RootLayout;
50
51
 
51
52
  export { default as metadata } from './metadata';
52
53
 
53
- export const viewport: Viewport = {
54
- initialScale: 1,
55
- maximumScale: 1,
56
- minimumScale: 1,
57
- themeColor: [
58
- { color: '#f8f8f8', media: '(prefers-color-scheme: light)' },
59
- { color: '#000', media: '(prefers-color-scheme: dark)' },
60
- ],
61
- userScalable: false,
62
- viewportFit: 'cover',
63
- width: 'device-width',
54
+ export const generateViewport = async (): ResolvingViewport => {
55
+ const isMobile = isMobileDevice();
56
+
57
+ const dynamicScale = isMobile ? { maximumScale: 1, userScalable: false } : {};
58
+
59
+ return {
60
+ ...dynamicScale,
61
+ initialScale: 1,
62
+ minimumScale: 1,
63
+ themeColor: [
64
+ { color: '#f8f8f8', media: '(prefers-color-scheme: light)' },
65
+ { color: '#000', media: '(prefers-color-scheme: dark)' },
66
+ ],
67
+ viewportFit: 'cover',
68
+ width: 'device-width',
69
+ };
64
70
  };
@@ -11,7 +11,7 @@ export default memo(() => {
11
11
  const { t } = useTranslation('setting');
12
12
  return (
13
13
  <>
14
- <PageTitle title={t('tab.llm')} />
14
+ <PageTitle title={t('tab.tts')} />
15
15
  <TTS />
16
16
  </>
17
17
  );
@@ -1,9 +1,9 @@
1
- import { Logo } from '@lobehub/ui';
2
1
  import { Upload } from 'antd';
3
2
  import { createStyles } from 'antd-style';
4
3
  import Avatar from 'next/image';
5
4
  import { CSSProperties, memo } from 'react';
6
5
 
6
+ import { imageUrl } from '@/const/url';
7
7
  import { useGlobalStore } from '@/store/global';
8
8
  import { commonSelectors } from '@/store/global/selectors';
9
9
  import { imageToBase64 } from '@/utils/imageToBase64';
@@ -55,11 +55,12 @@ const AvatarWithUpload = memo<AvatarWithUploadProps>(
55
55
  return (
56
56
  <div className={styles} id={id} style={{ maxHeight: size, maxWidth: size, ...style }}>
57
57
  <Upload beforeUpload={handleUploadAvatar} itemRender={() => void 0} maxCount={1}>
58
- {avatar ? (
59
- <Avatar alt={'avatar'} height={size} src={avatar} width={size} />
60
- ) : (
61
- <Logo size={size} />
62
- )}
58
+ <Avatar
59
+ alt={avatar ? 'userAvatar' : 'LobeChat'}
60
+ height={size}
61
+ src={!!avatar ? avatar : imageUrl('logo.png')}
62
+ width={size}
63
+ />
63
64
  </Upload>
64
65
  </div>
65
66
  );
@@ -17,7 +17,7 @@ import { memo } from 'react';
17
17
  import { useTranslation } from 'react-i18next';
18
18
  import { Flexbox } from 'react-layout-kit';
19
19
 
20
- import { ABOUT, CHANGELOG, DISCORD, DOCUMENTS, FEEDBACK, GITHUB } from '@/const/url';
20
+ import { ABOUT, CHANGELOG, DISCORD, DOCUMENTS, FEEDBACK } from '@/const/url';
21
21
  import DataImporter from '@/features/DataImporter';
22
22
  import { configService } from '@/services/config';
23
23
  import { GlobalStore, useGlobalStore } from '@/store/global';
@@ -120,13 +120,10 @@ const BottomActions = memo<BottomActionProps>(({ tab }) => {
120
120
 
121
121
  return (
122
122
  <>
123
- <ActionIcon
124
- icon={Github}
125
- onClick={() => window.open(GITHUB)}
126
- placement={'right'}
127
- title={'GitHub'}
128
- />
129
- <Link href={DOCUMENTS} target={'_blank'}>
123
+ <Link aria-label={'GitHub'} href={DOCUMENTS} target={'_blank'}>
124
+ <ActionIcon icon={Github} placement={'right'} title={'GitHub'} />
125
+ </Link>
126
+ <Link aria-label={t('document')} href={DOCUMENTS} target={'_blank'}>
130
127
  <ActionIcon icon={Book} placement={'right'} title={t('document')} />
131
128
  </Link>
132
129
  <Dropdown arrow={false} menu={{ items }} trigger={['click']}>
@@ -19,6 +19,7 @@ const TopActions = memo<TopActionProps>(({ tab }) => {
19
19
  return (
20
20
  <>
21
21
  <Link
22
+ aria-label={t('tab.chat')}
22
23
  href={'/chat'}
23
24
  onClick={(e) => {
24
25
  e.preventDefault();
@@ -33,7 +34,7 @@ const TopActions = memo<TopActionProps>(({ tab }) => {
33
34
  title={t('tab.chat')}
34
35
  />
35
36
  </Link>
36
- <Link href={'/market'}>
37
+ <Link aria-label={t('tab.market')} href={'/market'}>
37
38
  <ActionIcon
38
39
  active={tab === SidebarTabKey.Market}
39
40
  icon={Compass}
@@ -21,6 +21,7 @@ export default {
21
21
  title: '随便聊聊',
22
22
  },
23
23
  input: {
24
+ more: '更多',
24
25
  onlyAdd: '仅添加消息',
25
26
  send: '发送',
26
27
  sendWithCmdEnter: '按 {{meta}} + Enter 键发送',