Skip to content

Commit

Permalink
Merge pull request #627 from haoxiuwen/doc-v2
Browse files Browse the repository at this point in the history
Modify Chat UIKit Docs
  • Loading branch information
haoxiuwen authored Feb 4, 2024
2 parents a43371a + df64350 commit 7d84d94
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/document/server-side/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
| 添加好友 | POST | /{org_name}/{app_name}/users/{owner_username}/contacts/users/{friend_username} | 添加为好友。 |
| 移除好友 | DELETE | /{org_name}/{app_name}/users/{owner_username}/contacts/users/{friend_username} | 移除好友列表中的用户。 |
| 设置好友备注 | PUT | /{org_name}/{app_name}/user/{owner_username}/contacts/users/{friend_username} | 设置好有备注。 |
| 分页获取好友列表 | GET | /{org_name}/{app_name}/user/{username}/contacts?pageSize={N}&cursor={cursor}&needReturnRemark={true/false} | 100 次/秒/App Key |
| 分页获取好友列表 | GET | /{org_name}/{app_name}/user/{username}/contacts?limit={N}&cursor={cursor}&needReturnRemark={true/false} | 100 次/秒/App Key |
| 一次性获取好友列表 | GET | /{org_name}/{app_name}/users/{owner_username}/contacts/users | 获取好友列表。 |
| 获取黑名单列表 | GET | /{org_name}/{app_name}/users/{owner_username}/blocks/users | 获取黑名单。 |
| 添加用户至黑名单 | POST | /{org_name}/{app_name}/users/{owner_username}/blocks/users | 添加用户至黑名单。 |
Expand Down
2 changes: 1 addition & 1 deletion docs/document/server-side/user_relationship.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ curl -X PUT 'https://{host}/{org_name}/{app_name}/user/{owner_username}/contacts
### HTTP 请求

```http
GET https://{host}/{org_name}/{app_name}/user/{username}/contacts?pageSize={N}&cursor={cursor}&needReturnRemark={true/false}
GET https://{host}/{org_name}/{app_name}/user/{username}/contacts?limit={N}&cursor={cursor}&needReturnRemark={true/false}
```

#### 路径参数
Expand Down
2 changes: 1 addition & 1 deletion docs/product/limitationapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
| 添加好友 | POST | /{org_name}/{app_name}/users/{owner_username}/contacts/users/{friend_username} | 100 次/秒/App Key |
| 移除好友 | DELETE | /{org_name}/{app_name}/users/{owner_username}/contacts/users/{friend_username} | 100 次/秒/App Key |
| 设置好友备注 | PUT | /{org_name}/{app_name}/user/{owner_username}/contacts/users/{friend_username} | 100 次/秒/App Key |
| 分页获取好友列表 | GET | /{org_name}/{app_name}/user/{username}/contacts?pageSize={N}&cursor={cursor}&needReturnRemark={true/false} | 100 次/秒/App Key |
| 分页获取好友列表 | GET | /{org_name}/{app_name}/user/{username}/contacts?limit={N}&cursor={cursor}&needReturnRemark={true/false} | 100 次/秒/App Key |
| 一次性获取好友列表 | GET | /{org_name}/{app_name}/users/{owner_username}/contacts/users | 100 次/秒/App Key |
| 获取黑名单列表 | GET | /{org_name}/{app_name}/users/{owner_username}/blocks/users | 50 次/秒/App Key |
| 添加用户至黑名单 | POST | /{org_name}/{app_name}/users/{owner_username}/blocks/users | 50 次/秒/App Key |
Expand Down
15 changes: 7 additions & 8 deletions docs/uikit/chatuikit/android/chatuikit_chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
`EaseChatActivity` 页面主要进行了权限的请求,比如相机权限,语音权限等。

```kotlin
// conversationId: 1v1 is peer's userID, group chat is groupID
// chatType can be EaseChatType#SINGLE_CHAT, EaseChatType#GROUP_CHAT
// conversationId: 单聊为对端用户的用户 ID,群聊为群组 ID。
// chatType:单聊和群聊分别为 EaseChatType#SINGLE_CHATEaseChatType#GROUP_CHAT
EaseChatActivity.actionStart(mContext, conversationId, chatType)
```

