@lobehub/chat 1.0.4 → 1.0.6

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,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.0.6](https://github.com/lobehub/lobe-chat/compare/v1.0.5...v1.0.6)
6
+
7
+ <sup>Released on **2024-06-17**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Fix footer being cut on wide screen.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Fix footer being cut on wide screen, closes [#2905](https://github.com/lobehub/lobe-chat/issues/2905) ([3a1e0cf](https://github.com/lobehub/lobe-chat/commit/3a1e0cf))
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
+
30
+ ### [Version 1.0.5](https://github.com/lobehub/lobe-chat/compare/v1.0.4...v1.0.5)
31
+
32
+ <sup>Released on **2024-06-17**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix onboard and auth for community version.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix onboard and auth for community version, closes [#2908](https://github.com/lobehub/lobe-chat/issues/2908) ([b02020d](https://github.com/lobehub/lobe-chat/commit/b02020d))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.0.4](https://github.com/lobehub/lobe-chat/compare/v1.0.3...v1.0.4)
6
56
 
7
57
  <sup>Released on **2024-06-17**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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",
@@ -18,7 +18,11 @@ const DesktopLayout = ({ children }: PropsWithChildren) => {
18
18
  width={'100%'}
19
19
  >
20
20
  <Logo size={36} style={{ alignSelf: 'flex-start' }} type={'text'} />
21
- <GridShowcase innerProps={{ gap: 24 }} style={{ maxWidth: 1024 }} width={'100%'}>
21
+ <GridShowcase
22
+ innerProps={{ gap: 24 }}
23
+ style={{ maxHeight: 'calc(100% - 104px)', maxWidth: 1024 }}
24
+ width={'100%'}
25
+ >
22
26
  {children}
23
27
  </GridShowcase>
24
28
  <Flexbox align={'center'} horizontal justify={'space-between'}>
package/src/middleware.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { clerkMiddleware } from '@clerk/nextjs/server';
1
+ import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server';
2
2
  import { NextResponse } from 'next/server';
3
3
 
4
4
  import { authEnv } from '@/config/auth';
@@ -13,6 +13,7 @@ export const config = {
13
13
  // include the /
14
14
  '/',
15
15
  '/chat(.*)',
16
+ '/settings(.*)',
16
17
  // ↓ cloud ↓
17
18
  ],
18
19
  };
@@ -42,8 +43,18 @@ const nextAuthMiddleware = auth((req) => {
42
43
  });
43
44
  });
44
45
 
46
+ const isProtectedRoute = createRouteMatcher([
47
+ '/settings(.*)',
48
+ // ↓ cloud ↓
49
+ ]);
50
+
45
51
  export default authEnv.NEXT_PUBLIC_ENABLE_CLERK_AUTH
46
- ? clerkMiddleware()
52
+ ? clerkMiddleware(
53
+ (auth, req) => {
54
+ if (isProtectedRoute(req)) auth().protect();
55
+ },
56
+ { signInUrl: '/login', signUpUrl: '/signup' },
57
+ )
47
58
  : authEnv.NEXT_PUBLIC_ENABLE_NEXT_AUTH
48
59
  ? nextAuthMiddleware
49
60
  : defaultMiddleware;
@@ -28,7 +28,8 @@ export const userRouter = router({
28
28
  // 有æķˆæŊïžŒæˆ–č€…åˆ›åŧščŋ‡åŠĐ手则čŪĪäļšæœ‰ conversation
29
29
  hasConversation: messageCount > 0 || sessionCount > 1,
30
30
 
31
- isOnboard: state.isOnboarded || false,
31
+ // always return true for community version
32
+ isOnboard: state.isOnboarded || true,
32
33
  preference: state.preference as UserPreference,
33
34
  settings: state.settings,
34
35
  userId: ctx.userId,