ui: 用户资料中进入对话, 连带上层对话框关闭
This commit is contained in:
@@ -145,6 +145,7 @@ export default function App() {
|
|||||||
myProfileDialogRef={myProfileDialogRef as any}
|
myProfileDialogRef={myProfileDialogRef as any}
|
||||||
user={myUserProfileCache} />
|
user={myUserProfileCache} />
|
||||||
<UserProfileDialog
|
<UserProfileDialog
|
||||||
|
chatInfoDialogRef={chatInfoDialogRef as any}
|
||||||
userProfileDialogRef={userProfileDialogRef as any}
|
userProfileDialogRef={userProfileDialogRef as any}
|
||||||
openChatFragment={openChatFragment}
|
openChatFragment={openChatFragment}
|
||||||
user={userInfo} />
|
user={userInfo} />
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ export default function AppMobile() {
|
|||||||
myProfileDialogRef={myProfileDialogRef as any}
|
myProfileDialogRef={myProfileDialogRef as any}
|
||||||
user={myUserProfileCache} />
|
user={myUserProfileCache} />
|
||||||
<UserProfileDialog
|
<UserProfileDialog
|
||||||
|
chatInfoDialogRef={chatInfoDialogRef as any}
|
||||||
userProfileDialogRef={userProfileDialogRef as any}
|
userProfileDialogRef={userProfileDialogRef as any}
|
||||||
openChatFragment={openChatFragment}
|
openChatFragment={openChatFragment}
|
||||||
user={userInfo} />
|
user={userInfo} />
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ import User from "../../api/client_data/User.ts"
|
|||||||
|
|
||||||
interface Refs {
|
interface Refs {
|
||||||
userProfileDialogRef: React.MutableRefObject<Dialog>
|
userProfileDialogRef: React.MutableRefObject<Dialog>
|
||||||
|
chatInfoDialogRef: React.MutableRefObject<Dialog>
|
||||||
openChatFragment: (id: string) => void
|
openChatFragment: (id: string) => void
|
||||||
user: User
|
user: User
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function UserProfileDialog({
|
export default function UserProfileDialog({
|
||||||
userProfileDialogRef,
|
userProfileDialogRef,
|
||||||
|
chatInfoDialogRef,
|
||||||
openChatFragment,
|
openChatFragment,
|
||||||
user
|
user
|
||||||
}: Refs) {
|
}: Refs) {
|
||||||
@@ -51,6 +53,7 @@ export default function UserProfileDialog({
|
|||||||
|
|
||||||
openChatFragment(re.data!.chat_id as string)
|
openChatFragment(re.data!.chat_id as string)
|
||||||
userProfileDialogRef.current!.open = false
|
userProfileDialogRef.current!.open = false
|
||||||
|
chatInfoDialogRef.current!.open = false
|
||||||
}}>对话</mdui-list-item>
|
}}>对话</mdui-list-item>
|
||||||
</mdui-list>
|
</mdui-list>
|
||||||
</mdui-dialog>
|
</mdui-dialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user