@lobehub/chat 0.85.0 → 0.85.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.
@@ -47,6 +47,8 @@ jobs:
47
47
 
48
48
  由于 [LobeChat][lobechat] 上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,请查看 [详细教程][tutorial-zh-CN]
49
49
 
50
+ ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/273954625-df80c890-0822-4ac2-95e6-c990785cbed5.png)
51
+
50
52
  [lobechat]: https://github.com/lobehub/lobe-chat
51
53
  [tutorial-zh-CN]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN
52
54
  [tutorial-en-US]: https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.85.1](https://github.com/lobehub/lobe-chat/compare/v0.85.0...v0.85.1)
6
+
7
+ <sup>Released on **2023-10-10**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix mobile safearea (fix.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix mobile safearea (fix, closes [#211](https://github.com/lobehub/lobe-chat/issues/211) ([68775b8](https://github.com/lobehub/lobe-chat/commit/68775b8))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ## [Version 0.85.0](https://github.com/lobehub/lobe-chat/compare/v0.84.0...v0.85.0)
6
31
 
7
32
  <sup>Released on **2023-10-10**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.85.0",
3
+ "version": "0.85.1",
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",
@@ -4,12 +4,10 @@ import { Icon } from '@lobehub/ui';
4
4
  import { useSize } from 'ahooks';
5
5
  import { Button, Upload } from 'antd';
6
6
  import { SendHorizonal } from 'lucide-react';
7
- import Link from 'next/link';
8
7
  import { memo, useCallback, useRef } from 'react';
9
8
  import { useTranslation } from 'react-i18next';
10
9
  import { Flexbox } from 'react-layout-kit';
11
10
 
12
- import { SESSION_CHAT_URL } from '@/const/url';
13
11
  import { useImportConfig } from '@/hooks/useImportConfig';
14
12
  import { useSessionStore } from '@/store/session';
15
13
 
@@ -23,8 +21,12 @@ const Banner = memo<{ mobile?: boolean }>(({ mobile }) => {
23
21
  const width = domSize?.width || 1024;
24
22
  const { t } = useTranslation('welcome');
25
23
  const { styles } = useStyles();
26
-
27
- const switchSession = useSessionStore((s) => s.switchSession);
24
+ const [switchSession, switchBackToChat, router, isMobile] = useSessionStore((s) => [
25
+ s.switchSession,
26
+ s.switchBackToChat,
27
+ s.router,
28
+ s.isMobile,
29
+ ]);
28
30
  const handleImport = useCallback((e: any) => {
29
31
  importConfig(e);
30
32
  switchSession();
@@ -47,20 +49,17 @@ const Banner = memo<{ mobile?: boolean }>(({ mobile }) => {
47
49
  {t('button.import')}
48
50
  </Button>
49
51
  </Upload>
50
- <Link
51
- href={SESSION_CHAT_URL()}
52
- onClick={(e) => {
53
- e.preventDefault();
54
- switchSession();
55
- }}
52
+ <Button
53
+ block={mobile}
54
+ onClick={() => (isMobile ? router?.push('/chat') : switchBackToChat())}
55
+ size={'large'}
56
+ type={'primary'}
56
57
  >
57
- <Button block={mobile} size={'large'} type={'primary'}>
58
- <Flexbox align={'center'} gap={4} horizontal justify={'center'}>
59
- {t('button.start')}
60
- <Icon icon={SendHorizonal} />
61
- </Flexbox>
62
- </Button>
63
- </Link>
58
+ <Flexbox align={'center'} gap={4} horizontal justify={'center'}>
59
+ {t('button.start')}
60
+ <Icon icon={SendHorizonal} />
61
+ </Flexbox>
62
+ </Button>
64
63
  </Flexbox>
65
64
  </>
66
65
  );
@@ -2,7 +2,7 @@ import type { FormProps } from '@lobehub/ui';
2
2
 
3
3
  export const HEADER_HEIGHT = 64;
4
4
  export const MOBILE_NABBAR_HEIGHT = 44;
5
- export const MOBILE_TABBAR_HEIGHT = 48;
5
+ export const MOBILE_TABBAR_HEIGHT = 60;
6
6
  export const CHAT_TEXTAREA_HEIGHT = 200;
7
7
  export const CHAT_TEXTAREA_HEIGHT_MOBILE = 120;
8
8
  export const CHAT_SIDEBAR_WIDTH = 280;
@@ -62,6 +62,7 @@ const AppLayoutMobile = memo<AppMobileLayoutProps>(
62
62
  <MobileTabBar className={styles.mobileTabBar} />
63
63
  </>
64
64
  )}
65
+ <SafeSpacing mobile position={'bottom'} />
65
66
  </Flexbox>
66
67
  );
67
68
  },