diff --git a/client/ui/AppMobile.tsx b/client/ui/AppMobile.tsx index 7e50629..85d193c 100644 --- a/client/ui/AppMobile.tsx +++ b/client/ui/AppMobile.tsx @@ -8,7 +8,6 @@ import Avatar from "./Avatar.tsx" import * as React from 'react' import { Dialog, NavigationBar, TextField } from "mdui" -import Split from 'split.js' import 'mdui/jsx.zh-cn.d.ts' import { checkApiSuccessOrSncakbar } from "./snackbar.ts" @@ -18,8 +17,8 @@ import UserProfileDialog from "./dialog/UserProfileDialog.tsx" import ContactsList from "./main/ContactsList.tsx" import RecentsList from "./main/RecentsList.tsx" import useAsyncEffect from "./useAsyncEffect.ts" -import ChatInfoDialog from "./dialog/ChatInfoDialog.tsx"; -import Chat from "../api/client_data/Chat.ts"; +import ChatInfoDialog from "./dialog/ChatInfoDialog.tsx" +import Chat from "../api/client_data/Chat.ts" declare global { namespace React { @@ -52,6 +51,10 @@ export default function AppMobile() { const registerInputPasswordRef = React.useRef(null) const userProfileDialogRef = React.useRef(null) + const openMyUserProfileDialogButtonRef = React.useRef(null) + useEventListener(openMyUserProfileDialogButtonRef, 'click', (_event) => { + userProfileDialogRef.current!.open = true + }) const chatInfoDialogRef = React.useRef(null) const [chatInfo, setChatInfo] = React.useState(null as unknown as Chat) @@ -91,6 +94,7 @@ export default function AppMobile() {
@@ -135,16 +139,33 @@ export default function AppMobile() { }} chat={chatInfo} /> - - 最近 - 聯絡人 - + + { + ({ + Recents: "最近對話", + Contacts: "聯絡人" + })[navigationItemSelected] + } +
+ + + + +
{ // 侧边列表 } + + 最近 + 聯絡人 +
) } \ No newline at end of file