diff --git a/client/ui/Main.tsx b/client/ui/Main.tsx
index 0fddb9d..b4e2bee 100644
--- a/client/ui/Main.tsx
+++ b/client/ui/Main.tsx
@@ -10,7 +10,7 @@ import { CallbackError, Chat, UserMySelf } from "lingchair-client-protocol"
import showCircleProgressDialog from "./showCircleProgressDialog.ts"
import RegisterDialog from "./main-page/RegisterDialog.tsx"
import sleep from "../utils/sleep.ts"
-import { $, dialog, NavigationDrawer } from "mdui"
+import { $, NavigationDrawer } from "mdui"
import getClient from "../getClient.ts"
import showSnackbar from "../utils/showSnackbar.ts"
import AllChatsList from "./main-page/AllChatsList.tsx"
@@ -135,7 +135,7 @@ function Root() {
}}>
客户端设置
AppStateRef.current!.openAddFavouriteChat()}>添加收藏对话
- 创建新的群组
+ AppStateRef.current!.openCreateGroup()}>创建新的群组
void,
- openUserInfo: (user: Chat | User | string) => void,
- openEditMyProfile: () => void,
- openAddFavouriteChat: () => void,
- openChat: (chat: string | Chat, inDialog?: boolean) => void,
- closeChat: () => void,
+ openChatInfo: (chat: Chat | string) => void
+ openUserInfo: (user: Chat | User | string) => void
+ openEditMyProfile: () => void
+ openAddFavouriteChat: () => void
+ openCreateGroup: () => void
+ openChat: (chat: string | Chat, inDialog?: boolean) => void
+ closeChat: () => void
}
const AppStateContext = React.createContext
({
@@ -15,6 +16,7 @@ const AppStateContext = React.createContext({
openUserInfo: () => {},
openEditMyProfile: () => {},
openAddFavouriteChat: () => {},
+ openCreateGroup: () => {},
openChat: () => {},
closeChat: () => {},
})
diff --git a/client/ui/app-state/AppStateContextWrapper.tsx b/client/ui/app-state/AppStateContextWrapper.tsx
index d466c49..3187c28 100644
--- a/client/ui/app-state/AppStateContextWrapper.tsx
+++ b/client/ui/app-state/AppStateContextWrapper.tsx
@@ -12,6 +12,7 @@ import MainSharedContext, { Shared } from "../MainSharedContext.ts"
import ChatFragmentDialog from "./ChatFragmentDialog.tsx"
import useAsyncEffect from "../../utils/useAsyncEffect.ts"
import ClientCache from "../../ClientCache.ts"
+import CreateGroupDialog from "./CreateGroupDialog.tsx"
const config = await fetch('/config.json').then((re) => re.json())
@@ -33,6 +34,7 @@ export default function DialogContextWrapper({ children, useRef }: { children: R
const editMyProfileDialogRef = React.useRef