@lobehub/chat 0.121.2 → 0.121.3

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,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.121.3](https://github.com/lobehub/lobe-chat/compare/v0.121.2...v0.121.3)
6
+
7
+ <sup>Released on **2024-01-26**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Improve stop loading icon.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Improve stop loading icon, closes [#1154](https://github.com/lobehub/lobe-chat/issues/1154) ([6444fc2](https://github.com/lobehub/lobe-chat/commit/6444fc2))
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.121.2](https://github.com/lobehub/lobe-chat/compare/v0.121.1...v0.121.2)
6
31
 
7
32
  <sup>Released on **2024-01-25**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.121.2",
3
+ "version": "0.121.3",
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",
@@ -8,13 +8,13 @@ import {
8
8
  LucideChevronDown,
9
9
  LucideCommand,
10
10
  LucidePlus,
11
- StopCircle,
12
11
  } from 'lucide-react';
13
12
  import { rgba } from 'polished';
14
13
  import { memo } from 'react';
15
14
  import { useTranslation } from 'react-i18next';
16
15
  import { Center, Flexbox } from 'react-layout-kit';
17
16
 
17
+ import StopLoadingIcon from '@/components/StopLoading';
18
18
  import SaveTopic from '@/features/ChatInput/Topic';
19
19
  import { useSendMessage } from '@/features/ChatInput/useSend';
20
20
  import { useChatStore } from '@/store/chat';
@@ -33,6 +33,10 @@ const useStyles = createStyles(({ css, prefixCls, token }) => {
33
33
  width: 28px;
34
34
  }
35
35
  `,
36
+ loadingButton: css`
37
+ display: flex;
38
+ align-items: center;
39
+ `,
36
40
  overrideAntdIcon: css`
37
41
  .${prefixCls}-btn.${prefixCls}-btn-icon-only {
38
42
  display: flex;
@@ -111,7 +115,11 @@ const Footer = memo<{ setExpand?: (expand: boolean) => void }>(({ setExpand }) =
111
115
  <SaveTopic />
112
116
  <Flexbox style={{ minWidth: 92 }}>
113
117
  {loading ? (
114
- <Button icon={loading && <Icon icon={StopCircle} />} onClick={stopGenerateMessage}>
118
+ <Button
119
+ className={styles.loadingButton}
120
+ icon={<StopLoadingIcon />}
121
+ onClick={stopGenerateMessage}
122
+ >
115
123
  {t('input.stop')}
116
124
  </Button>
117
125
  ) : (
@@ -0,0 +1,38 @@
1
+ import { useTheme } from 'antd-style';
2
+ import { memo } from 'react';
3
+
4
+ const StopLoadingIcon = memo(() => {
5
+ const theme = useTheme();
6
+ return (
7
+ <svg
8
+ className={'anticon'}
9
+ color="currentColor"
10
+ height={16}
11
+ viewBox="0 0 1024 1024"
12
+ width={16}
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ xmlnsXlink="http://www.w3.org/1999/xlink"
15
+ >
16
+ <g fill="none">
17
+ <circle cx="512" cy="512" fill="none" r="426" stroke={theme.colorBorder} strokeWidth="72" />
18
+ <rect fill="currentColor" height="252" rx="24" ry="24" width="252" x="386" y="386" />
19
+ <path
20
+ d="M938.667 512C938.667 276.359 747.64 85.333 512 85.333"
21
+ stroke="currentColor"
22
+ strokeLinecap="round"
23
+ strokeWidth="73"
24
+ >
25
+ <animateTransform
26
+ attributeName="transform"
27
+ dur="1s"
28
+ from="0 512 512"
29
+ repeatCount="indefinite"
30
+ to="360 512 512"
31
+ type="rotate"
32
+ />
33
+ </path>
34
+ </g>
35
+ </svg>
36
+ );
37
+ });
38
+ export default StopLoadingIcon;