@lobehub/chat 0.96.1 → 0.96.2

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.96.2](https://github.com/lobehub/lobe-chat/compare/v0.96.1...v0.96.2)
6
+
7
+ <sup>Released on **2023-10-28**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Fix some styles and make updates to various files.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Fix some styles and make updates to various files ([44a5f0a](https://github.com/lobehub/lobe-chat/commit/44a5f0a))
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.96.1](https://github.com/lobehub/lobe-chat/compare/v0.96.0...v0.96.1)
6
31
 
7
32
  <sup>Released on **2023-10-28**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.96.1",
3
+ "version": "0.96.2",
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",
@@ -5,6 +5,7 @@ import Link from 'next/link';
5
5
  import { memo, useMemo, useRef } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
 
8
+ import { useStyles } from '@/app/chat/features/SessionListContent/List/Item';
8
9
  import { DEFAULT_INBOX_AVATAR } from '@/const/meta';
9
10
  import { INBOX_SESSION_ID } from '@/const/session';
10
11
  import { SESSION_CHAT_URL } from '@/const/url';
@@ -14,6 +15,7 @@ const { Item } = List;
14
15
 
15
16
  const Inbox = memo(() => {
16
17
  const ref = useRef(null);
18
+ const { styles } = useStyles();
17
19
  const isHovering = useHover(ref);
18
20
  const { t } = useTranslation('chat');
19
21
  const { mobile } = useResponsive();
@@ -48,8 +50,8 @@ const Inbox = memo(() => {
48
50
  <Item
49
51
  active={mobile ? false : activeId === INBOX_SESSION_ID}
50
52
  avatar={avatarRender}
53
+ className={styles.container}
51
54
  ref={ref}
52
- style={{ alignItems: 'center', borderRadius: 8 }}
53
55
  title={t('inbox.title')}
54
56
  />
55
57
  </Link>
@@ -14,15 +14,14 @@ import Actions from './Actions';
14
14
 
15
15
  const { Item } = List;
16
16
 
17
- const useStyles = createStyles(({ css }) => {
17
+ export const useStyles = createStyles(({ css, token, responsive }) => {
18
18
  return {
19
19
  container: css`
20
20
  position: relative;
21
- border-radius: 8px;
22
- `,
23
-
24
- modalRoot: css`
25
- z-index: 2000;
21
+ border-radius: ${token.borderRadius}px;
22
+ ${responsive.mobile} {
23
+ border-radius: 0;
24
+ }
26
25
  `,
27
26
  };
28
27
  });
@@ -5,16 +5,17 @@ import Image from 'next/image';
5
5
  import { memo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
 
8
+ import MobilePadding from '@/components/MobilePadding';
8
9
  import { AGENTS_INDEX_GITHUB } from '@/const/url';
9
10
 
10
11
  const Inner = memo(() => {
11
12
  const { t } = useTranslation('market');
12
13
  return (
13
- <div>
14
+ <MobilePadding>
14
15
  <Image
15
16
  alt={'banner'}
16
17
  height={602}
17
- src={'/images/market_modal_banner.webp'}
18
+ src={'/images/banner_market_modal.webp'}
18
19
  style={{ height: 'auto', marginBottom: 24, width: '100%' }}
19
20
  width={1602}
20
21
  />
@@ -45,7 +46,7 @@ const Inner = memo(() => {
45
46
  >
46
47
  {t('guide.func2.button')}
47
48
  </Button>
48
- </div>
49
+ </MobilePadding>
49
50
  );
50
51
  });
51
52
 
@@ -5,10 +5,15 @@ import { CSSProperties, ReactNode, memo } from 'react';
5
5
 
6
6
  const { Item } = List;
7
7
 
8
- const useStyles = createStyles(({ css }) => ({
8
+ const useStyles = createStyles(({ css, token, responsive }) => ({
9
9
  container: css`
10
+ position: relative;
10
11
  padding-top: 20px;
11
12
  padding-bottom: 20px;
13
+ border-radius: ${token.borderRadius}px;
14
+ ${responsive.mobile} {
15
+ border-radius: 0;
16
+ }
12
17
  `,
13
18
  }));
14
19
 
@@ -31,7 +31,9 @@ const SideBar = memo(() => {
31
31
  </div>
32
32
  </Flexbox>
33
33
  <UpgradeAlert />
34
- <List />
34
+ <Flexbox gap={2} style={{ paddingInline: 6 }}>
35
+ <List />
36
+ </Flexbox>
35
37
  </DraggablePanelBody>
36
38
  </FolderPanel>
37
39
  );
package/src/const/url.ts CHANGED
@@ -10,6 +10,7 @@ import { INBOX_SESSION_ID } from './session';
10
10
  export const GITHUB = pkg.homepage;
11
11
  export const CHANGELOG = urlJoin(GITHUB, 'blob/master/CHANGELOG.md');
12
12
  export const WIKI = urlJoin(GITHUB, 'wiki');
13
+ export const WIKI_PLUGIN_GUIDE = urlJoin(WIKI, 'Plugin-Development');
13
14
  export const ABOUT = pkg.homepage;
14
15
  export const FEEDBACK = pkg.bugs.url;
15
16
  export const DISCORD = 'https://discord.gg/AYFPHvv2jT';
@@ -181,7 +181,17 @@ const MarketList = memo(() => {
181
181
  {
182
182
  children: isEmpty ? loadingList : [...deprecatedList, ...customList, ...list],
183
183
  extra: (
184
- <Flexbox align={'center'} gap={8} horizontal>
184
+ <Space.Compact style={{ width: 'auto' }}>
185
+ <Button
186
+ icon={<Icon icon={LucideBlocks} />}
187
+ onClick={(e) => {
188
+ e.stopPropagation();
189
+ setModal(true);
190
+ }}
191
+ size={'small'}
192
+ >
193
+ {t('settingPlugin.addTooltip')}
194
+ </Button>
185
195
  {hasDeprecated ? (
186
196
  <Tooltip title={t('settingPlugin.clearDeprecated')}>
187
197
  <Button
@@ -193,34 +203,20 @@ const MarketList = memo(() => {
193
203
  }
194
204
  }}
195
205
  size={'small'}
196
- type={'text'}
197
206
  />
198
207
  </Tooltip>
199
208
  ) : null}
200
-
201
- <Space.Compact style={{ width: 'auto' }}>
202
- <Tooltip title={t('settingPlugin.addTooltip')}>
203
- <Button
204
- icon={<Icon icon={LucideBlocks} />}
205
- onClick={(e) => {
206
- e.stopPropagation();
207
- setModal(true);
208
- }}
209
- size={'small'}
210
- />
211
- </Tooltip>
212
- <Tooltip title={t('settingPlugin.settings')}>
213
- <Button
214
- icon={<Icon icon={LucideSettings} />}
215
- onClick={(e) => {
216
- e.stopPropagation();
217
- setShowSettings(true);
218
- }}
219
- size={'small'}
220
- />
221
- </Tooltip>
222
- </Space.Compact>
223
- </Flexbox>
209
+ <Tooltip title={t('settingPlugin.settings')}>
210
+ <Button
211
+ icon={<Icon icon={LucideSettings} />}
212
+ onClick={(e) => {
213
+ e.stopPropagation();
214
+ setShowSettings(true);
215
+ }}
216
+ size={'small'}
217
+ />
218
+ </Tooltip>
219
+ </Space.Compact>
224
220
  ),
225
221
  icon: LucideStore,
226
222
  title: t('settingPlugin.title'),
@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
 
7
7
  import MobilePadding from '@/components/MobilePadding';
8
- import { PLUGINS_INDEX_URL } from '@/const/url';
8
+ import { PLUGINS_INDEX_URL, WIKI_PLUGIN_GUIDE } from '@/const/url';
9
9
 
10
10
  interface MarketSettingModalProps {
11
11
  onOpenChange: (open: boolean) => void;
@@ -34,7 +34,14 @@ const MarketSettingModal = memo<MarketSettingModalProps>(({ open, onOpenChange }
34
34
  style={{ width: '100%' }}
35
35
  />
36
36
  ),
37
- desc: t('settings.modalDesc'),
37
+ desc: (
38
+ <>
39
+ {t('dev.modalDesc')}
40
+ <a href={WIKI_PLUGIN_GUIDE} rel="noreferrer" target={'_blank'}>
41
+ {WIKI_PLUGIN_GUIDE}
42
+ </a>
43
+ </>
44
+ ),
38
45
  label: t('settings.indexUrl.title'),
39
46
  },
40
47
  ],
@@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
6
6
  import { Flexbox } from 'react-layout-kit';
7
7
 
8
8
  import MobilePadding from '@/components/MobilePadding';
9
+ import { WIKI_PLUGIN_GUIDE } from '@/const/url';
9
10
  import { CustomPlugin } from '@/types/plugin';
10
11
 
11
12
  import ManifestForm from './ManifestForm';
@@ -102,7 +103,18 @@ const DevModal = memo<DevModalProps>(
102
103
  >
103
104
  <Flexbox gap={mobile ? 0 : 16}>
104
105
  <MobilePadding bottom={0} gap={16}>
105
- <Alert message={t('dev.modalDesc')} showIcon type={'info'} />
106
+ <Alert
107
+ message={
108
+ <>
109
+ {t('dev.modalDesc')}
110
+ <a href={WIKI_PLUGIN_GUIDE} rel="noreferrer" target={'_blank'}>
111
+ {WIKI_PLUGIN_GUIDE}
112
+ </a>
113
+ </>
114
+ }
115
+ showIcon
116
+ type={'info'}
117
+ />
106
118
  {/*<Tabs*/}
107
119
  {/* items={[*/}
108
120
  {/* { children: <MetaForm />, key: 'meta', label: t('dev.tabs.meta') },*/}