@lobehub/chat 0.24.0 → 0.25.0

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,12 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ # [0.25.0](https://github.com/lobehub/lobe-chat/compare/v0.24.0...v0.25.0) (2023-07-26)
6
+
7
+ ### ✨ Features
8
+
9
+ - **sidebar**: Add import functionality and set labels and onClick functions ([03ea9bd](https://github.com/lobehub/lobe-chat/commit/03ea9bd))
10
+
5
11
  # [0.24.0](https://github.com/lobehub/lobe-chat/compare/v0.23.0...v0.24.0) (2023-07-26)
6
12
 
7
13
  ### ✨ Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -17,7 +17,7 @@ import { memo, useMemo } from 'react';
17
17
  import { useTranslation } from 'react-i18next';
18
18
  import { shallow } from 'zustand/shallow';
19
19
 
20
- import { bugs, homepage } from '@/../package.json';
20
+ import pkg from '@/../package.json';
21
21
  import AvatarWithUpload from '@/features/AvatarWithUpload';
22
22
  import { useSettings } from '@/store/settings';
23
23
 
@@ -63,29 +63,20 @@ export default memo(() => {
63
63
  {
64
64
  icon: <Icon icon={Feather} />,
65
65
  key: 'feedback',
66
- label: (
67
- <a href={bugs.url} rel="noreferrer" target={'_blank'}>
68
- {t('feedback')}
69
- </a>
70
- ),
66
+ label: t('feedback'),
67
+ onClick: () => window.open(pkg.bugs.url, '__blank'),
71
68
  },
72
69
  {
73
70
  icon: <Icon icon={FileClock} />,
74
71
  key: 'changelog',
75
- label: (
76
- <a href={`${homepage}/blob/master/CHANGELOG.md`} rel="noreferrer" target={'_blank'}>
77
- {t('changelog')}
78
- </a>
79
- ),
72
+ label: t('changelog'),
73
+ onClick: () => window.open(`${pkg.homepage}/blob/master/CHANGELOG.md`, '__blank'),
80
74
  },
81
75
  {
82
76
  icon: <Icon icon={Heart} />,
83
77
  key: 'about',
84
- label: (
85
- <a href={homepage} rel="noreferrer" target={'_blank'}>
86
- {t('about')}
87
- </a>
88
- ),
78
+ label: t('about'),
79
+ onClick: () => window.open(pkg.homepage, '__blank'),
89
80
  },
90
81
  {
91
82
  type: 'divider',
@@ -93,7 +84,8 @@ export default memo(() => {
93
84
  {
94
85
  icon: <Icon icon={Settings} />,
95
86
  key: 'setting',
96
- label: <div onClick={() => Router.push('/setting')}>{t('setting')}</div>,
87
+ label: t('setting'),
88
+ onClick: () => Router.push('/setting'),
97
89
  },
98
90
  ],
99
91
  [],
@@ -104,9 +96,7 @@ export default memo(() => {
104
96
  avatar={<AvatarWithUpload />}
105
97
  bottomActions={
106
98
  <>
107
- <a href={homepage} rel="noreferrer" target={'_blank'}>
108
- <ActionIcon icon={Github} />
109
- </a>
99
+ <ActionIcon icon={Github} onClick={() => window.open(pkg.homepage, '__blank')} />
110
100
  <Dropdown arrow={false} menu={{ items }} trigger={['click']}>
111
101
  <ActionIcon icon={Settings2} />
112
102
  </Dropdown>