From d0f4104b534a2d0c280d5ef2f26f2185e868bbf1 Mon Sep 17 00:00:00 2001
From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com>
Date: Fri, 10 Jun 2022 16:11:32 +0200
Subject: [PATCH] connect UI to protocol
---
.../ActivityCenter/ActivityButton.tsx | 1 +
.../ActivityCenter/ActivityCenter.tsx | 1 +
.../ActivityCenter/ActivityMessage.tsx | 1 +
.../src/components/chat-menu/index.tsx | 146 +++++++++---------
.../components/channels/channel-item.tsx | 2 +-
.../components/channels/index.tsx | 27 +---
.../community-info/community-dialog.tsx | 11 +-
.../components/community-info/index.tsx | 11 +-
.../components/get-started/index.tsx | 22 +--
.../throwaway-profile-found-dialog.tsx | 12 +-
.../components/messages/chat-item.tsx | 5 +-
.../components/messages/index.tsx | 1 +
.../components/sidebar-item/index.tsx | 6 +-
.../src/components/main-sidebar/index.tsx | 12 +-
.../member-sidebar/disconnect-dialog.tsx | 23 ++-
.../src/components/member-sidebar/index.tsx | 11 +-
.../components/member-sidebar/member-item.tsx | 5 +-
.../components/member-sidebar/user-item.tsx | 24 ++-
.../src/components/reaction-popover/index.tsx | 12 +-
.../components/user-profile-dialog/index.tsx | 2 +-
.../src/components/welcome-dialog/index.tsx | 33 ++--
.../chat/components/chat-info/index.tsx | 21 ++-
.../chat/components/chat-input/index.tsx | 11 +-
.../components/chat-input/input-reply.tsx | 23 +--
.../chat/components/chat-message/actions.tsx | 18 ++-
.../chat/components/chat-message/index.tsx | 111 +++++++------
.../routes/chat/components/navbar/index.tsx | 6 +-
.../status-react/src/routes/chat/index.tsx | 67 +++++---
28 files changed, 319 insertions(+), 306 deletions(-)
diff --git a/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx b/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx
index 19c0e0af..2bda3408 100644
--- a/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx
+++ b/packages/status-react/src/components/ActivityCenter/ActivityButton.tsx
@@ -1,3 +1,4 @@
+// @ts-nocheck
import React, { useMemo, useRef, useState } from 'react'
import styled from 'styled-components'
diff --git a/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx b/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx
index def32ccb..c0578c4b 100644
--- a/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx
+++ b/packages/status-react/src/components/ActivityCenter/ActivityCenter.tsx
@@ -1,3 +1,4 @@
+// @ts-nocheck
import React, { useMemo, useState } from 'react'
import styled from 'styled-components'
diff --git a/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx b/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx
index a9cca6d6..d99f2281 100644
--- a/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx
+++ b/packages/status-react/src/components/ActivityCenter/ActivityMessage.tsx
@@ -1,3 +1,4 @@
+// @ts-nocheck
import React, { useEffect, useMemo, useRef, useState } from 'react'
import styled from 'styled-components'
diff --git a/packages/status-react/src/components/chat-menu/index.tsx b/packages/status-react/src/components/chat-menu/index.tsx
index b591592f..9b553171 100644
--- a/packages/status-react/src/components/chat-menu/index.tsx
+++ b/packages/status-react/src/components/chat-menu/index.tsx
@@ -2,42 +2,42 @@ import React from 'react'
import { BellIcon } from '~/src/icons/bell-icon'
import { ContextMenu, DropdownMenu } from '~/src/system'
-import { useAlertDialog } from '~/src/system/dialog/alert-dialog'
-import { useDialog } from '~/src/system/dialog/dialog'
+// import { useAlertDialog } from '~/src/system/dialog/alert-dialog'
+// import { useDialog } from '~/src/system/dialog/dialog'
-import { UserProfileDialog } from '../user-profile-dialog'
-import { EditGroupChatDialog } from './edit-group-chat-dialog'
+// import { UserProfileDialog } from '../user-profile-dialog'
+// import { EditGroupChatDialog } from './edit-group-chat-dialog'
interface Props {
type: 'dropdown' | 'context'
- chatType: 'channel' | 'chat' | 'group-chat'
+ // chatType: 'channel' | 'chat' | 'group-chat'
}
export const ChatMenu = (props: Props) => {
- const { type, chatType } = props
+ const { type } = props
const Menu = type === 'dropdown' ? DropdownMenu : ContextMenu
- const userProfileDialog = useDialog(UserProfileDialog)
- const editGroupChatDialog = useDialog(EditGroupChatDialog)
+ // const userProfileDialog = useDialog(UserProfileDialog)
+ // const editGroupChatDialog = useDialog(EditGroupChatDialog)
- const deleteChatDialog = useAlertDialog({
- title: 'Delete Chat',
- description: 'Are you sure you want to delete this chat?',
- actionLabel: 'Delete',
- actionVariant: 'danger',
- cancelLabel: 'Keep',
- })
- const leaveGroupDialog = useAlertDialog({
- title: 'Leave Group',
- description: 'Are you sure you want to leave this group chat?',
- actionLabel: 'Leave',
- actionVariant: 'danger',
- cancelLabel: 'Stay',
- })
+ // const deleteChatDialog = useAlertDialog({
+ // title: 'Delete Chat',
+ // description: 'Are you sure you want to delete this chat?',
+ // actionLabel: 'Delete',
+ // actionVariant: 'danger',
+ // cancelLabel: 'Keep',
+ // })
+ // const leaveGroupDialog = useAlertDialog({
+ // title: 'Leave Group',
+ // description: 'Are you sure you want to leave this group chat?',
+ // actionLabel: 'Leave',
+ // actionVariant: 'danger',
+ // cancelLabel: 'Stay',
+ // })
- const commonMenuItems = (
- <>
+ return (
+