Expand All @@ -28,8 +28,8 @@ class ChatActivity: AppCompactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_chat)
// conversationID: 1v1 is peer's userID, group chat is groupID
// chatType can be EaseChatType#SINGLE_CHAT, EaseChatType#GROUP_CHAT
// conversationId: 单聊为对端用户的用户 ID,群聊为群组 ID。
// chatType:单聊和群聊分别为 EaseChatType#SINGLE_CHATEaseChatType#GROUP_CHAT
EaseChatFragment.Builder(conversationId, chatType)
.build()?.let { fragment ->
supportFragmentManager.beginTransaction()
Expand All @@ -48,8 +48,8 @@ class ChatActivity: AppCompactActivity() {
`EaseChatFragment` 提供了 Builder 构建方式,方便开发者进行一些自定义设置,目前提供的设置项如下:

```kotlin
// conversationID: 1v1 is peer's userID, group chat is groupID
// easeChatType: SINGLE_CHAT, GROUP_CHAT, CHATROOM
// conversationID: 单聊为对端用户的用户 ID,群聊为群组 ID。
// easeChatType: 单聊和群聊分别为 SINGLE_CHAT 和 GROUP_CHAT。
EaseChatFragment.Builder(conversationID, easeChatType)
.useTitleBar(true)
.setTitleBarTitle("title")
Expand Down Expand Up @@ -171,7 +171,7 @@ class CustomChatTypeViewViewHolder(

override fun onBubbleClick(message: EaseMessage?) {
super.onBubbleClick(message)
// Add click event
// 添加点击事件
}
}
```
Expand Down Expand Up @@ -329,7 +329,6 @@ override fun onDismiss() {
}
```


### 设置输入菜单相关属性

- 获取 `EaseChatInputMenu` 对象:
Expand Down
4 changes: 2 additions & 2 deletions docs/uikit/chatuikit/flutter/chatuikit_integrated.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ChatUIKit.instance.loginWithPassword(userId: userId, password: password);
ChatUIKit.instance.loginWithToken(userId: userId, token: token);
```

### 第五步 搭建界面
### 第六步 搭建界面

单群聊 UIKit 提供会话列表、聊天、群组设置和通讯录等组件。你可以使用这些组件搭建界面,这些组件支持自定义,具体可以参考相应组件的文档。

Expand All @@ -114,7 +114,7 @@ class _ConversationsState extends State<Conversations> {
}
```

### 第六步 打包 app
### 第七步 打包 app

安卓打包时,需要在 `project/android/app/proguard-rules.pro` 文件中(如不存在,新建一个即可)增加以下代码:

Expand Down
6 changes: 3 additions & 3 deletions docs/uikit/chatuikit/flutter/chatuikit_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@

单群聊 UIKit 中业务相关的 UI 控件主要包含在以下三个 View 中:

- MessagesView 提供所有聊天视图的容器
- MessagesView 提供所有聊天视图

![img](@static/images/uikit/chatuikit/android/page_chat.png =400x830)

- ConversationsView 提供会话列表容器
- ConversationsView 提供会话列表

![img](@static/images/uikit/chatuikit/android/page_conversation.png =400x830)

- ContactsView 提供联系人、群组及其详情等容器
- ContactsView 提供联系人、群组及其详情等

![img](@static/images/uikit/chatuikit/android/page_contact_list.png =400x830)

2 changes: 1 addition & 1 deletion docs/uikit/chatuikit/ios/chatuikit_integrated.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 集成 EaseChatUIKit
# 集成单群聊 UIKit

<Toc />

Expand Down
2 changes: 1 addition & 1 deletion docs/uikit/chatuikit/react-native/chatuikit_integrated.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

已有项目需要满足一定条件,如果 React Native 版本太低可能会出现编译或者运行问题。如果 Xcode 或者 Android Studio 版本太低,也可能导致编译和运行问题。通常推荐同期的工具和组件,兼容性也是 React Native 常见问题。

## 集成 Chat UIKit SDK npm 包
## 集成单群聊 UIKit SDK npm 包

`Chat UIKit SDK` npm 包 `react-native-chat-uikit` 需要依赖包,可通过以下代码安装。

Expand Down
6 changes: 6 additions & 0 deletions docs/uikit/chatuikit/web/chatuikit_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ const ChatAPP = () => {

### useConversationContext 概览

下表中黑色字体为属性名称,蓝色字体为方法名称。

<table>
    <tr>
        <td>属性/方法</td>
Expand Down Expand Up @@ -198,6 +200,8 @@ const ChatAPP = () => {

### useChatContext 概览

下表中黑色字体为属性名称,蓝色字体为方法名称。

<table>
    <tr>
        <td>属性/方法</td>
Expand Down Expand Up @@ -290,6 +294,8 @@ const ChatAPP = () => {

### useAddressContext 概览

下表中黑色字体为属性名称,蓝色字体为方法名称。

<table>
    <tr>
        <td>属性/方法</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/uikit/chatuikit/web/chatuikit_integrated.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ const App = () => {
## 相关参考

- [组件库源码](https://github.com/easemob/Easemob-UIKit-web)
- [其他示例 demo](https://github.com/easemob/Easemob-UIKit-web/demo)
- [其他示例 demo](https://github.com/easemob/Easemob-UIKit-web/tree/main/demo)

0 comments on commit 7d84d94

Please sign in to comment.