@lobehub/chat 1.42.6 → 1.43.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/changelog/v1.json +12 -0
  3. package/docs/.cdn.cache.json +1 -0
  4. package/docs/changelog/2025-01-03-user-profile.mdx +27 -0
  5. package/docs/changelog/2025-01-03-user-profile.zh-CN.mdx +26 -0
  6. package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +3 -1
  7. package/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx +2 -2
  8. package/locales/ar/auth.json +76 -4
  9. package/locales/bg-BG/auth.json +75 -3
  10. package/locales/de-DE/auth.json +78 -6
  11. package/locales/en-US/auth.json +78 -6
  12. package/locales/es-ES/auth.json +75 -3
  13. package/locales/fa-IR/auth.json +77 -5
  14. package/locales/fr-FR/auth.json +78 -6
  15. package/locales/it-IT/auth.json +76 -4
  16. package/locales/ja-JP/auth.json +76 -4
  17. package/locales/ko-KR/auth.json +75 -3
  18. package/locales/nl-NL/auth.json +76 -4
  19. package/locales/pl-PL/auth.json +76 -4
  20. package/locales/pt-BR/auth.json +76 -4
  21. package/locales/ru-RU/auth.json +75 -3
  22. package/locales/tr-TR/auth.json +74 -3
  23. package/locales/vi-VN/auth.json +75 -3
  24. package/locales/zh-CN/auth.json +75 -3
  25. package/locales/zh-TW/auth.json +75 -3
  26. package/package.json +4 -3
  27. package/src/app/(main)/(mobile)/me/(home)/__tests__/UserBanner.test.tsx +4 -0
  28. package/src/app/(main)/(mobile)/me/(home)/__tests__/useCategory.test.tsx +0 -46
  29. package/src/app/(main)/(mobile)/me/(home)/features/UserBanner.tsx +11 -14
  30. package/src/app/(main)/(mobile)/me/(home)/features/useCategory.tsx +6 -21
  31. package/src/app/(main)/(mobile)/me/profile/features/Category.tsx +38 -21
  32. package/src/app/(main)/(mobile)/me/profile/layout.tsx +0 -3
  33. package/src/app/(main)/(mobile)/me/profile/page.tsx +3 -3
  34. package/src/app/(main)/chat/loading.tsx +2 -2
  35. package/src/app/(main)/discover/loading.tsx +2 -8
  36. package/src/app/(main)/files/loading.tsx +2 -2
  37. package/src/app/(main)/profile/(home)/Client.tsx +53 -0
  38. package/src/app/(main)/profile/(home)/[[...slugs]]/page.tsx +38 -0
  39. package/src/app/(main)/profile/@category/default.tsx +9 -0
  40. package/src/app/(main)/profile/@category/features/CategoryContent.tsx +38 -0
  41. package/src/app/(main)/profile/_layout/Desktop/Header.tsx +85 -0
  42. package/src/app/(main)/profile/_layout/Desktop/SideBar.tsx +42 -0
  43. package/src/app/(main)/profile/_layout/Desktop/index.tsx +48 -0
  44. package/src/app/(main)/profile/_layout/Mobile/Header.tsx +23 -5
  45. package/src/app/(main)/profile/_layout/Mobile/index.tsx +12 -5
  46. package/src/app/(main)/profile/_layout/type.ts +6 -0
  47. package/src/app/(main)/profile/error.tsx +5 -0
  48. package/src/app/(main)/profile/features/ClerkProfile.tsx +72 -0
  49. package/src/app/(main)/profile/hooks/useCategory.tsx +51 -0
  50. package/src/app/(main)/profile/layout.tsx +7 -17
  51. package/src/app/(main)/profile/loading.tsx +2 -22
  52. package/src/app/(main)/profile/not-found.tsx +3 -0
  53. package/src/app/(main)/profile/security/page.tsx +34 -0
  54. package/src/app/(main)/profile/stats/Client.tsx +52 -0
  55. package/src/app/(main)/profile/stats/features/AiHeatmaps.tsx +130 -0
  56. package/src/app/(main)/profile/stats/features/AssistantsRank.tsx +115 -0
  57. package/src/app/(main)/profile/stats/features/ModelsRank.tsx +84 -0
  58. package/src/app/(main)/profile/stats/features/ShareButton/Preview.tsx +159 -0
  59. package/src/app/(main)/profile/stats/features/ShareButton/ShareModal.tsx +87 -0
  60. package/src/app/(main)/profile/stats/features/ShareButton/TotalCard.tsx +39 -0
  61. package/src/app/(main)/profile/stats/features/ShareButton/index.tsx +26 -0
  62. package/src/app/(main)/profile/stats/features/TimeLabel.tsx +30 -0
  63. package/src/app/(main)/profile/stats/features/TopicsRank.tsx +103 -0
  64. package/src/app/(main)/profile/stats/features/TotalAssistants.tsx +56 -0
  65. package/src/app/(main)/profile/stats/features/TotalMessages.tsx +56 -0
  66. package/src/app/(main)/profile/stats/features/TotalTopics.tsx +53 -0
  67. package/src/app/(main)/profile/stats/features/TotalWords.tsx +54 -0
  68. package/src/app/(main)/profile/stats/features/Welcome.tsx +86 -0
  69. package/src/app/(main)/profile/{[[...slugs]] → stats}/page.tsx +4 -5
  70. package/src/app/(main)/repos/[id]/evals/dataset/page.tsx +2 -2
  71. package/src/app/(main)/repos/[id]/evals/evaluation/page.tsx +2 -2
  72. package/src/app/(main)/settings/@category/features/CategoryContent.tsx +1 -1
  73. package/src/app/(main)/settings/_layout/Desktop/index.tsx +1 -1
  74. package/src/app/(main)/settings/_layout/Mobile/Header.tsx +1 -1
  75. package/src/app/(main)/settings/_layout/Mobile/index.tsx +2 -0
  76. package/src/app/(main)/settings/common/features/Theme/index.tsx +2 -17
  77. package/src/app/(main)/settings/loading.tsx +2 -2
  78. package/src/components/Loading/BrandTextLoading/index.tsx +2 -2
  79. package/src/components/Statistic/index.tsx +15 -0
  80. package/src/components/StatisticCard/TitleWithPercentage.tsx +80 -0
  81. package/src/components/StatisticCard/growthPercentage.tsx +8 -0
  82. package/src/components/StatisticCard/index.tsx +209 -0
  83. package/src/const/url.ts +3 -3
  84. package/src/database/server/models/__tests__/message.test.ts +346 -35
  85. package/src/database/server/models/__tests__/session.test.ts +185 -2
  86. package/src/database/server/models/__tests__/topic.test.ts +136 -0
  87. package/src/database/server/models/__tests__/user.test.ts +140 -1
  88. package/src/database/server/models/message.ts +109 -14
  89. package/src/database/server/models/session.ts +75 -4
  90. package/src/database/server/models/topic.ts +43 -3
  91. package/src/database/server/models/user.ts +22 -0
  92. package/src/database/utils/genWhere.ts +39 -0
  93. package/src/features/ShareModal/ShareImage/index.tsx +11 -24
  94. package/src/features/ShareModal/ShareImage/type.ts +1 -6
  95. package/src/features/User/DataStatistics.tsx +21 -14
  96. package/src/features/User/UserPanel/PanelContent.tsx +12 -16
  97. package/src/features/User/UserPanel/useMenu.tsx +4 -6
  98. package/src/features/User/__tests__/PanelContent.test.tsx +4 -0
  99. package/src/features/User/__tests__/useMenu.test.tsx +1 -21
  100. package/src/hooks/useActiveTabKey.ts +34 -1
  101. package/src/{features/ShareModal/ShareImage → hooks}/useScreenshot.ts +51 -6
  102. package/src/locales/default/auth.ts +74 -2
  103. package/src/server/ld.test.ts +1 -1
  104. package/src/server/modules/AssistantStore/index.ts +3 -2
  105. package/src/server/routers/lambda/message.ts +35 -6
  106. package/src/server/routers/lambda/session.ts +17 -3
  107. package/src/server/routers/lambda/topic.ts +17 -3
  108. package/src/server/routers/lambda/user.ts +4 -0
  109. package/src/server/services/changelog/index.ts +1 -1
  110. package/src/services/message/_deprecated.ts +16 -0
  111. package/src/services/message/client.test.ts +0 -18
  112. package/src/services/message/client.ts +12 -9
  113. package/src/services/message/server.ts +12 -4
  114. package/src/services/message/type.ts +15 -3
  115. package/src/services/session/_deprecated.ts +5 -0
  116. package/src/services/session/client.ts +6 -2
  117. package/src/services/session/server.ts +6 -2
  118. package/src/services/session/type.ts +7 -1
  119. package/src/services/topic/_deprecated.ts +5 -0
  120. package/src/services/topic/client.ts +6 -2
  121. package/src/services/topic/server.ts +7 -1
  122. package/src/services/topic/type.ts +7 -2
  123. package/src/services/user/_deprecated.ts +4 -0
  124. package/src/services/user/client.ts +4 -0
  125. package/src/services/user/server.ts +4 -0
  126. package/src/services/user/type.ts +5 -0
  127. package/src/store/global/initialState.ts +6 -0
  128. package/src/store/user/slices/auth/action.test.ts +1 -33
  129. package/src/store/user/slices/auth/action.ts +0 -9
  130. package/src/store/user/slices/common/action.test.ts +2 -2
  131. package/src/types/message/index.ts +5 -0
  132. package/src/types/session/index.ts +8 -0
  133. package/src/types/topic/topic.ts +7 -0
  134. package/src/utils/format.ts +1 -1
  135. package/src/utils/time.ts +23 -0
  136. package/src/app/(main)/profile/[[...slugs]]/Client.tsx +0 -76
  137. package/src/components/Loading/BrandTextLoading/LobeChatText/SVG.tsx +0 -44
  138. package/src/components/Loading/BrandTextLoading/LobeChatText/index.tsx +0 -6
  139. package/src/components/Loading/BrandTextLoading/LobeChatText/style.css +0 -32
  140. package/src/hooks/useActiveSettingsKey.ts +0 -20
