+ }} ref={itemRef} onClick={() => {
+ // deno-lint-ignore no-window
+ window.openUserInfoDialog(user)
+ }}>
{nickname}
- dialog({
- headline: "移除群组成员",
- description: `确定要移除 ${nickname} 吗?`,
- actions: [
- {
- text: "取消",
- onClick: () => {
- return true
+ {
+ e.stopPropagation()
+ dialog({
+ headline: "移除群组成员",
+ description: `确定要移除 ${nickname} 吗?`,
+ actions: [
+ {
+ text: "取消",
+ onClick: () => {
+ return true
+ },
},
- },
- {
- text: "确定",
- onClick: () => {
- ;(async () => {
- const re = await Client.invoke("Chat.removeMembers", {
- token: data.access_token,
- chat_id: target,
- user_ids: [
- id
- ],
- })
- if (re.code != 200)
- checkApiSuccessOrSncakbar(re, "移除群组成员失败")
- EventBus.emit('GroupMembersList.updateMembers')
- snackbar({
- message: `已移除 ${nickname}`,
- placement: "top",
- action: "撤销操作",
- onActionClick: async () => {
- const re = await Client.invoke("User.addContacts", {
- token: data.access_token,
- targets: ls,
- })
- if (re.code != 200)
- checkApiSuccessOrSncakbar(re, "恢复所选收藏失败")
- EventBus.emit('ContactsList.updateContacts')
- }
- })
- })()
- return true
- },
- }
- ],
- })}>
+ {
+ text: "确定",
+ onClick: () => {
+ ; (async () => {
+ const re = await Client.invoke("Chat.removeMembers", {
+ token: data.access_token,
+ chat_id: chat.id,
+ user_ids: [
+ id
+ ],
+ })
+ if (re.code != 200)
+ checkApiSuccessOrSncakbar(re, "移除群组成员失败")
+ EventBus.emit('GroupMembersList.updateMembers')
+ snackbar({
+ message: `已移除 ${nickname}`,
+ placement: "top",
+ /* action: "撤销操作",
+ onActionClick: async () => {
+ const re = await Client.invoke("User.addContacts", {
+ token: data.access_token,
+ targets: ls,
+ })
+ if (re.code != 200)
+ checkApiSuccessOrSncakbar(re, "恢复所选收藏失败")
+ EventBus.emit('ContactsList.updateContacts')
+ } */
+ })
+ })()
+ return true
+ },
+ }
+ ],
+ })
+ }}>
)
diff --git a/client/ui/chat/JoinRequestsList.tsx b/client/ui/chat/JoinRequestsList.tsx
index 8ed022a..a08bd84 100644
--- a/client/ui/chat/JoinRequestsList.tsx
+++ b/client/ui/chat/JoinRequestsList.tsx
@@ -1,16 +1,12 @@
import { TextField } from "mdui"
-import RecentChat from "../../api/client_data/RecentChat.ts"
import useEventListener from "../useEventListener.ts"
-import RecentsListItem from "./JoinRequestsListItem.tsx"
import React from "react"
-import useAsyncEffect from "../useAsyncEffect.ts"
import Client from "../../api/Client.ts"
import { checkApiSuccessOrSncakbar } from "../snackbar.ts"
import data from "../../Data.ts"
import EventBus from "../../EventBus.ts"
-import isMobileUI from "../isMobileUI.ts"
import JoinRequest from "../../api/client_data/JoinRequest.ts"
-import JoinRequestsListItem from "./JoinRequestsListItem.tsx";
+import JoinRequestsListItem from "./JoinRequestsListItem.tsx"
import Chat from "../../api/client_data/Chat.ts"
interface Args extends React.HTMLAttributes