@smart-link/rn-im 1.0.23 → 1.0.24
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/dist/api/addressList.js +6 -17
- package/dist/api/backup.js +8 -20
- package/dist/api/file.js +6 -35
- package/dist/api/user.js +6 -16
- package/dist/components/CachedImage.js +14 -42
- package/dist/components/Camera/Camera.js +26 -54
- package/dist/components/Camera/CameraCapture.js +99 -128
- package/dist/components/Camera/CameraResult.js +33 -61
- package/dist/components/ChatAvatar/ChatAvatar.d.ts +1 -1
- package/dist/components/ChatAvatar/ChatAvatar.js +34 -62
- package/dist/components/ChatAvatar/ChatAvatarId.d.ts +2 -2
- package/dist/components/ChatAvatar/ChatAvatarId.js +26 -51
- package/dist/components/ChatAvatar/ChatAvatarLocal.d.ts +2 -2
- package/dist/components/ChatAvatar/ChatAvatarLocal.js +23 -25
- package/dist/components/ChatAvatar/index.js +2 -23
- package/dist/components/Favicon.js +6 -34
- package/dist/components/FormatTimeText.js +5 -10
- package/dist/components/Highlighter.js +9 -34
- package/dist/components/IndicatorText.js +14 -39
- package/dist/components/LocalImage.js +7 -32
- package/dist/components/NetworkUnconnected.js +14 -42
- package/dist/components/PopoverWrapper.js +22 -47
- package/dist/components/VideoPlayer.js +111 -138
- package/dist/components/styles.js +10 -13
- package/dist/default-assets.d.ts +1 -0
- package/dist/default-assets.js +8 -10
- package/dist/hooks/useDownloadSource.js +7 -12
- package/dist/hooks/useFormatMsgTime.js +5 -13
- package/dist/hooks/useImReady.js +7 -10
- package/dist/hooks/useImSelector.js +34 -48
- package/dist/hooks/useTranslation.js +5 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -28
- package/dist/init.js +30 -40
- package/dist/interface.js +1 -2
- package/dist/locales/en/addressList.js +1 -3
- package/dist/locales/index.js +4 -27
- package/dist/locales/lao/addressList.js +1 -3
- package/dist/locales/zh/addressList.js +1 -3
- package/dist/pages/address-list/AddressList.js +33 -61
- package/dist/pages/address-list/CardInfo.js +10 -18
- package/dist/pages/address-list/ChooseContact.js +50 -78
- package/dist/pages/address-list/Icons.js +7 -14
- package/dist/pages/address-list/Organization.js +59 -89
- package/dist/pages/address-list/UserDetail.js +55 -83
- package/dist/pages/address-list/UserJobs.js +31 -33
- package/dist/pages/address-list/UserSearch.js +29 -54
- package/dist/pages/address-list/addressList.routes.js +11 -16
- package/dist/pages/collection/Collection.js +53 -81
- package/dist/pages/collection/ContentFactory.js +53 -82
- package/dist/pages/collection/collection.routes.js +3 -9
- package/dist/pages/conversation/ForwardToConversation.js +63 -91
- package/dist/pages/conversation/List.js +74 -102
- package/dist/pages/conversation/components/ConversationCard.js +46 -74
- package/dist/pages/conversation/components/ConversationOption.js +27 -55
- package/dist/pages/conversation/conversation.routes.js +17 -23
- package/dist/pages/conversation/setting/GroupTransfer.js +32 -60
- package/dist/pages/conversation/setting/OptionAvatars.js +62 -90
- package/dist/pages/conversation/setting/OptionCancelGroup.js +14 -42
- package/dist/pages/conversation/setting/OptionConversation.js +20 -48
- package/dist/pages/conversation/setting/OptionGroup.js +20 -48
- package/dist/pages/conversation/setting/OptionGroupManage.js +21 -49
- package/dist/pages/conversation/setting/OptionGroupMoreMember.js +48 -53
- package/dist/pages/conversation/setting/OptionGroupNameOrNoticeEdit.js +49 -77
- package/dist/pages/conversation/setting/Setting.js +49 -54
- package/dist/pages/conversation/setting/SettingChatBg.js +26 -54
- package/dist/pages/index.js +7 -27
- package/dist/pages/message/ChooseMember.js +56 -84
- package/dist/pages/message/MessageBackup/Bar.js +18 -43
- package/dist/pages/message/MessageBackup/MessageBackup.js +42 -72
- package/dist/pages/message/MessageBackup/RestoreBackupPage.js +48 -76
- package/dist/pages/message/MessageBackup/StartBackupPage.js +48 -76
- package/dist/pages/message/MessageBackup/index.js +3 -12
- package/dist/pages/message/MessageBackup/utils.js +14 -22
- package/dist/pages/message/MessageList.js +141 -135
- package/dist/pages/message/MessageRecord.js +49 -73
- package/dist/pages/message/components/BusiNotifyCard.js +60 -85
- package/dist/pages/message/components/ChatBg.js +11 -36
- package/dist/pages/message/components/MessageItem.js +82 -110
- package/dist/pages/message/components/MessageItemQuote.js +30 -58
- package/dist/pages/message/components/MessageItemTips.js +27 -55
- package/dist/pages/message/components/MessageOption.js +96 -120
- package/dist/pages/message/components/MessagePayload.js +36 -64
- package/dist/pages/message/components/MessagePictureAlbum.js +32 -60
- package/dist/pages/message/components/MessageReceiptStatus.js +18 -43
- package/dist/pages/message/components/MessageUndo.js +18 -48
- package/dist/pages/message/components/MultipleBar/index.js +48 -76
- package/dist/pages/message/components/Payload/PayloadContact.js +30 -58
- package/dist/pages/message/components/Payload/PayloadFile.js +41 -65
- package/dist/pages/message/components/Payload/PayloadMultiple.js +38 -66
- package/dist/pages/message/components/Payload/PayloadNotify.js +28 -56
- package/dist/pages/message/components/Payload/PayloadPicture.js +21 -49
- package/dist/pages/message/components/Payload/PayloadShare.js +39 -67
- package/dist/pages/message/components/Payload/PayloadText.js +39 -67
- package/dist/pages/message/components/Payload/PayloadVideo.js +28 -56
- package/dist/pages/message/components/Payload/PayloadVoice.js +80 -93
- package/dist/pages/message/components/Payload/PayloadWrapper.js +18 -43
- package/dist/pages/message/components/Payload/type.js +1 -2
- package/dist/pages/message/components/ReceiptBack.js +31 -61
- package/dist/pages/message/components/TextMixMessage.js +13 -38
- package/dist/pages/message/components/TextMixQuote.js +129 -158
- package/dist/pages/message/components/TextMixQuoteMessage.js +16 -44
- package/dist/pages/message/components/UploadProgress.js +12 -37
- package/dist/pages/message/components/messageBar/EmojiPanel.js +25 -50
- package/dist/pages/message/components/messageBar/Icons.js +56 -74
- package/dist/pages/message/components/messageBar/MessageBar.js +84 -115
- package/dist/pages/message/components/messageBar/MessageInput.js +30 -55
- package/dist/pages/message/components/messageBar/OptionPanel.js +54 -82
- package/dist/pages/message/components/messageBar/VoiceBar.js +122 -100
- package/dist/pages/message/components/messageBar/index.js +2 -23
- package/dist/pages/message/message.routes.js +11 -40
- package/dist/pages/search/Search.js +38 -66
- package/dist/pages/search/SearchChatRecords.js +64 -92
- package/dist/pages/search/SearchFile.js +68 -96
- package/dist/pages/search/SearchManager.js +60 -65
- package/dist/pages/search/SearchPicturePage.js +16 -44
- package/dist/pages/search/components/ChatRecords.js +46 -74
- package/dist/pages/search/components/MyGroupChat.js +41 -69
- package/dist/pages/search/components/PictureMulipleBar.js +35 -63
- package/dist/pages/search/components/SearchFileList.js +59 -64
- package/dist/pages/search/components/SearchPictures.js +68 -98
- package/dist/pages/search/components/SearchShareLinkList.js +50 -55
- package/dist/pages/search/components/SearchUser.js +25 -53
- package/dist/pages/search/components/useSearchMessage.js +12 -16
- package/dist/pages/search/search.routes.js +11 -17
- package/dist/pages/search/utils.js +4 -12
- package/dist/pages/types.js +1 -2
- package/dist/slice/contact/contact.action.js +1 -2
- package/dist/slice/contact/contact.slice.js +4 -8
- package/dist/slice/index.js +7 -13
- package/dist/slice/panel/panel.slice.d.ts +2 -1
- package/dist/slice/panel/panel.slice.js +8 -7
- package/dist/slice/video/video.action.d.ts +1 -0
- package/dist/slice/video/video.action.js +56 -38
- package/dist/slice/video/video.slice.d.ts +1 -1
- package/dist/slice/video/video.slice.js +7 -8
- package/dist/utils/audio.d.ts +3 -0
- package/dist/utils/audio.js +10 -0
- package/dist/utils/color.js +2 -9
- package/dist/utils/common-action-sheet.js +9 -14
- package/dist/utils/cookie.js +6 -14
- package/dist/utils/emoji.js +9 -12
- package/dist/utils/file-icon.js +33 -60
- package/dist/utils/file-operate.js +1 -2
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +74 -87
- package/dist/utils/golden-rectangle.js +3 -7
- package/dist/utils/phone.js +13 -22
- package/dist/utils/request.js +7 -15
- package/dist/utils/scroll.js +5 -9
- package/dist/utils/summary.js +4 -11
- package/dist/utils/take-camera.js +12 -19
- package/dist/utils/text-mix.js +4 -11
- package/dist/utils/upload.js +20 -41
- package/package.json +6 -7
@@ -1,68 +1,40 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
-
};
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
const react_1 = __importStar(require("react"));
|
30
|
-
const react_native_1 = require("react-native");
|
31
|
-
const FontAwesome5_1 = __importDefault(require("react-native-vector-icons/FontAwesome5"));
|
32
|
-
const AntDesign_1 = __importDefault(require("react-native-vector-icons/AntDesign"));
|
33
|
-
const MaterialIcons_1 = __importDefault(require("react-native-vector-icons/MaterialIcons"));
|
34
|
-
const useTranslation_1 = __importDefault(require("../../../hooks/useTranslation"));
|
35
|
-
const rn_ui_1 = require("@smart-link/rn-ui");
|
36
|
-
const PictureMultipleBar = (0, react_1.memo)((props) => {
|
1
|
+
import React, { memo, useEffect, useState } from 'react';
|
2
|
+
import { StyleSheet, TouchableOpacity, Text, View, Animated } from 'react-native';
|
3
|
+
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
|
4
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
5
|
+
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
6
|
+
import useTranslation from '../../../hooks/useTranslation';
|
7
|
+
import { dp } from '@smart-link/rn-ui';
|
8
|
+
const PictureMultipleBar = memo((props) => {
|
37
9
|
const { disabled, onPicMultipleForward, onPicMultipleCollect, onPicMultipleSave, onPicMultipleDelete } = props;
|
38
|
-
const { t } = (
|
39
|
-
const [height] =
|
40
|
-
|
41
|
-
return
|
42
|
-
toValue:
|
10
|
+
const { t } = useTranslation();
|
11
|
+
const [height] = useState(new Animated.Value(0)); // 高度初始值设为0
|
12
|
+
useEffect(() => {
|
13
|
+
return Animated.timing(height, {
|
14
|
+
toValue: dp(56),
|
43
15
|
duration: 100,
|
44
16
|
useNativeDriver: false
|
45
17
|
}).start();
|
46
18
|
}, []);
|
47
19
|
const color = disabled ? '#aaaaaa' : '#333';
|
48
20
|
const fontStyle = [styles.text, { color }];
|
49
|
-
return (<
|
50
|
-
<
|
21
|
+
return (<Animated.View style={[styles.wrap, { height }]}>
|
22
|
+
<TouchableOpacity disabled={disabled} style={styles.item} onPress={() => {
|
51
23
|
console.log(onPicMultipleForward);
|
52
24
|
onPicMultipleForward && onPicMultipleForward();
|
53
25
|
}}>
|
54
|
-
<
|
55
|
-
<
|
56
|
-
<
|
57
|
-
</
|
58
|
-
</
|
26
|
+
<View style={styles.item}>
|
27
|
+
<FontAwesome5 name="reply" size={dp(20)} color={color}/>
|
28
|
+
<Text style={fontStyle}>{t('forward')}</Text>
|
29
|
+
</View>
|
30
|
+
</TouchableOpacity>
|
59
31
|
|
60
|
-
<
|
32
|
+
<TouchableOpacity disabled={disabled} style={styles.item} onPress={() => {
|
61
33
|
onPicMultipleCollect && onPicMultipleCollect();
|
62
34
|
}}>
|
63
|
-
<
|
64
|
-
<
|
65
|
-
</
|
35
|
+
<MaterialIcons name="collections" size={dp(20)} color={color}/>
|
36
|
+
<Text style={fontStyle}>{t('collect')}</Text>
|
37
|
+
</TouchableOpacity>
|
66
38
|
|
67
39
|
{/* <TouchableOpacity
|
68
40
|
disabled={disabled}
|
@@ -75,20 +47,20 @@ const PictureMultipleBar = (0, react_1.memo)((props) => {
|
|
75
47
|
<Text style={fontStyle}>{t('savePicture')}</Text>
|
76
48
|
</TouchableOpacity> */}
|
77
49
|
|
78
|
-
<
|
50
|
+
<TouchableOpacity disabled={disabled} style={styles.item} onPress={() => {
|
79
51
|
onPicMultipleDelete && onPicMultipleDelete();
|
80
52
|
}}>
|
81
|
-
<
|
82
|
-
<
|
83
|
-
</
|
84
|
-
</
|
53
|
+
<AntDesign name="delete" size={dp(20)} color={color}/>
|
54
|
+
<Text style={fontStyle}>{t('delete')}</Text>
|
55
|
+
</TouchableOpacity>
|
56
|
+
</Animated.View>);
|
85
57
|
});
|
86
|
-
const styles =
|
58
|
+
const styles = StyleSheet.create({
|
87
59
|
wrap: {
|
88
|
-
paddingTop:
|
60
|
+
paddingTop: dp(10),
|
89
61
|
backgroundColor: '#fff',
|
90
62
|
width: '100%',
|
91
|
-
paddingHorizontal:
|
63
|
+
paddingHorizontal: dp(10),
|
92
64
|
justifyContent: 'space-around',
|
93
65
|
flexDirection: 'row',
|
94
66
|
},
|
@@ -98,8 +70,8 @@ const styles = react_native_1.StyleSheet.create({
|
|
98
70
|
alignItems: 'center'
|
99
71
|
},
|
100
72
|
text: {
|
101
|
-
fontSize:
|
102
|
-
lineHeight:
|
73
|
+
fontSize: dp(13),
|
74
|
+
lineHeight: dp(20)
|
103
75
|
}
|
104
76
|
});
|
105
|
-
|
77
|
+
export default PictureMultipleBar;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
"use strict";
|
2
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -8,85 +7,81 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
8
|
});
|
10
9
|
};
|
11
|
-
|
12
|
-
|
13
|
-
};
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
const file_1 = require("../../../utils/file");
|
24
|
-
const file_icon_1 = require("../../../utils/file-icon");
|
25
|
-
const react_native_file_viewer_1 = __importDefault(require("react-native-file-viewer"));
|
26
|
-
const init_1 = require("../../../init");
|
10
|
+
import { Text, View, StyleSheet, PixelRatio, SectionList, TouchableOpacity } from "react-native";
|
11
|
+
import { memo } from "react";
|
12
|
+
import { useSearchMessage } from "../../../pages/search/components/useSearchMessage";
|
13
|
+
import useTranslation from "../../../hooks/useTranslation";
|
14
|
+
import { ActionSheet, dp } from "@smart-link/rn-ui";
|
15
|
+
import { borderStyle } from "../../../components/styles";
|
16
|
+
import ChatAvatar from "../../../components/ChatAvatar";
|
17
|
+
import dayjs from "dayjs";
|
18
|
+
import { numberToFileSize } from "../../../utils/file";
|
19
|
+
import { findSvgIcon } from "../../../utils/file-icon";
|
20
|
+
import FileViewer from "react-native-file-viewer";
|
21
|
+
import { getImManager } from "../../../init";
|
27
22
|
const backgroundColor = '#fff';
|
28
23
|
const fileCache = {};
|
29
24
|
const SearchFileList = ({ keyword, conversationId }) => {
|
30
25
|
console.log(keyword);
|
31
|
-
const { t } = (
|
32
|
-
const { data, onLoadMore, reload } =
|
26
|
+
const { t } = useTranslation();
|
27
|
+
const { data, onLoadMore, reload } = useSearchMessage({
|
33
28
|
keyword,
|
34
29
|
conversationId,
|
35
30
|
payloadType: 'file',
|
36
31
|
});
|
37
32
|
if (data.length === 0) {
|
38
|
-
return <
|
39
|
-
<
|
40
|
-
</
|
33
|
+
return <View style={styles.empty}>
|
34
|
+
<Text>{t('noSearchResult')}</Text>
|
35
|
+
</View>;
|
41
36
|
}
|
42
37
|
const keyExtractor = (item) => item.messageSeq;
|
43
38
|
const renderSectionHeader = ({ section }) => {
|
44
|
-
return (<
|
39
|
+
return (<Text style={styles.dateTxt}>{section.date}</Text>);
|
45
40
|
};
|
46
41
|
const renderItem = ({ item }) => {
|
47
42
|
const { messageSeq, messageFrom, messageFromName, payload = {}, } = item;
|
48
43
|
const ext = payload.filename.split('.').pop();
|
49
|
-
const Icon =
|
50
|
-
return (<
|
44
|
+
const Icon = findSvgIcon(ext);
|
45
|
+
return (<TouchableOpacity style={[styles.item, { backgroundColor }]} activeOpacity={0.5} onPress={() => {
|
51
46
|
// @ts-ignore
|
52
|
-
|
47
|
+
ActionSheet.open({
|
53
48
|
title: payload.filename,
|
54
49
|
onClose: () => {
|
55
|
-
|
50
|
+
ActionSheet.destroy();
|
56
51
|
},
|
57
52
|
options: [
|
58
53
|
{
|
59
54
|
text: t('openLocal'),
|
60
55
|
// @ts-ignore
|
61
56
|
onPress: () => __awaiter(void 0, void 0, void 0, function* () {
|
62
|
-
|
57
|
+
ActionSheet.destroy();
|
63
58
|
if (payload.localPath) {
|
64
59
|
fileCache[payload.fileId] = payload.localPath;
|
65
60
|
}
|
66
61
|
else {
|
67
62
|
if (!fileCache[payload.fileId]) {
|
68
|
-
const localPath = yield
|
63
|
+
const localPath = yield getImManager().download({
|
69
64
|
fileId: payload.fileId,
|
70
65
|
resourceType: 'file',
|
71
66
|
filename: payload.filename,
|
72
67
|
fileSize: payload.size,
|
73
68
|
});
|
74
|
-
|
69
|
+
getImManager().db.updateMessage({
|
75
70
|
messageSeq,
|
76
71
|
payload: Object.assign(Object.assign({}, payload), { localPath: localPath }),
|
77
72
|
});
|
78
73
|
fileCache[payload.fileId] = localPath;
|
79
74
|
}
|
80
75
|
}
|
81
|
-
|
76
|
+
FileViewer.open(fileCache[payload.fileId]);
|
82
77
|
})
|
83
78
|
},
|
84
79
|
{
|
85
80
|
text: t('delete'), textColor: 'primary',
|
86
81
|
// @ts-ignore
|
87
82
|
onPress: () => __awaiter(void 0, void 0, void 0, function* () {
|
88
|
-
|
89
|
-
yield
|
83
|
+
ActionSheet.destroy();
|
84
|
+
yield getImManager().deleteMessage(item);
|
90
85
|
reload();
|
91
86
|
}),
|
92
87
|
},
|
@@ -96,23 +91,23 @@ const SearchFileList = ({ keyword, conversationId }) => {
|
|
96
91
|
},
|
97
92
|
});
|
98
93
|
}}>
|
99
|
-
<
|
100
|
-
<
|
101
|
-
<
|
102
|
-
<
|
103
|
-
</
|
104
|
-
<
|
105
|
-
<
|
106
|
-
<
|
107
|
-
<
|
108
|
-
</
|
94
|
+
<View style={styles.itemTop}>
|
95
|
+
<ChatAvatar disabled={true} id={messageFrom} name={messageFromName} size={dp(24)}/>
|
96
|
+
<Text style={styles.name} numberOfLines={1}>{messageFromName}</Text>
|
97
|
+
<Text style={styles.time}>{dayjs(item.messageTime).format("YYYY-MM-DD")}</Text>
|
98
|
+
</View>
|
99
|
+
<View style={styles.file}>
|
100
|
+
<View style={styles.fileInfo}>
|
101
|
+
<Text style={styles.fileName} numberOfLines={2} ellipsizeMode={'middle'}>{payload.filename}</Text>
|
102
|
+
<Text style={styles.fileSize}>{numberToFileSize(payload.size)}</Text>
|
103
|
+
</View>
|
109
104
|
<Icon style={styles.imageIcon}/>
|
110
|
-
</
|
111
|
-
</
|
105
|
+
</View>
|
106
|
+
</TouchableOpacity>);
|
112
107
|
};
|
113
|
-
return (<
|
108
|
+
return (<SectionList style={styles.view} sections={data} renderItem={renderItem} renderSectionHeader={renderSectionHeader} keyExtractor={keyExtractor} initialNumToRender={10} progressViewOffset={100} onEndReached={onLoadMore} onEndReachedThreshold={0.2}/>);
|
114
109
|
};
|
115
|
-
const styles =
|
110
|
+
const styles = StyleSheet.create({
|
116
111
|
view: {
|
117
112
|
backgroundColor: "#F5F5F5"
|
118
113
|
},
|
@@ -122,15 +117,15 @@ const styles = react_native_1.StyleSheet.create({
|
|
122
117
|
justifyContent: 'center'
|
123
118
|
},
|
124
119
|
dateTxt: {
|
125
|
-
paddingVertical:
|
126
|
-
paddingHorizontal:
|
127
|
-
marginBottom:
|
128
|
-
borderTopWidth: 1 /
|
129
|
-
borderBottomWidth: 1 /
|
120
|
+
paddingVertical: dp(5),
|
121
|
+
paddingHorizontal: dp(12),
|
122
|
+
marginBottom: dp(5),
|
123
|
+
borderTopWidth: 1 / PixelRatio.get(),
|
124
|
+
borderBottomWidth: 1 / PixelRatio.get(),
|
130
125
|
borderColor: "#E3E3E3",
|
131
126
|
backgroundColor: "#EDEDED"
|
132
127
|
},
|
133
|
-
item: Object.assign(Object.assign({ marginBottom:
|
128
|
+
item: Object.assign(Object.assign({ marginBottom: dp(5), marginHorizontal: dp(12), paddingVertical: dp(12), paddingHorizontal: dp(20) }, borderStyle), { borderWidth: 0 }),
|
134
129
|
itemTop: {
|
135
130
|
flex: 1,
|
136
131
|
flexDirection: "row",
|
@@ -138,36 +133,36 @@ const styles = react_native_1.StyleSheet.create({
|
|
138
133
|
position: "relative"
|
139
134
|
},
|
140
135
|
name: {
|
141
|
-
paddingLeft:
|
136
|
+
paddingLeft: dp(10)
|
142
137
|
},
|
143
138
|
time: {
|
144
139
|
position: "absolute",
|
145
|
-
top:
|
140
|
+
top: dp(5),
|
146
141
|
right: 0,
|
147
|
-
fontSize:
|
142
|
+
fontSize: dp(12),
|
148
143
|
color: '#a2a2a2'
|
149
144
|
},
|
150
145
|
file: {
|
151
146
|
flexDirection: 'row',
|
152
|
-
marginTop:
|
147
|
+
marginTop: dp(10)
|
153
148
|
},
|
154
149
|
fileInfo: {
|
155
150
|
flex: 1,
|
156
|
-
paddingRight:
|
151
|
+
paddingRight: dp(10),
|
157
152
|
justifyContent: 'center'
|
158
153
|
},
|
159
154
|
fileName: {
|
160
|
-
fontSize:
|
161
|
-
lineHeight:
|
155
|
+
fontSize: dp(15),
|
156
|
+
lineHeight: dp(20),
|
162
157
|
color: '#010101'
|
163
158
|
},
|
164
159
|
fileSize: {
|
165
|
-
fontSize:
|
166
|
-
lineHeight:
|
160
|
+
fontSize: dp(12),
|
161
|
+
lineHeight: dp(20),
|
167
162
|
color: '#a2a2a2'
|
168
163
|
},
|
169
164
|
imageIcon: {
|
170
|
-
height:
|
165
|
+
height: dp(45)
|
171
166
|
}
|
172
167
|
});
|
173
|
-
|
168
|
+
export default memo(SearchFileList);
|