@@ -14,7 +14,6 @@ export interface UserAuthAction {
14
14
  * universal login method
15
15
  */
16
16
  openLogin: () => Promise<void>;
17
- openUserProfile: () => Promise<void>;
18
17
  }
19
18
 
20
19
  export const createAuthSlice: StateCreator<
@@ -63,12 +62,4 @@ export const createAuthSlice: StateCreator<
63
62
  signIn();
64
63
  }
65
64
  },
66
-
67
- openUserProfile: async () => {
68
- if (enableClerk) {
69
- get().clerkOpenUserProfile?.();
70
-
71
- return;
72
- }
73
- },
74
65
  });
@@ -34,7 +34,7 @@ describe('createCommonSlice', () => {
34
34
  describe('updateAvatar', () => {
35
35
  it('should update avatar', async () => {
36
36
  const { result } = renderHook(() => useUserStore());
37
- const avatar = 'new-avatar';
37
+ const avatar = 'data:image/png;base64,';
38
38
 
39
39
  const spyOn = vi.spyOn(result.current, 'refreshUserState');
40
40
  const updateAvatarSpy = vi
@@ -45,7 +45,7 @@ describe('createCommonSlice', () => {
45
45
  await result.current.updateAvatar(avatar);
46
46
  });
47
47
 
48
- expect(updateAvatarSpy).toHaveBeenCalledWith(avatar);
48
+ expect(updateAvatarSpy).toHaveBeenCalledWith('data:image/png;base64,');
49
49
  expect(spyOn).toHaveBeenCalled();
50
50
  });
51
51
  });
@@ -161,3 +161,8 @@ export interface SendThreadMessageParams {
161
161
  message: string;
162
162
  onlyAddUserMessage?: boolean;
163
163
  }
164
+
165
+ export interface ModelRankItem {
166
+ count: number;
167
+ id: string | null;
168
+ }
@@ -15,3 +15,11 @@ export interface UpdateSessionParams {
15
15
  pinned?: boolean;
16
16
  updatedAt: Date;
17
17
  }
18
+
19
+ export interface SessionRankItem {
20
+ avatar: string | null;
21
+ backgroundColor: string | null;
22
+ count: number;
23
+ id: string;
24
+ title: string | null;
25
+ }
@@ -44,3 +44,10 @@ export interface ChatTopic extends Omit<BaseDataModel, 'meta'> {
44
44
  }
45
45
 
46
46
  export type ChatTopicMap = Record<string, ChatTopic>;
47
+
48
+ export interface TopicRankItem {
49
+ count: number;
50
+ id: string;
51
+ sessionId: string | null;
52
+ title: string | null;
53
+ }
@@ -88,7 +88,7 @@ export const formatNumber = (num: any, fractionDigits?: number) => {
88
88
  return `${numeral(a).format('0,0')}.${b}`;
89
89
  };
90
90
 
91
- export const formatIntergerNumber = (num: any) => {
91
+ export const formatIntergerNumber = (num?: any) => {
92
92
  if (!num && num !== 0) return '--';
93
93
 
94
94
  return numeral(num).format('0,0');
@@ -0,0 +1,23 @@
1
+ import dayjs, { Dayjs } from 'dayjs';
2
+
3
+ const getQuarterStart = (date: Dayjs) => {
4
+ const month = date.month();
5
+ const quarterStartMonth = Math.floor(month / 3) * 3;
6
+ return date.month(quarterStartMonth).startOf('month');
7
+ };
8
+
9
+ export const today = () => dayjs().startOf('day');
10
+ export const thisWeek = () => dayjs().startOf('week');
11
+ export const thisMonth = () => dayjs().startOf('month');
12
+ export const thisQuarter = () => getQuarterStart(today());
13
+ export const thisYear = () => dayjs().startOf('year');
14
+
15
+ export const hoursAgo = (hours: number) => dayjs().subtract(hours, 'hours').startOf('hours');
16
+
17
+ export const daysAgo = (days: number) => dayjs().subtract(days, 'days').startOf('day');
18
+
19
+ export const weeksAgo = (weeks: number) => dayjs().subtract(weeks, 'week').startOf('week');
20
+
21
+ export const monthsAgo = (months: number) => dayjs().subtract(months, 'month').startOf('month');
22
+
23
+ export const lastMonth = () => monthsAgo(1).endOf('month');
@@ -1,76 +0,0 @@
1
- 'use client';
2
-
3
- import { UserProfile } from '@clerk/nextjs';
4
- import { ElementsConfig } from '@clerk/types';
5
- import { createStyles } from 'antd-style';
6
- import { memo } from 'react';
7
-
8
- export const useStyles = createStyles(
9
- ({ css, token, cx }, mobile: boolean) =>
10
- ({
11
- cardBox: css`
12
- width: 100%;
13
- max-width: unset;
14
- height: 100%;
15
-
16
- border: unset;
17
- border-radius: unset;
18
- box-shadow: unset;
19
- `,
20
- footer: cx(
21
- mobile &&
22
- css`
23
- display: none;
24
- `,
25
- ),
26
- navbar: css`
27
- flex: none;
28
-
29
- width: 280px;
30
- max-width: unset;
31
- margin-inline-end: 0;
32
- padding-block: 24px 16px;
33
- padding-inline: 12px;
34
-
35
- background: ${token.colorBgContainer};
36
- border-inline-end: 1px solid ${token.colorSplit};
37
- `,
38
- navbarMobileMenuRow: cx(
39
- mobile &&
40
- css`
41
- display: none;
42
- `,
43
- ),
44
- pageScrollBox: css`
45
- align-self: center;
46
- width: 100%;
47
- max-width: 1024px;
48
- `,
49
- rootBox: css`
50
- width: 100%;
51
- height: 100%;
52
- `,
53
- scrollBox: css`
54
- background: ${token.colorBgLayout};
55
- border: unset;
56
- border-radius: unset;
57
- `,
58
- }) as Partial<{
59
- // eslint-disable-next-line unused-imports/no-unused-vars
60
- [k in keyof ElementsConfig]: any;
61
- }>,
62
- );
63
-
64
- const Client = memo<{ mobile?: boolean }>(({ mobile }) => {
65
- const { styles } = useStyles(mobile);
66
-
67
- return (
68
- <UserProfile
69
- appearance={{
70
- elements: styles,
71
- }}
72
- />
73
- );
74
- });
75
-
76
- export default Client;
@@ -1,44 +0,0 @@
1
- import { memo } from 'react';
2
-
3
- const LobeChatText = memo<{ size?: number }>(({ size = '1em' }) => (
4
- <svg
5
- fill="currentColor"
6
- fillRule="evenodd"
7
- height={size}
8
- style={{ flex: 'none', lineHeight: 1, opacity: 0.6 }}
9
- viewBox="0 0 980 320"
10
- xmlns="http://www.w3.org/2000/svg"
11
- >
12
- <title>LobeChat</title>
13
- <path
14
- className="animate-draw"
15
- d="M696.999 135.08c-.455.472-.895.949-1.32 1.434V77h-34.98v162.8h35.42v-69.52c0-2.933.514-5.573 1.54-7.92a18.279 18.279 0 014.4-6.16c2.054-1.907 4.4-3.3 7.04-4.18 2.64-1.027 5.5-1.54 8.58-1.54 3.96-.147 7.26.513 9.9 1.98 2.64 1.467 4.62 3.74 5.94 6.82 1.32 3.08 1.98 6.967 1.98 11.66v68.86h35.42v-71.5c0-10.413-1.54-19.14-4.62-26.18-2.933-7.187-7.406-12.54-13.42-16.06-6.013-3.667-13.42-5.5-22.22-5.5-6.453 0-12.613 1.32-18.48 3.96-5.866 2.64-10.926 6.16-15.18 10.56zM15 240.035V87.172h39.24V205.75h66.192v34.285H15z"
16
- />
17
- <path
18
- className="animate-draw"
19
- d="M183.731 242c-11.759 0-22.196-2.621-31.313-7.862-9.116-5.241-16.317-12.447-21.601-21.619-5.153-9.317-7.729-19.945-7.729-31.883 0-11.937 2.576-22.492 7.729-31.664 5.164-8.963 12.159-15.98 20.982-21.05l.619-.351c9.117-5.241 19.554-7.861 31.313-7.861s22.196 2.62 31.313 7.861c9.248 5.096 16.449 12.229 21.601 21.401 5.153 9.172 7.729 19.727 7.729 31.664 0 11.938-2.576 22.566-7.729 31.883-5.152 9.172-12.353 16.378-21.601 21.619-9.117 5.241-19.554 7.862-31.313 7.862zm0-32.975c4.36 0 8.191-1.092 11.494-3.275 3.436-2.184 6.144-5.387 8.126-9.609 1.982-4.367 2.973-9.536 2.973-15.505 0-5.968-.991-10.991-2.973-15.067-1.906-4.06-4.483-7.177-7.733-9.352l-.393-.257c-3.303-2.184-7.134-3.276-11.494-3.276-4.228 0-8.059 1.092-11.495 3.276-3.303 2.184-6.011 5.387-8.125 9.609-1.982 4.076-2.973 9.099-2.973 15.067 0 5.969.991 11.138 2.973 15.505 2.114 4.222 4.822 7.425 8.125 9.609 3.436 2.183 7.267 3.275 11.495 3.275z"
20
- />
21
- <path
22
- className="animate-draw"
23
- d="M295.508 78l-.001 54.042a34.071 34.071 0 016.541-5.781c6.474-4.367 14.269-6.551 23.385-6.551 9.777 0 18.629 2.475 26.557 7.424 7.872 4.835 14.105 11.684 18.7 20.546l.325.637c4.756 9.026 7.135 19.799 7.135 32.319 0 12.666-2.379 23.585-7.135 32.757-4.624 9.026-10.966 16.087-19.025 21.182-7.928 4.95-16.78 7.425-26.557 7.425-9.644 0-17.704-2.184-24.178-6.551-2.825-1.946-5.336-4.355-7.532-7.226l.001 11.812h-35.87V78h37.654zm21.998 74.684c-4.228 0-8.059 1.092-11.494 3.276-3.303 2.184-6.012 5.387-8.126 9.609-1.982 4.076-2.972 9.099-2.972 15.067 0 5.969.99 11.138 2.972 15.505 2.114 4.222 4.823 7.425 8.126 9.609 3.435 2.183 7.266 3.275 11.494 3.275s7.994-1.092 11.297-3.275c3.435-2.184 6.143-5.387 8.125-9.609 2.114-4.367 3.171-9.536 3.171-15.505 0-5.968-1.057-10.991-3.171-15.067-1.906-4.06-4.483-7.177-7.732-9.352l-.393-.257c-3.303-2.184-7.069-3.276-11.297-3.276z"
24
- />
25
- <path
26
- className="animate-draw"
27
- d="M422.841 191.337l.084.337a27.857 27.857 0 002.057 5.559c2.246 4.222 5.417 7.498 9.513 9.827 4.096 2.184 8.984 3.276 14.665 3.276 5.285 0 9.777-.801 13.477-2.403 3.579-1.632 7.1-4.025 10.564-7.182l.732-.679 19.818 22.711c-5.153 6.26-11.494 11.064-19.025 14.413-7.531 3.203-16.449 4.804-26.755 4.804-12.683 0-23.782-2.621-33.294-7.862-9.381-5.386-16.713-12.665-21.998-21.837-5.153-9.317-7.729-19.872-7.729-31.665 0-11.792 2.51-22.274 7.53-31.446 5.036-9.105 11.902-16.195 20.596-21.268l.61-.351c8.984-5.241 19.091-7.861 30.322-7.861 10.311 0 19.743 2.286 28.294 6.859l.64.347c8.72 4.659 15.656 11.574 20.809 20.746 5.153 9.172 7.729 20.309 7.729 33.411 0 1.294-.052 2.761-.156 4.4l-.042.623-.17 2.353c-.075 1.01-.151 1.973-.227 2.888h-78.044zm21.365-42.147c-4.492 0-8.456 1.092-11.891 3.276-3.303 2.184-5.879 5.314-7.729 9.39a26.04 26.04 0 00-1.117 2.79 30.164 30.164 0 00-1.121 4.499l-.058.354h43.96l-.015-.106c-.401-2.638-1.122-5.055-2.163-7.252l-.246-.503c-1.776-3.774-4.282-6.742-7.519-8.906l-.409-.266c-3.303-2.184-7.2-3.276-11.692-3.276z"
28
- />
29
- <path
30
- className="animate-draw"
31
- d="M846.763 155.12c3.373 2.786 5.06 7.186 5.06 13.2v2.64h-17.38c-8.654 0-16.28.806-22.88 2.42-6.454 1.466-11.88 3.74-16.28 6.82-4.254 2.933-7.48 6.673-9.68 11.22-2.2 4.546-3.3 9.826-3.3 15.84 0 7.04 1.686 13.2 5.06 18.48 3.52 5.133 8.213 9.166 14.08 12.1 6.013 2.933 12.686 4.4 20.02 4.4 5.573 0 10.853-1.1 15.84-3.3 5.133-2.2 9.826-5.207 14.08-9.02l.44-.385v10.505h34.1V161.5c0-9.24-1.98-16.867-5.94-22.88-3.96-6.014-9.534-10.487-16.72-13.42-7.187-2.934-15.694-4.4-25.52-4.4-10.707 0-20.607 2.053-29.7 6.16-9.094 4.106-17.16 9.753-24.2 16.94l21.12 20.46c4.106-4.84 8.36-8.287 12.76-10.34 4.546-2.2 9.68-3.3 15.4-3.3 5.866 0 10.413 1.466 13.64 4.4zm5.06 52.071V193.18h-16.5c-3.08 0-5.794.293-8.14.88-2.347.44-4.327 1.246-5.94 2.42-1.614 1.026-2.86 2.273-3.74 3.74-.734 1.466-1.1 3.226-1.1 5.28 0 2.2.586 4.106 1.76 5.72 1.173 1.613 2.713 2.86 4.62 3.74 2.053.88 4.4 1.32 7.04 1.32 3.813 0 7.406-.587 10.78-1.76 3.52-1.32 6.6-3.154 9.24-5.5a29.32 29.32 0 001.98-1.829z"
32
- />
33
- <path
34
- className="animate-draw"
35
- d="M592.64 242c-11.587 0-22.293-1.907-32.12-5.72-9.68-3.96-18.113-9.46-25.3-16.5-7.04-7.187-12.54-15.62-16.5-25.3-3.813-9.827-5.72-20.534-5.72-32.12 0-11.44 1.98-22 5.94-31.68 4.107-9.68 9.827-18.114 17.16-25.3 7.333-7.187 15.913-12.76 25.74-16.72 9.973-3.96 20.753-5.94 32.34-5.94 7.333 0 14.52.953 21.56 2.86 7.04 1.906 13.567 4.766 19.58 8.58 6.16 3.666 11.44 8.14 15.84 13.42l-23.1 26.18c-4.547-4.987-9.68-8.874-15.4-11.66-5.573-2.787-11.807-4.18-18.7-4.18-5.867 0-11.44 1.026-16.72 3.08-5.133 2.053-9.607 5.06-13.42 9.02-3.813 3.96-6.82 8.653-9.02 14.08-2.2 5.426-3.3 11.586-3.3 18.48 0 6.746 1.027 12.906 3.08 18.48 2.2 5.426 5.28 10.12 9.24 14.08 4.107 3.813 8.947 6.746 14.52 8.8 5.72 2.053 12.027 3.08 18.92 3.08 4.547 0 8.873-.587 12.98-1.76a48.746 48.746 0 0011.88-5.5c3.667-2.347 6.82-4.987 9.46-7.92l18.26 29.04c-3.52 3.96-8.36 7.553-14.52 10.78-6.013 3.226-12.76 5.793-20.24 7.7a95.814 95.814 0 01-22.44 2.64z"
36
- />
37
- <path
38
- className="animate-draw"
39
- d="M942.281 202.6v-48.59h27.14V123.4h-27.14V92.8h-33.58v30.6h-16.79v30.61h16.79v48.36c0 26.526 13.263 39.79 39.79 39.79 9.66 0 17.327-1.227 23-3.68v-27.83c-4.753 3.066-10.197 4.6-16.33 4.6-3.833 0-6.977-1.074-9.43-3.22-2.3-2.147-3.45-5.29-3.45-9.43z"
40
- />
41
- </svg>
42
- ));
43
-
44
- export default LobeChatText;
@@ -1,6 +0,0 @@
1
- import LobeChatText from './SVG';
2
- import './style.css';
3
-
4
- const LobeChatTextLoading = () => <LobeChatText size={40} />;
5
-
6
- export default LobeChatTextLoading;
@@ -1,32 +0,0 @@
1
- @keyframes draw {
2
- 0% {
3
- stroke-dashoffset: 1000;
4
- }
5
-
6
- 100% {
7
- stroke-dashoffset: 0;
8
- }
9
- }
10
-
11
- @keyframes fill {
12
- 30% {
13
- fill-opacity: 0%;
14
- }
15
-
16
- 100% {
17
- fill-opacity: 100%;
18
- }
19
- }
20
-
21
- .animate-draw {
22
- fill: currentcolor;
23
- fill-opacity: 0%;
24
- stroke: currentcolor;
25
- stroke-dasharray: 1000;
26
- stroke-dashoffset: 1000;
27
- stroke-width: 1.5;
28
-
29
- animation:
30
- draw 2s cubic-bezier(0.4, 0, 0.2, 1) infinite,
31
- fill 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
32
- }
@@ -1,20 +0,0 @@
1
- import { usePathname } from 'next/navigation';
2
-
3
- import { useQuery } from '@/hooks/useQuery';
4
- import { SettingsTabs } from '@/store/global/initialState';
5
-
6
- /**
7
- * Returns the active setting page key (common/sync/agent/...)
8
- */
9
- export const useActiveSettingsKey = () => {
10
- const pathname = usePathname();
11
- const { tab } = useQuery();
12
-
13
- const tabs = pathname.split('/').at(-1);
14
-
15
- if (tabs === 'settings') return SettingsTabs.Common;
16
-
17
- if (tabs === 'modal') return tab as SettingsTabs;
18
-
19
- return tabs as SettingsTabs;
20
- };