@lobehub/chat 0.84.0 → 0.85.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 (40) hide show
  1. package/.github/workflows/lighthouse-badger-advanced.yml +11 -29
  2. package/.github/workflows/pre-welcome.yml +22 -0
  3. package/.github/workflows/sync.yml +5 -3
  4. package/.i18nrc.js +1 -2
  5. package/CHANGELOG.md +25 -0
  6. package/locales/ja_JP/common.json +103 -0
  7. package/locales/ja_JP/empty.json +6 -0
  8. package/locales/ja_JP/error.json +42 -0
  9. package/locales/ja_JP/market.json +16 -0
  10. package/locales/ja_JP/plugin.json +107 -0
  11. package/locales/ja_JP/setting.json +225 -0
  12. package/locales/ja_JP/welcome.json +14 -0
  13. package/locales/ko_KR/common.json +103 -0
  14. package/locales/ko_KR/empty.json +6 -0
  15. package/locales/ko_KR/error.json +42 -0
  16. package/locales/ko_KR/market.json +16 -0
  17. package/locales/ko_KR/plugin.json +107 -0
  18. package/locales/ko_KR/setting.json +225 -0
  19. package/locales/ko_KR/welcome.json +14 -0
  20. package/package.json +1 -1
  21. package/public/icons/maskable-icon-192x192.png +0 -0
  22. package/public/icons/maskable-icon-512x512.png +0 -0
  23. package/public/manifest.json +34 -5
  24. package/public/screenshots/screenshot-1.png +0 -0
  25. package/public/screenshots/screenshot-2.png +0 -0
  26. package/public/screenshots/screenshot-3.png +0 -0
  27. package/public/screenshots/screenshot-4.png +0 -0
  28. package/src/app/chat/features/ChatInputContent/Footer/SaveTopic.tsx +1 -1
  29. package/src/app/welcome/(desktop)/features/Footer.tsx +14 -3
  30. package/src/app/welcome/(desktop)/layout.desktop.tsx +1 -4
  31. package/src/const/url.ts +2 -1
  32. package/src/features/SideBar/BottomActions.tsx +9 -2
  33. package/src/layout/GlobalLayout/AppTheme.tsx +3 -3
  34. package/src/layout/GlobalLayout/Locale.tsx +2 -2
  35. package/src/locales/options.ts +8 -1
  36. package/src/locales/resources/index.ts +4 -0
  37. package/src/locales/resources/ja_JP.ts +19 -0
  38. package/src/locales/resources/ko_KR.ts +19 -0
  39. package/src/utils/VersionController.ts +1 -1
  40. package/src/utils/responsive.ts +1 -1
@@ -1,5 +1,4 @@
1
1
  import { Logo } from '@lobehub/ui';
2
- import Link from 'next/link';
3
2
  import { PropsWithChildren, memo } from 'react';
4
3
  import { Center, Flexbox } from 'react-layout-kit';
5
4
 
