whyuzeim 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/cjs/AddMember/image/ic_close.svg.js +5 -0
- package/cjs/AddMember/index.d.ts +7 -0
- package/cjs/AddMember/index.js +107 -0
- package/cjs/AddMember/style/index.scss +47 -0
- package/cjs/ChatBox/JoinGroupDialog/index.d.ts +10 -0
- package/cjs/ChatBox/JoinGroupDialog/index.js +102 -0
- package/cjs/ChatBox/JoinGroupDialog/style/index.scss +4 -0
- package/cjs/ChatBox/image/ic_chat_back.svg.js +5 -0
- package/cjs/ChatBox/image/ic_more.svg.js +5 -0
- package/cjs/ChatBox/index.d.ts +10 -0
- package/cjs/ChatBox/index.js +557 -0
- package/cjs/ChatBox/style/index.scss +26 -0
- package/cjs/ContactList/index.d.ts +24 -0
- package/cjs/ContactList/index.js +64 -0
- package/cjs/ContactList/style/index.scss +5 -0
- package/cjs/CustomChatView/index.d.ts +9 -0
- package/cjs/CustomChatView/index.js +389 -0
- package/cjs/Exit/index.d.ts +3 -0
- package/cjs/Exit/index.js +17 -0
- package/cjs/GroupDetail/GroupDetailEditView/index.d.ts +8 -0
- package/cjs/GroupDetail/GroupDetailEditView/index.js +269 -0
- package/cjs/GroupDetail/GroupShareView/index.d.ts +10 -0
- package/cjs/GroupDetail/GroupShareView/index.js +151 -0
- package/cjs/GroupDetail/image/ic_close.svg.js +5 -0
- package/cjs/GroupDetail/image/ic_group_edit.svg.js +5 -0
- package/cjs/GroupDetail/image/ic_messages.svg.js +5 -0
- package/cjs/GroupDetail/image/ic_share.svg.js +5 -0
- package/cjs/GroupDetail/image/icon_translation.svg.js +5 -0
- package/cjs/GroupDetail/index.d.ts +26 -0
- package/cjs/GroupDetail/index.js +265 -0
- package/cjs/GroupDetail/style/index.scss +66 -0
- package/cjs/IM/DefaultIMLayout/MobileHeader/index.d.ts +11 -0
- package/cjs/IM/DefaultIMLayout/MobileHeader/index.js +29 -0
- package/cjs/IM/DefaultIMLayout/MobileHeader/style/index.scss +11 -0
- package/cjs/IM/DefaultIMLayout/index.d.ts +3 -0
- package/cjs/IM/DefaultIMLayout/index.js +29 -0
- package/cjs/IM/DefaultIMLayout/style/index.scss +0 -0
- package/cjs/IM/MainContent/index.d.ts +8 -0
- package/cjs/IM/MainContent/index.js +87 -0
- package/cjs/IM/MainContent/style/index.scss +22 -0
- package/cjs/IM/MobileHeader/index.d.ts +11 -0
- package/cjs/IM/MobileHeader/index.js +29 -0
- package/cjs/IM/MobileHeader/style/index.scss +11 -0
- package/cjs/IM/context.d.ts +21 -0
- package/cjs/IM/context.js +14 -0
- package/cjs/IM/encryption.d.ts +22 -0
- package/cjs/IM/encryption.js +38 -0
- package/cjs/IM/hooks/useGetAgoraToken.d.ts +2 -0
- package/cjs/IM/hooks/useGetAgoraToken.js +61 -0
- package/cjs/IM/index.d.ts +20 -0
- package/cjs/IM/index.js +130 -0
- package/cjs/IM/style/index.scss +119 -0
- package/cjs/NoData/image/no-data.svg.js +5 -0
- package/cjs/NoData/index.d.ts +8 -0
- package/cjs/NoData/index.js +22 -0
- package/cjs/NoData/style/index.scss +3 -0
- package/cjs/Panelbar/index.d.ts +7 -0
- package/cjs/Panelbar/style/index.scss +3 -0
- package/cjs/Sharebox/index.d.ts +7 -0
- package/cjs/Sharebox/index.js +14 -0
- package/cjs/Sharebox/style/index.scss +0 -0
- package/cjs/Sidebar/CreateGroup/index.d.ts +21 -0
- package/cjs/Sidebar/CreateGroup/index.js +188 -0
- package/cjs/Sidebar/CreateGroup/style/index.scss +65 -0
- package/cjs/Sidebar/CustomConversationItem/OperateBtn/image/delete.svg.js +5 -0
- package/cjs/Sidebar/CustomConversationItem/OperateBtn/image/logout.svg.js +5 -0
- package/cjs/Sidebar/CustomConversationItem/OperateBtn/image/more.svg.js +5 -0
- package/cjs/Sidebar/CustomConversationItem/OperateBtn/image/muted.svg.js +5 -0
- package/cjs/Sidebar/CustomConversationItem/OperateBtn/index.d.ts +10 -0
- package/cjs/Sidebar/CustomConversationItem/OperateBtn/index.js +210 -0
- package/cjs/Sidebar/CustomConversationItem/OperateBtn/style/index.scss +14 -0
- package/cjs/Sidebar/CustomConversationItem/index.d.ts +9 -0
- package/cjs/Sidebar/CustomConversationItem/index.js +105 -0
- package/cjs/Sidebar/CustomConversationItem/style/index.scss +15 -0
- package/cjs/Sidebar/GroupList/OperateBtn/image/delete.svg.js +5 -0
- package/cjs/Sidebar/GroupList/OperateBtn/image/logout.svg.js +5 -0
- package/cjs/Sidebar/GroupList/OperateBtn/image/more.svg.js +5 -0
- package/cjs/Sidebar/GroupList/OperateBtn/image/muted.svg.js +5 -0
- package/cjs/Sidebar/GroupList/OperateBtn/index.d.ts +11 -0
- package/cjs/Sidebar/GroupList/OperateBtn/index.js +238 -0
- package/cjs/Sidebar/GroupList/OperateBtn/style/index.scss +14 -0
- package/cjs/Sidebar/GroupList/index.d.ts +7 -0
- package/cjs/Sidebar/GroupList/index.js +142 -0
- package/cjs/Sidebar/GroupList/style/index.scss +40 -0
- package/cjs/Sidebar/MobileCreateGroup/index.d.ts +27 -0
- package/cjs/Sidebar/MobileCreateGroup/index.js +171 -0
- package/cjs/Sidebar/MobileCreateGroup/style/index.scss +14 -0
- package/cjs/Sidebar/Searchbox/image/ic_messages.svg.js +5 -0
- package/cjs/Sidebar/Searchbox/index.d.ts +31 -0
- package/cjs/Sidebar/Searchbox/index.js +152 -0
- package/cjs/Sidebar/Searchbox/style/index.scss +29 -0
- package/cjs/Sidebar/image/create.svg.js +5 -0
- package/cjs/Sidebar/image/group.svg.js +5 -0
- package/cjs/Sidebar/image/ic_close.svg.js +5 -0
- package/cjs/Sidebar/image/ic_menu.svg.js +5 -0
- package/cjs/Sidebar/image/ic_search.svg.js +5 -0
- package/cjs/Sidebar/image/message.svg.js +5 -0
- package/cjs/Sidebar/image/mobile_create.svg.js +5 -0
- package/cjs/Sidebar/index.d.ts +9 -0
- package/cjs/Sidebar/index.js +268 -0
- package/cjs/Sidebar/style/index.scss +82 -0
- package/cjs/TypeItem/OperateBtn/image/admin.svg.js +5 -0
- package/cjs/TypeItem/OperateBtn/image/ban.svg.js +5 -0
- package/cjs/TypeItem/OperateBtn/image/block.svg.js +5 -0
- package/cjs/TypeItem/OperateBtn/image/logout.svg.js +5 -0
- package/cjs/TypeItem/OperateBtn/image/more.svg.js +5 -0
- package/cjs/TypeItem/OperateBtn/index.d.ts +13 -0
- package/cjs/TypeItem/OperateBtn/index.js +198 -0
- package/cjs/TypeItem/OperateBtn/style/index.scss +0 -0
- package/cjs/TypeItem/index.d.ts +24 -0
- package/cjs/TypeItem/index.js +84 -0
- package/cjs/TypeItem/style/index.scss +67 -0
- package/cjs/UserProfile/image/ic_close.svg.js +5 -0
- package/cjs/UserProfile/image/ic_share.svg.js +5 -0
- package/cjs/UserProfile/image/icon_translation.svg.js +5 -0
- package/cjs/UserProfile/index.d.ts +8 -0
- package/cjs/UserProfile/index.js +170 -0
- package/cjs/UserProfile/style/index.scss +50 -0
- package/cjs/index.d.ts +16 -0
- package/cjs/index.js +23 -0
- package/cjs/type.d.ts +7 -0
- package/cjs/type.js +61 -0
- package/es/AddMember/image/ic_close.svg.js +3 -0
- package/es/AddMember/index.d.ts +7 -0
- package/es/AddMember/index.js +105 -0
- package/es/AddMember/style/index.scss +47 -0
- package/es/ChatBox/JoinGroupDialog/index.d.ts +10 -0
- package/es/ChatBox/JoinGroupDialog/index.js +100 -0
- package/es/ChatBox/JoinGroupDialog/style/index.scss +4 -0
- package/es/ChatBox/image/ic_chat_back.svg.js +3 -0
- package/es/ChatBox/image/ic_more.svg.js +3 -0
- package/es/ChatBox/index.d.ts +10 -0
- package/es/ChatBox/index.js +555 -0
- package/es/ChatBox/style/index.scss +26 -0
- package/es/ContactList/index.d.ts +24 -0
- package/es/ContactList/index.js +62 -0
- package/es/ContactList/style/index.scss +5 -0
- package/es/CustomChatView/index.d.ts +9 -0
- package/es/CustomChatView/index.js +387 -0
- package/es/Exit/index.d.ts +3 -0
- package/es/Exit/index.js +15 -0
- package/es/GroupDetail/GroupDetailEditView/index.d.ts +8 -0
- package/es/GroupDetail/GroupDetailEditView/index.js +267 -0
- package/es/GroupDetail/GroupShareView/index.d.ts +10 -0
- package/es/GroupDetail/GroupShareView/index.js +149 -0
- package/es/GroupDetail/image/ic_close.svg.js +3 -0
- package/es/GroupDetail/image/ic_group_edit.svg.js +3 -0
- package/es/GroupDetail/image/ic_messages.svg.js +3 -0
- package/es/GroupDetail/image/ic_share.svg.js +3 -0
- package/es/GroupDetail/image/icon_translation.svg.js +3 -0
- package/es/GroupDetail/index.d.ts +26 -0
- package/es/GroupDetail/index.js +263 -0
- package/es/GroupDetail/style/index.scss +66 -0
- package/es/IM/DefaultIMLayout/MobileHeader/index.d.ts +11 -0
- package/es/IM/DefaultIMLayout/MobileHeader/index.js +27 -0
- package/es/IM/DefaultIMLayout/MobileHeader/style/index.scss +11 -0
- package/es/IM/DefaultIMLayout/index.d.ts +3 -0
- package/es/IM/DefaultIMLayout/index.js +27 -0
- package/es/IM/DefaultIMLayout/style/index.scss +0 -0
- package/es/IM/MainContent/index.d.ts +8 -0
- package/es/IM/MainContent/index.js +85 -0
- package/es/IM/MainContent/style/index.scss +22 -0
- package/es/IM/MobileHeader/index.d.ts +11 -0
- package/es/IM/MobileHeader/index.js +27 -0
- package/es/IM/MobileHeader/style/index.scss +11 -0
- package/es/IM/context.d.ts +21 -0
- package/es/IM/context.js +12 -0
- package/es/IM/encryption.d.ts +22 -0
- package/es/IM/encryption.js +34 -0
- package/es/IM/hooks/useGetAgoraToken.d.ts +2 -0
- package/es/IM/hooks/useGetAgoraToken.js +59 -0
- package/es/IM/index.d.ts +20 -0
- package/es/IM/index.js +128 -0
- package/es/IM/style/index.scss +119 -0
- package/es/NoData/image/no-data.svg.js +3 -0
- package/es/NoData/index.d.ts +8 -0
- package/es/NoData/index.js +20 -0
- package/es/NoData/style/index.scss +3 -0
- package/es/Panelbar/index.d.ts +7 -0
- package/es/Panelbar/style/index.scss +3 -0
- package/es/Sharebox/index.d.ts +7 -0
- package/es/Sharebox/index.js +12 -0
- package/es/Sharebox/style/index.scss +0 -0
- package/es/Sidebar/CreateGroup/index.d.ts +21 -0
- package/es/Sidebar/CreateGroup/index.js +186 -0
- package/es/Sidebar/CreateGroup/style/index.scss +65 -0
- package/es/Sidebar/CustomConversationItem/OperateBtn/image/delete.svg.js +3 -0
- package/es/Sidebar/CustomConversationItem/OperateBtn/image/logout.svg.js +3 -0
- package/es/Sidebar/CustomConversationItem/OperateBtn/image/more.svg.js +3 -0
- package/es/Sidebar/CustomConversationItem/OperateBtn/image/muted.svg.js +3 -0
- package/es/Sidebar/CustomConversationItem/OperateBtn/index.d.ts +10 -0
- package/es/Sidebar/CustomConversationItem/OperateBtn/index.js +208 -0
- package/es/Sidebar/CustomConversationItem/OperateBtn/style/index.scss +14 -0
- package/es/Sidebar/CustomConversationItem/index.d.ts +9 -0
- package/es/Sidebar/CustomConversationItem/index.js +103 -0
- package/es/Sidebar/CustomConversationItem/style/index.scss +15 -0
- package/es/Sidebar/GroupList/OperateBtn/image/delete.svg.js +3 -0
- package/es/Sidebar/GroupList/OperateBtn/image/logout.svg.js +3 -0
- package/es/Sidebar/GroupList/OperateBtn/image/more.svg.js +3 -0
- package/es/Sidebar/GroupList/OperateBtn/image/muted.svg.js +3 -0
- package/es/Sidebar/GroupList/OperateBtn/index.d.ts +11 -0
- package/es/Sidebar/GroupList/OperateBtn/index.js +236 -0
- package/es/Sidebar/GroupList/OperateBtn/style/index.scss +14 -0
- package/es/Sidebar/GroupList/index.d.ts +7 -0
- package/es/Sidebar/GroupList/index.js +140 -0
- package/es/Sidebar/GroupList/style/index.scss +40 -0
- package/es/Sidebar/MobileCreateGroup/index.d.ts +27 -0
- package/es/Sidebar/MobileCreateGroup/index.js +169 -0
- package/es/Sidebar/MobileCreateGroup/style/index.scss +14 -0
- package/es/Sidebar/Searchbox/image/ic_messages.svg.js +3 -0
- package/es/Sidebar/Searchbox/index.d.ts +31 -0
- package/es/Sidebar/Searchbox/index.js +150 -0
- package/es/Sidebar/Searchbox/style/index.scss +29 -0
- package/es/Sidebar/image/create.svg.js +3 -0
- package/es/Sidebar/image/group.svg.js +3 -0
- package/es/Sidebar/image/ic_close.svg.js +3 -0
- package/es/Sidebar/image/ic_menu.svg.js +3 -0
- package/es/Sidebar/image/ic_search.svg.js +3 -0
- package/es/Sidebar/image/message.svg.js +3 -0
- package/es/Sidebar/image/mobile_create.svg.js +3 -0
- package/es/Sidebar/index.d.ts +9 -0
- package/es/Sidebar/index.js +266 -0
- package/es/Sidebar/style/index.scss +82 -0
- package/es/TypeItem/OperateBtn/image/admin.svg.js +3 -0
- package/es/TypeItem/OperateBtn/image/ban.svg.js +3 -0
- package/es/TypeItem/OperateBtn/image/block.svg.js +3 -0
- package/es/TypeItem/OperateBtn/image/logout.svg.js +3 -0
- package/es/TypeItem/OperateBtn/image/more.svg.js +3 -0
- package/es/TypeItem/OperateBtn/index.d.ts +13 -0
- package/es/TypeItem/OperateBtn/index.js +196 -0
- package/es/TypeItem/OperateBtn/style/index.scss +0 -0
- package/es/TypeItem/index.d.ts +24 -0
- package/es/TypeItem/index.js +82 -0
- package/es/TypeItem/style/index.scss +67 -0
- package/es/UserProfile/image/ic_close.svg.js +3 -0
- package/es/UserProfile/image/ic_share.svg.js +3 -0
- package/es/UserProfile/image/icon_translation.svg.js +3 -0
- package/es/UserProfile/index.d.ts +8 -0
- package/es/UserProfile/index.js +168 -0
- package/es/UserProfile/style/index.scss +50 -0
- package/es/index.d.ts +16 -0
- package/es/index.js +9 -0
- package/es/type.d.ts +7 -0
- package/es/type.js +58 -0
- package/package.json +33 -0
- package/types/global.d.ts +10 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/esm/asyncToGenerator');
|
|
4
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/esm/slicedToArray');
|
|
5
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
6
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
7
|
+
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var classNames = require('classnames');
|
|
10
|
+
var agoraChatUikit = require('agora-chat-uikit');
|
|
11
|
+
var ic_close = require('./image/ic_close.svg.js');
|
|
12
|
+
var ic_share = require('./image/ic_share.svg.js');
|
|
13
|
+
var ic_group_edit = require('./image/ic_group_edit.svg.js');
|
|
14
|
+
var icon_translation = require('./image/icon_translation.svg.js');
|
|
15
|
+
var ic_messages = require('./image/ic_messages.svg.js');
|
|
16
|
+
var index$2 = require('../TypeItem/index.js');
|
|
17
|
+
var context = require('../IM/context.js');
|
|
18
|
+
require('./style/index.scss');
|
|
19
|
+
var index = require('./GroupDetailEditView/index.js');
|
|
20
|
+
var index$1 = require('./GroupShareView/index.js');
|
|
21
|
+
|
|
22
|
+
var GroupDetail = function GroupDetail(props) {
|
|
23
|
+
var _groupInfo$sendbirdid;
|
|
24
|
+
var _useContext = React.useContext(context.Context),
|
|
25
|
+
http = _useContext.http;
|
|
26
|
+
var _useState = React.useState(false),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
isEdit = _useState2[0],
|
|
29
|
+
setIsEdit = _useState2[1];
|
|
30
|
+
var _useState3 = React.useState(),
|
|
31
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
+
groupInfo = _useState4[0],
|
|
33
|
+
setGroupInfo = _useState4[1];
|
|
34
|
+
var _useState5 = React.useState([]),
|
|
35
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
36
|
+
memberList = _useState6[0],
|
|
37
|
+
setMemberList = _useState6[1];
|
|
38
|
+
var _useState7 = React.useState(0),
|
|
39
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
40
|
+
isautomatictranslate = _useState8[0],
|
|
41
|
+
setIsautomatictranslate = _useState8[1];
|
|
42
|
+
var _useConversationConte = agoraChatUikit.useConversationContext(),
|
|
43
|
+
setCurrentConversation = _useConversationConte.setCurrentConversation;
|
|
44
|
+
var _useState9 = React.useState(false),
|
|
45
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
46
|
+
isShare = _useState10[0],
|
|
47
|
+
setIsShare = _useState10[1];
|
|
48
|
+
var getGroupDetailInfo = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
49
|
+
var groupid, response, data, _data$data;
|
|
50
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
51
|
+
while (1) switch (_context.prev = _context.next) {
|
|
52
|
+
case 0:
|
|
53
|
+
_context.prev = 0;
|
|
54
|
+
groupid = agoraChatUikit.rootStore.conversationStore.currentCvs.conversationId;
|
|
55
|
+
_context.next = 4;
|
|
56
|
+
return http.post("/capi/account/imchannel/getdetails", {
|
|
57
|
+
sendbirdid: groupid
|
|
58
|
+
});
|
|
59
|
+
case 4:
|
|
60
|
+
response = _context.sent;
|
|
61
|
+
data = response.data;
|
|
62
|
+
if (data && data.code === 200) {
|
|
63
|
+
setGroupInfo(data.data);
|
|
64
|
+
setIsautomatictranslate((_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.isautomatictranslate);
|
|
65
|
+
}
|
|
66
|
+
_context.next = 11;
|
|
67
|
+
break;
|
|
68
|
+
case 9:
|
|
69
|
+
_context.prev = 9;
|
|
70
|
+
_context.t0 = _context["catch"](0);
|
|
71
|
+
case 11:
|
|
72
|
+
case "end":
|
|
73
|
+
return _context.stop();
|
|
74
|
+
}
|
|
75
|
+
}, _callee, null, [[0, 9]]);
|
|
76
|
+
})), [http, props.userId]);
|
|
77
|
+
var handleGetGroupList = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
78
|
+
var groupid, result;
|
|
79
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
80
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
81
|
+
case 0:
|
|
82
|
+
_context2.prev = 0;
|
|
83
|
+
groupid = agoraChatUikit.rootStore.conversationStore.currentCvs.conversationId;
|
|
84
|
+
_context2.next = 4;
|
|
85
|
+
return http.post("/capi/account/imchannel/getchanneluserv2", {
|
|
86
|
+
page: 1,
|
|
87
|
+
size: 2000,
|
|
88
|
+
sendbirdid: groupid
|
|
89
|
+
});
|
|
90
|
+
case 4:
|
|
91
|
+
result = _context2.sent;
|
|
92
|
+
setMemberList(result.data.data.list);
|
|
93
|
+
_context2.next = 11;
|
|
94
|
+
break;
|
|
95
|
+
case 8:
|
|
96
|
+
_context2.prev = 8;
|
|
97
|
+
_context2.t0 = _context2["catch"](0);
|
|
98
|
+
console.log(_context2.t0);
|
|
99
|
+
case 11:
|
|
100
|
+
case "end":
|
|
101
|
+
return _context2.stop();
|
|
102
|
+
}
|
|
103
|
+
}, _callee2, null, [[0, 8]]);
|
|
104
|
+
})), [http]);
|
|
105
|
+
// /capi/account/imchannel/setautomatictranslate
|
|
106
|
+
var handleTranslate = React.useCallback(/*#__PURE__*/function () {
|
|
107
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(checked) {
|
|
108
|
+
var groupid;
|
|
109
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
110
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
111
|
+
case 0:
|
|
112
|
+
_context3.prev = 0;
|
|
113
|
+
groupid = agoraChatUikit.rootStore.conversationStore.currentCvs.conversationId;
|
|
114
|
+
_context3.next = 4;
|
|
115
|
+
return http.post("/capi/account/imchannel/setautomatictranslate", {
|
|
116
|
+
sendbirdid: groupid,
|
|
117
|
+
type: 0,
|
|
118
|
+
isautomatictranslate: checked ? 1 : 0
|
|
119
|
+
});
|
|
120
|
+
case 4:
|
|
121
|
+
_context3.next = 9;
|
|
122
|
+
break;
|
|
123
|
+
case 6:
|
|
124
|
+
_context3.prev = 6;
|
|
125
|
+
_context3.t0 = _context3["catch"](0);
|
|
126
|
+
console.log(_context3.t0);
|
|
127
|
+
case 9:
|
|
128
|
+
case "end":
|
|
129
|
+
return _context3.stop();
|
|
130
|
+
}
|
|
131
|
+
}, _callee3, null, [[0, 6]]);
|
|
132
|
+
}));
|
|
133
|
+
return function (_x) {
|
|
134
|
+
return _ref3.apply(this, arguments);
|
|
135
|
+
};
|
|
136
|
+
}(), [http]);
|
|
137
|
+
React.useEffect(function () {
|
|
138
|
+
getGroupDetailInfo();
|
|
139
|
+
}, []);
|
|
140
|
+
React.useEffect(function () {
|
|
141
|
+
handleGetGroupList();
|
|
142
|
+
}, [handleGetGroupList]);
|
|
143
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isEdit ? /*#__PURE__*/React.createElement(index, {
|
|
144
|
+
groupInfo: groupInfo,
|
|
145
|
+
onClickClose: function onClickClose(needRefresh) {
|
|
146
|
+
setIsEdit(false);
|
|
147
|
+
if (needRefresh) {
|
|
148
|
+
getGroupDetailInfo();
|
|
149
|
+
if (groupInfo !== null && groupInfo !== void 0 && groupInfo.id) {
|
|
150
|
+
agoraChatUikit.rootStore.addressStore.getGroupInfo(groupInfo === null || groupInfo === void 0 ? void 0 : groupInfo.id);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}) : isShare ? /*#__PURE__*/React.createElement(index$1, {
|
|
155
|
+
shareObjId: (_groupInfo$sendbirdid = groupInfo === null || groupInfo === void 0 ? void 0 : groupInfo.sendbirdid) !== null && _groupInfo$sendbirdid !== void 0 ? _groupInfo$sendbirdid : '',
|
|
156
|
+
shareObjName: groupInfo === null || groupInfo === void 0 ? void 0 : groupInfo.name,
|
|
157
|
+
shareObjImageurl: groupInfo === null || groupInfo === void 0 ? void 0 : groupInfo.headimgurl,
|
|
158
|
+
onClickClose: function onClickClose() {
|
|
159
|
+
return setIsShare(false);
|
|
160
|
+
}
|
|
161
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
className: classNames("yuze-groupDetail w-full h-full")
|
|
163
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
className: classNames("yuze-groupDetail-header flex flex-row items-center justify-between")
|
|
165
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: classNames("yuze-groupDetail-header-left flex flex-row gap-5")
|
|
167
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
168
|
+
src: ic_close,
|
|
169
|
+
className: "cursor-pointer",
|
|
170
|
+
onClick: function onClick() {
|
|
171
|
+
if (props.onClickClose) {
|
|
172
|
+
props.onClickClose();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
176
|
+
className: "text-base"
|
|
177
|
+
}, "Profile")), /*#__PURE__*/React.createElement("div", {
|
|
178
|
+
className: classNames("yuze-groupDetail-header-right")
|
|
179
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
180
|
+
onClick: function onClick() {
|
|
181
|
+
return setIsEdit(true);
|
|
182
|
+
},
|
|
183
|
+
src: ic_group_edit,
|
|
184
|
+
className: "cursor-pointer"
|
|
185
|
+
}), /*#__PURE__*/React.createElement("img", {
|
|
186
|
+
onClick: function onClick() {
|
|
187
|
+
return setIsShare(true);
|
|
188
|
+
},
|
|
189
|
+
src: ic_share,
|
|
190
|
+
className: "cursor-pointer"
|
|
191
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
192
|
+
className: classNames("yuze-groupDetail-content-wrap overflow-auto")
|
|
193
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
194
|
+
className: classNames("yuze-groupDetail-content flex flex-col items-center justify-between p-4")
|
|
195
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
196
|
+
className: classNames("yuze-groupDetail-content-avatar flex flex-col items-center")
|
|
197
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
198
|
+
src: groupInfo === null || groupInfo === void 0 ? void 0 : groupInfo.headimgurl,
|
|
199
|
+
alt: ""
|
|
200
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
201
|
+
className: "text-base mt-1"
|
|
202
|
+
}, groupInfo === null || groupInfo === void 0 ? void 0 : groupInfo.name), /*#__PURE__*/React.createElement("span", {
|
|
203
|
+
className: "text-base text-[var(--im-third-fontColor)] font-normal mt-2"
|
|
204
|
+
}, groupInfo === null || groupInfo === void 0 ? void 0 : groupInfo.members, " members")), /*#__PURE__*/React.createElement("div", {
|
|
205
|
+
className: classNames("yuze-groupDetail-content-translation flex items-center justify-between w-full mt-4")
|
|
206
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
207
|
+
className: "flex gap-4 items-center flex-row"
|
|
208
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
209
|
+
src: icon_translation,
|
|
210
|
+
alt: ""
|
|
211
|
+
}), /*#__PURE__*/React.createElement("span", null, "Enable auto-translation")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(agoraChatUikit.Switch, {
|
|
212
|
+
checked: isautomatictranslate === 1,
|
|
213
|
+
onChange: function onChange(event) {
|
|
214
|
+
setIsautomatictranslate(event.target.checked ? 1 : 0);
|
|
215
|
+
handleTranslate(event.target.checked);
|
|
216
|
+
}
|
|
217
|
+
})))), /*#__PURE__*/React.createElement("div", {
|
|
218
|
+
className: "yuze-groupDetail-member p-4"
|
|
219
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
220
|
+
className: "block text-center"
|
|
221
|
+
}, "Member"), /*#__PURE__*/React.createElement("div", {
|
|
222
|
+
className: "yuze-groupDetail-member-list pt-4"
|
|
223
|
+
}, _mapInstanceProperty(memberList).call(memberList, function (item) {
|
|
224
|
+
return /*#__PURE__*/React.createElement(index$2, {
|
|
225
|
+
isprohibition: item.isprohibition,
|
|
226
|
+
name: item.nickname,
|
|
227
|
+
avatar: item.headimgurl,
|
|
228
|
+
key: item.userid,
|
|
229
|
+
roletype: item.roletype,
|
|
230
|
+
rightNode: /*#__PURE__*/React.createElement("img", {
|
|
231
|
+
src: ic_messages,
|
|
232
|
+
onClick: function onClick() {
|
|
233
|
+
// addConversation({
|
|
234
|
+
// conversationId: item.userid,
|
|
235
|
+
// chatType: "singleChat",
|
|
236
|
+
// lastMessage: "",
|
|
237
|
+
// unreadCount: 0,
|
|
238
|
+
// });
|
|
239
|
+
setCurrentConversation({
|
|
240
|
+
conversationId: item.userid,
|
|
241
|
+
chatType: "singleChat",
|
|
242
|
+
name: item.nickname
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}),
|
|
246
|
+
showMore: true,
|
|
247
|
+
userId: item.userid,
|
|
248
|
+
sendbirdid: agoraChatUikit.rootStore.conversationStore.currentCvs.conversationId,
|
|
249
|
+
onBlock: function onBlock(value) {
|
|
250
|
+
var resetMemeber = _filterInstanceProperty(memberList).call(memberList, function (item) {
|
|
251
|
+
return item.userid !== value;
|
|
252
|
+
});
|
|
253
|
+
setMemberList(resetMemeber);
|
|
254
|
+
},
|
|
255
|
+
onDelete: function onDelete(value) {
|
|
256
|
+
var resetMemeber = _filterInstanceProperty(memberList).call(memberList, function (item) {
|
|
257
|
+
return item.userid !== value;
|
|
258
|
+
});
|
|
259
|
+
setMemberList(resetMemeber);
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}))))));
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
module.exports = GroupDetail;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.yuze-groupDetail {
|
|
2
|
+
background-color: var(--im-main-backgroundColor);
|
|
3
|
+
.yuze-groupDetail-header {
|
|
4
|
+
height: 64px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding: 0 10px;
|
|
7
|
+
.yuze-groupDetail-header-left {
|
|
8
|
+
span {
|
|
9
|
+
color: var(--im-main-fontColor);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
&-right {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
align-items: center;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.yuze-groupDetail-content-wrap {
|
|
20
|
+
height: calc(100% - 64px);
|
|
21
|
+
}
|
|
22
|
+
.yuze-groupDetail-content {
|
|
23
|
+
.yuze-groupDetail-content-avatar {
|
|
24
|
+
img {
|
|
25
|
+
width: 80px;
|
|
26
|
+
height: 80px;
|
|
27
|
+
object-fit: cover;
|
|
28
|
+
}
|
|
29
|
+
span {
|
|
30
|
+
color: var(--im-main-fontColor);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.yuze-groupDetail-content-username {
|
|
34
|
+
img {
|
|
35
|
+
width: 20px;
|
|
36
|
+
height: 20px;
|
|
37
|
+
}
|
|
38
|
+
span {
|
|
39
|
+
color: var(--im-main-fontColor);
|
|
40
|
+
|
|
41
|
+
&:nth-child(2) {
|
|
42
|
+
color: #707579;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.yuze-groupDetail-content-translation {
|
|
47
|
+
img {
|
|
48
|
+
width: 20px;
|
|
49
|
+
height: 20px;
|
|
50
|
+
}
|
|
51
|
+
span {
|
|
52
|
+
color: var(--im-main-fontColor);
|
|
53
|
+
}
|
|
54
|
+
.cui-switch .cui-switch-container-checked {
|
|
55
|
+
background-color: var(--im-main-switchColor);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.yuze-groupDetail-member {
|
|
60
|
+
& > span {
|
|
61
|
+
height: 34px;
|
|
62
|
+
color: var(--im-main-fontColor);
|
|
63
|
+
border-bottom: solid 1px #fff;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./style/index.scss";
|
|
3
|
+
export interface IMobileHeader {
|
|
4
|
+
leftIcon?: React.ReactElement;
|
|
5
|
+
rightIcon?: React.ReactElement;
|
|
6
|
+
title?: React.ReactElement;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
declare const MobileHeader: React.FC<IMobileHeader>;
|
|
11
|
+
export default MobileHeader;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
require('./style/index.scss');
|
|
5
|
+
var classNames = require('classnames');
|
|
6
|
+
|
|
7
|
+
var MobileHeader = function MobileHeader(props) {
|
|
8
|
+
var title = props.title,
|
|
9
|
+
leftIcon = props.leftIcon,
|
|
10
|
+
rightIcon = props.rightIcon,
|
|
11
|
+
className = props.className,
|
|
12
|
+
style = props.style;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: classNames("yuze-mobileHeader flex flex-row items-center justify-between px-4", className),
|
|
15
|
+
style: style
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "yuze-mobileHeader-left"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "yuze-mobileHeader-item flex flex-row items-center justify-center"
|
|
20
|
+
}, leftIcon)), /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: "yuze-mobileHeader-middle text-xl text-[var(--im-main-fontColor)]"
|
|
22
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "yuze-mobileHeader-right"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "yuze-mobileHeader-item flex flex-row items-center justify-center"
|
|
26
|
+
}, rightIcon)));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
module.exports = MobileHeader;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var index = require('../MainContent/index.js');
|
|
5
|
+
var index$1 = require('../../Sidebar/index.js');
|
|
6
|
+
var context = require('../context.js');
|
|
7
|
+
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
9
|
+
var DefaultIMLayout = function DefaultIMLayout() {
|
|
10
|
+
var _useContext = React.useContext(context.Context),
|
|
11
|
+
setRightComponent = _useContext.setRightComponent,
|
|
12
|
+
midComponent = _useContext.midComponent,
|
|
13
|
+
renderMidComponent = _useContext.renderMidComponent;
|
|
14
|
+
return /*#__PURE__*/React.createElement(index, {
|
|
15
|
+
renderLeft: function renderLeft() {
|
|
16
|
+
return /*#__PURE__*/React.createElement(index$1, {
|
|
17
|
+
onConversationItemClick: function onConversationItemClick() {
|
|
18
|
+
setRightComponent && setRightComponent(undefined);
|
|
19
|
+
renderMidComponent && renderMidComponent();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
renderMid: function renderMid() {
|
|
24
|
+
return midComponent;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
module.exports = DefaultIMLayout;
|
|
File without changes
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
4
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
5
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
6
|
+
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
7
|
+
var React = require('react');
|
|
8
|
+
var classNames = require('classnames');
|
|
9
|
+
var context = require('../context.js');
|
|
10
|
+
require('./style/index.scss');
|
|
11
|
+
var agoraChatUikit = require('agora-chat-uikit');
|
|
12
|
+
|
|
13
|
+
var MainContent = function MainContent(props) {
|
|
14
|
+
var renderLeft = props.renderLeft,
|
|
15
|
+
renderMid = props.renderMid;
|
|
16
|
+
var _useContext = React.useContext(context.Context),
|
|
17
|
+
rightComponent = _useContext.rightComponent,
|
|
18
|
+
sidebarExpand = _useContext.sidebarExpand,
|
|
19
|
+
midComponent = _useContext.midComponent;
|
|
20
|
+
//同步群图片
|
|
21
|
+
React.useEffect(function () {
|
|
22
|
+
// 获取群组头像
|
|
23
|
+
if (agoraChatUikit.rootStore.loginState) {
|
|
24
|
+
var _context, _context2;
|
|
25
|
+
var groupIds = _mapInstanceProperty(_context = _filterInstanceProperty(_context2 = agoraChatUikit.rootStore.addressStore.groups).call(_context2, function (item) {
|
|
26
|
+
return !item.avatarUrl;
|
|
27
|
+
})).call(_context, function (item) {
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
return item.groupid;
|
|
30
|
+
}) || [];
|
|
31
|
+
_forEachInstanceProperty(groupIds).call(groupIds, function (groupid) {
|
|
32
|
+
agoraChatUikit.rootStore.addressStore.getGroupInfo(groupid);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}, [agoraChatUikit.rootStore.loginState, agoraChatUikit.rootStore.addressStore.groups.length]);
|
|
36
|
+
//当前会话发生改变,检测群图片
|
|
37
|
+
React.useEffect(function () {
|
|
38
|
+
if (agoraChatUikit.rootStore.conversationStore.currentCvs.chatType === "groupChat") {
|
|
39
|
+
var _rootStore$addressSto, _context3;
|
|
40
|
+
var groupAvatarUrl = (_rootStore$addressSto = _findInstanceProperty(_context3 = agoraChatUikit.rootStore.addressStore.groups).call(_context3, function (item) {
|
|
41
|
+
return item.groupid === agoraChatUikit.rootStore.conversationStore.currentCvs.conversationId;
|
|
42
|
+
})) === null || _rootStore$addressSto === void 0 ? void 0 : _rootStore$addressSto.avatarUrl;
|
|
43
|
+
if (!groupAvatarUrl) {
|
|
44
|
+
agoraChatUikit.rootStore.addressStore.getGroupInfo(agoraChatUikit.rootStore.conversationStore.currentCvs.conversationId);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, [agoraChatUikit.rootStore.conversationStore.currentCvs]);
|
|
48
|
+
React.useEffect(function () {
|
|
49
|
+
var _context4, _context5, _context6;
|
|
50
|
+
var groupIds = _mapInstanceProperty(_context4 = _filterInstanceProperty(_context5 = agoraChatUikit.rootStore.addressStore.groups).call(_context5, function (item) {
|
|
51
|
+
return !item.avatarUrl;
|
|
52
|
+
})).call(_context4, function (item) {
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
return item.groupid;
|
|
55
|
+
}) || [];
|
|
56
|
+
_forEachInstanceProperty(groupIds).call(groupIds, function (groupid) {
|
|
57
|
+
agoraChatUikit.rootStore.addressStore.getGroupInfo(groupid);
|
|
58
|
+
});
|
|
59
|
+
_forEachInstanceProperty(_context6 = agoraChatUikit.rootStore.conversationStore.conversationList).call(_context6, function (conversation) {
|
|
60
|
+
if (!conversation.avatarUrl) {
|
|
61
|
+
if (conversation.chatType === "groupChat") {
|
|
62
|
+
agoraChatUikit.rootStore.addressStore.getGroupInfo(conversation.conversationId);
|
|
63
|
+
} else {
|
|
64
|
+
agoraChatUikit.rootStore.addressStore.getUserInfo(conversation.conversationId);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}, []);
|
|
69
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: classNames("flex flex-row h-full w-screen yuze-mainContent relative sm:w-auto", {
|
|
71
|
+
"yuze-mainContent-folder": !sidebarExpand
|
|
72
|
+
})
|
|
73
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: classNames("h-full yuze-mainContent-left shrink-0 overflow-hidden w-full sm:w-[360px]", {
|
|
75
|
+
// "flex-1": sidebarExpand,
|
|
76
|
+
})
|
|
77
|
+
}, renderLeft && renderLeft()), midComponent && /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: classNames("yuze-mainContent-middle shrink-0 h-full absolute top-0 left-0 w-full sm:relative", {
|
|
79
|
+
"sm:w-[884px]": !rightComponent,
|
|
80
|
+
"sm:w-[568px]": rightComponent
|
|
81
|
+
})
|
|
82
|
+
}, renderMid && renderMid()), rightComponent && /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: classNames("yuze-mainContent-right shrink-0 h-full absolute top-0 left-0 z-1000 w-full sm:relative sm:w-[316px]")
|
|
84
|
+
}, rightComponent));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
module.exports = MainContent;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.flex-1\.8 {
|
|
2
|
+
flex: 1.8;
|
|
3
|
+
}
|
|
4
|
+
.flex-2\.8 {
|
|
5
|
+
flex: 2.8;
|
|
6
|
+
}
|
|
7
|
+
.yuze-mainContent {
|
|
8
|
+
.yuze-mainContent-left {
|
|
9
|
+
// width: 360px;
|
|
10
|
+
transition: all 0.2s;
|
|
11
|
+
border-right: solid 1px var(--im-mainContent-left-borderColor);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&.yuze-mainContent-folder {
|
|
15
|
+
.yuze-mainContent-left {
|
|
16
|
+
width: 80px;
|
|
17
|
+
.cui-conversationItem-info {
|
|
18
|
+
right: -50px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./style/index.scss";
|
|
3
|
+
export interface IMobileHeader {
|
|
4
|
+
leftIcon?: React.ReactElement;
|
|
5
|
+
rightIcon?: React.ReactElement;
|
|
6
|
+
title?: React.ReactElement;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
declare const MobileHeader: React.FC<IMobileHeader>;
|
|
11
|
+
export default MobileHeader;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
require('./style/index.scss');
|
|
5
|
+
var classNames = require('classnames');
|
|
6
|
+
|
|
7
|
+
var MobileHeader = function MobileHeader(props) {
|
|
8
|
+
var title = props.title,
|
|
9
|
+
leftIcon = props.leftIcon,
|
|
10
|
+
rightIcon = props.rightIcon,
|
|
11
|
+
className = props.className,
|
|
12
|
+
style = props.style;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: classNames("yuze-mobileHeader flex flex-row items-center justify-between px-4", className),
|
|
15
|
+
style: style
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "yuze-mobileHeader-left"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "yuze-mobileHeader-item flex flex-row items-center justify-center"
|
|
20
|
+
}, leftIcon)), /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: "yuze-mobileHeader-middle text-xl text-[var(--im-main-fontColor)]"
|
|
22
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "yuze-mobileHeader-right"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "yuze-mobileHeader-item flex flex-row items-center justify-center"
|
|
26
|
+
}, rightIcon)));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
module.exports = MobileHeader;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface IUserInfo {
|
|
4
|
+
uid: string;
|
|
5
|
+
username?: string;
|
|
6
|
+
avatar?: string;
|
|
7
|
+
}
|
|
8
|
+
export type ConfigConsumerProps = {
|
|
9
|
+
rightComponent?: React.ReactElement;
|
|
10
|
+
setRightComponent?: (element: React.ReactElement | undefined) => void;
|
|
11
|
+
midComponent?: React.ReactElement;
|
|
12
|
+
setMidComponent?: (element: React.ReactElement | undefined) => void;
|
|
13
|
+
renderMidComponent?: () => void;
|
|
14
|
+
http: AxiosInstance;
|
|
15
|
+
userInfo: IUserInfo;
|
|
16
|
+
sidebarExpand?: boolean;
|
|
17
|
+
setSidebarExpand?: (value: boolean) => void;
|
|
18
|
+
mobile?: boolean;
|
|
19
|
+
onChatIconClick?: () => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const Context: React.Context<ConfigConsumerProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var axios = require('axios');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
7
|
+
var Context = /*#__PURE__*/React.createContext({
|
|
8
|
+
http: axios.create({}),
|
|
9
|
+
userInfo: {
|
|
10
|
+
uid: ""
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
exports.Context = Context;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const aesKey: string;
|
|
2
|
+
export declare function createAesKey(): string;
|
|
3
|
+
/**
|
|
4
|
+
* AES 加密
|
|
5
|
+
* @param word 待加密字段
|
|
6
|
+
* @param keyStr 加密 key
|
|
7
|
+
* @returns {string} 返回加密字段
|
|
8
|
+
*/
|
|
9
|
+
export declare function aesEncrypt(word: any, keyStr: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* AES 解密
|
|
12
|
+
* @param word 待解密数据
|
|
13
|
+
* @param keyStr 解密 key
|
|
14
|
+
* @returns {string} 返回解密字符串
|
|
15
|
+
*/
|
|
16
|
+
export declare function aesDecrypt(word: string, keyStr: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* RSA 设置公钥
|
|
19
|
+
* @param val 公钥
|
|
20
|
+
*/
|
|
21
|
+
export declare function setPublicKey(val: string): void;
|
|
22
|
+
export declare function rsaEncrypt(data: string, keyStr: string): string | false;
|