From 9983bfb6cf72fbc07b22d5fbebdbce71dbf6c61a Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Wed, 25 May 2022 19:23:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BE=AE=E8=B0=83AutoFolder=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E4=B8=8E=E5=AF=BC=E5=87=BAreact-router=E5=92=8C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E5=AE=9E=E7=94=A8=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/index.tsx | 1 + web/src/components/ChatBox/ChatMessageList/Item.tsx | 2 +- web/src/plugin/common/index.ts | 2 ++ web/src/plugin/loader.ts | 1 + web/src/utils/jwt-helper.ts | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/shared/index.tsx b/shared/index.tsx index e1af94d0..3b58b531 100644 --- a/shared/index.tsx +++ b/shared/index.tsx @@ -119,6 +119,7 @@ export type { GroupInvite, } from './model/group'; export { + sendMessage, recallMessage, deleteMessage, addReaction, diff --git a/web/src/components/ChatBox/ChatMessageList/Item.tsx b/web/src/components/ChatBox/ChatMessageList/Item.tsx index f06b6d4e..5a511d38 100644 --- a/web/src/components/ChatBox/ChatMessageList/Item.tsx +++ b/web/src/components/ChatBox/ChatMessageList/Item.tsx @@ -106,7 +106,7 @@ const NormalMessage: React.FC = React.memo((props) => { {/* 消息内容 */} diff --git a/web/src/plugin/common/index.ts b/web/src/plugin/common/index.ts index d6f2cbb4..b7962691 100644 --- a/web/src/plugin/common/index.ts +++ b/web/src/plugin/common/index.ts @@ -14,6 +14,7 @@ export { } from '@/components/Modal'; export { Loadable } from '@/components/Loadable'; export { getGlobalState } from '@/utils/global-state-helper'; +export { getJWTUserInfo } from '@/utils/jwt-helper'; export { dataUrlToFile } from '@/utils/file-helper'; export { urlSearchStringify, @@ -39,6 +40,7 @@ export { fetchAvailableServices, isValidStr, useGroupPanelInfo, + sendMessage, } from 'tailchat-shared'; export { useLocation, useHistory } from 'react-router'; diff --git a/web/src/plugin/loader.ts b/web/src/plugin/loader.ts index c0d4f8f3..93743479 100644 --- a/web/src/plugin/loader.ts +++ b/web/src/plugin/loader.ts @@ -13,6 +13,7 @@ export async function initPlugins(): Promise { function registerDependencies() { regDependency('react', () => import('react')); + regDependency('react-router', () => import('react-router')); regDependency('axios', () => import('axios')); // 用于插件的第三方包使用axios作为依赖的情况下,可以减少包体积 } diff --git a/web/src/utils/jwt-helper.ts b/web/src/utils/jwt-helper.ts index f5c3c336..a8932e29 100644 --- a/web/src/utils/jwt-helper.ts +++ b/web/src/utils/jwt-helper.ts @@ -46,7 +46,7 @@ export async function getUserJWT(): Promise { } export interface JWTUserInfoData { - name?: string; + nickname?: string; uuid?: string; avatar?: string; }