@@ -18,9 +17,7 @@ const Desktop = memo<PropsWithChildren>(({ children }) => {
18
17
  horizontal
19
18
  style={{ position: 'relative' }}
20
19
  >
21
- <Link href={'/'}>
22
- <Logo className={styles.logo} size={36} type={'text'} />
23
- </Link>
20
+ <Logo className={styles.logo} size={36} type={'text'} />
24
21
  <Flexbox className={styles.view} flex={1}>
25
22
  {children}
26
23
  </Flexbox>
package/src/const/url.ts CHANGED
@@ -8,7 +8,8 @@ import { DEFAULT_LANG, checkLang } from './locale';
8
8
  import { INBOX_SESSION_ID } from './session';
9
9
 
10
10
  export const GITHUB = pkg.homepage;
11
- export const CHANGELOG = `${pkg.homepage}/blob/master/CHANGELOG.md`;
11
+ export const CHANGELOG = urlJoin(GITHUB, 'blob/master/CHANGELOG.md');
12
+ export const WIKI = urlJoin(GITHUB, 'wiki');
12
13
  export const ABOUT = pkg.homepage;
13
14
  export const FEEDBACK = pkg.bugs.url;
14
15
  export const DISCORD = 'https://discord.gg/AYFPHvv2jT';
@@ -1,6 +1,7 @@
1
1
  import { ActionIcon, DiscordIcon, Icon } from '@lobehub/ui';
2
2
  import { Badge, ConfigProvider, Dropdown, MenuProps, Upload } from 'antd';
3
3
  import {
4
+ Book,
4
5
  Feather,
5
6
  FileClock,
6
7
  Github,
@@ -15,7 +16,7 @@ import { memo } from 'react';
15
16
  import { useTranslation } from 'react-i18next';
16
17
  import { Flexbox } from 'react-layout-kit';
17
18
 
18
- import { ABOUT, CHANGELOG, DISCORD, FEEDBACK, GITHUB } from '@/const/url';
19
+ import { ABOUT, CHANGELOG, DISCORD, FEEDBACK, GITHUB, WIKI } from '@/const/url';
19
20
  import { useExportConfig } from '@/hooks/useExportConfig';
20
21
  import { useImportConfig } from '@/hooks/useImportConfig';
21
22
  import { GlobalStore, useGlobalStore } from '@/store/global';
@@ -94,6 +95,12 @@ const BottomActions = memo<BottomActionProps>(({ tab, setTab }) => {
94
95
  label: t('changelog'),
95
96
  onClick: () => window.open(CHANGELOG, '__blank'),
96
97
  },
98
+ {
99
+ icon: <Icon icon={Book} />,
100
+ key: 'wiki',
101
+ label: 'WIKI',
102
+ onClick: () => window.open(WIKI, '__blank'),
103
+ },
97
104
  {
98
105
  icon: <Icon icon={Heart} />,
99
106
  key: 'about',
@@ -130,7 +137,7 @@ const BottomActions = memo<BottomActionProps>(({ tab, setTab }) => {
130
137
  icon={Github}
131
138
  onClick={() => window.open(GITHUB, '__blank')}
132
139
  placement={'right'}
133
- title={'Github'}
140
+ title={'GitHub'}
134
141
  />
135
142
  <Dropdown arrow={false} menu={{ items }} trigger={['click']}>
136
143
  {hasNewVersion ? (
@@ -20,9 +20,9 @@ export interface AppThemeProps {
20
20
 
21
21
  const AppTheme = memo<AppThemeProps>(
22
22
  ({ children, defaultAppearance, defaultPrimaryColor, defaultNeutralColor }) => {
23
- // console.log('server:appearance', defaultAppearance);
24
- // console.log('server:primaryColor', defaultPrimaryColor);
25
- // console.log('server:neutralColor', defaultNeutralColor);
23
+ // console.debug('server:appearance', defaultAppearance);
24
+ // console.debug('server:primaryColor', defaultPrimaryColor);
25
+ // console.debug('server:neutralColor', defaultNeutralColor);
26
26
  const themeMode = useGlobalStore((s) => s.settings.themeMode);
27
27
 
28
28
  const [primaryColor, neutralColor] = useGlobalStore((s) => [
@@ -20,9 +20,9 @@ const InnerLocale = memo<LocaleLayoutProps>(({ children, lang }) => {
20
20
  } else {
21
21
  // if on browser side, init i18n instance only once
22
22
  if (!i18n.instance.isInitialized)
23
- // console.log('locale', lang);
23
+ // console.debug('locale', lang);
24
24
  i18n.init().then(() => {
25
- // console.log('inited.');
25
+ // console.debug('inited.');
26
26
  });
27
27
  }
28
28
 
@@ -1,4 +1,3 @@
1
-
2
1
  import type { Locales } from '@/types/locale';
3
2
 
4
3
  type LocaleOptions = {
@@ -19,6 +18,14 @@ export const localeOptions: LocaleOptions = [
19
18
  label: 'English',
20
19
  value: 'en-US',
21
20
  },
21
+ {
22
+ label: '日本語',
23
+ value: 'ja-JP',
24
+ },
25
+ {
26
+ label: '한국어',
27
+ value: 'ko-KR',
28
+ },
22
29
  {
23
30
  label: 'Russian',
24
31
  value: 'ru-RU',
@@ -1,10 +1,14 @@
1
1
  import en_US from './en_US';
2
+ import ja_JP from './ja_JP';
3
+ import ko_KR from './ko_KR';
2
4
  import ru_RU from './ru_RU';
3
5
  import zh_CN from './zh_CN';
4
6
  import zh_TW from './zh_TW';
5
7
 
6
8
  const resources = {
7
9
  'en-US': en_US,
10
+ 'ja-JP': ja_JP,
11
+ 'ko-KR': ko_KR,
8
12
  'ru-RU': ru_RU,
9
13
  'zh-CN': zh_CN,
10
14
  'zh-TW': zh_TW,
@@ -0,0 +1,19 @@
1
+ import common from '../../../locales/ja_JP/common.json';
2
+ import empty from '../../../locales/ja_JP/empty.json';
3
+ import error from '../../../locales/ja_JP/error.json';
4
+ import market from '../../../locales/ja_JP/market.json';
5
+ import plugin from '../../../locales/ja_JP/plugin.json';
6
+ import setting from '../../../locales/ja_JP/setting.json';
7
+ import welcome from '../../../locales/ja_JP/welcome.json';
8
+
9
+ const resources = {
10
+ common,
11
+ empty,
12
+ error,
13
+ market,
14
+ plugin,
15
+ setting,
16
+ welcome,
17
+ } as const;
18
+
19
+ export default resources;
@@ -0,0 +1,19 @@
1
+ import common from '../../../locales/ko_KR/common.json';
2
+ import empty from '../../../locales/ko_KR/empty.json';
3
+ import error from '../../../locales/ko_KR/error.json';
4
+ import market from '../../../locales/ko_KR/market.json';
5
+ import plugin from '../../../locales/ko_KR/plugin.json';
6
+ import setting from '../../../locales/ko_KR/setting.json';
7
+ import welcome from '../../../locales/ko_KR/welcome.json';
8
+
9
+ const resources = {
10
+ common,
11
+ empty,
12
+ error,
13
+ market,
14
+ plugin,
15
+ setting,
16
+ welcome,
17
+ } as const;
18
+
19
+ export default resources;
@@ -56,7 +56,7 @@ export class VersionController<T> {
56
56
  nextData = migration.migrate(nextData);
57
57
 
58
58
  nextData.version += 1;
59
- console.log('迁移器:', migration, '数据:', nextData, '迁移后版本:', nextData.version);
59
+ console.debug('迁移器:', migration, '数据:', nextData, '迁移后版本:', nextData.version);
60
60
  }
61
61
 
62
62
  return nextData;
@@ -12,7 +12,7 @@ export const isMobileDevice = () => {
12
12
  const { get } = headers();
13
13
  const ua = get('user-agent');
14
14
 
15
- // console.log(ua);
15
+ // console.debug(ua);
16
16
  const device = new UAParser(ua || '').getDevice();
17
17
 
18
18
  return device.type === 'mobile';