diff --git a/src/client/channel/components/ChannelRoomControls.tsx b/src/client/channel/components/ChannelRoomControls.tsx index b75affa50..729e2d234 100644 --- a/src/client/channel/components/ChannelRoomControls.tsx +++ b/src/client/channel/components/ChannelRoomControls.tsx @@ -256,14 +256,28 @@ function RoomSettings({ channel, room, onClose }: { {zh ? "已获准的用户" : "Users with access"} {members.map(userId =>
{userProfile(channel.state, channel.profiles, userId)?.name ?? (zh ? "用户" : "User")} - { void run(() => channel.revokeRoomAccess(room.id, userId, false)); }} />
)} {membersError &&

{zh ? "未能读取用户资料,请重新打开重试。" : "Could not load user profiles. Reopen to retry."}

} } +
+ { + const deleteData = room.available; + const question = deleteData + ? (zh ? `删除“${room.name}”及其聊天记录?已下载的文件保留。若托管端已离线,则仅从列表中移除。` + : `Delete “${room.name}” and its chat history? Downloaded files are kept. If hosting has gone offline, only its list entry will be removed.`) + : (zh ? `从列表中移除“${room.name}”?离线托管端的数据保留。` + : `Remove “${room.name}” from this list? Data on its offline host is kept.`); + if (window.confirm(question)) void run(() => channel.deleteRoom(room.id, deleteData, false), onClose); + }} /> +
} {room.authorized && } {(room.authorized || room.canManage) && } diff --git a/src/client/channel/components/ChannelRoomInvitation.tsx b/src/client/channel/components/ChannelRoomInvitation.tsx index 905e1ee1d..36305dc83 100644 --- a/src/client/channel/components/ChannelRoomInvitation.tsx +++ b/src/client/channel/components/ChannelRoomInvitation.tsx @@ -61,7 +61,7 @@ function RoomInvitation({ channel, room, onClose, onManageAccess }: { : room.canManage && available && invitation.state === "available" ? invitation.url : ""; const { message } = channelErrorPresentation(error, t); const generate = (reset = false) => { void run(() => channel.createRoomInvite(room.id, false), url => setInvitation({ state: "available", url })); }} />; return <>