-
Notifications
You must be signed in to change notification settings - Fork 427
/
Copy pathRepositoryPulseItem.js
117 lines (103 loc) · 3.72 KB
/
RepositoryPulseItem.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* Created by guoshuyu on 2017/11/12.
*/
import React, {
Component,
} from 'react';
import PropTypes from 'prop-types';
import {
Text,
Image,
View,
TouchableOpacity,
ImageBackground,
StyleSheet,
Platform
} from 'react-native';
import * as Constant from '../../style/constant'
import {Actions} from 'react-native-router-flux'
import styles from '../../style'
import Icon from 'react-native-vector-icons/FontAwesome'
import IconC from 'react-native-vector-icons/Octicons'
import UserImage from './UserImage'
import IconTextItem from './IconTextItem'
import HTMLView from '../common/CommonHtmlView';
import I18n from '../../style/i18n'
import TagGroup from "./TagGroup";
/**
* 仓库PulseItem显示
*/
class RepositoryPulseItem extends Component {
constructor(props) {
super(props)
}
componentDidMount() {
}
componentWillUnmount() {
}
render() {
let bottomIconStyle = {
backgroundColor: Constant.transparentColor,
size: 22,
};
let {opened, closed, infoText, statusText} = this.props;
return (
<View style={[{
backgroundColor: Constant.primaryColor,
padding: Constant.normalMarginEdge,
margin: Constant.normalMarginEdge,
borderRadius: 4
}, styles.shadowCard]}>
<View style={[styles.flexDirectionRowNotFlex, {
borderColor: Constant.lineColor, borderBottomWidth: StyleSheet.hairlineWidth,
paddingBottom: Constant.normalMarginEdge * 2,
paddingTop: Constant.normalMarginEdge,
}]}>
<View
style={[styles.flexDirectionRow, styles.centered,
{borderColor: Constant.lineColor, borderRightWidth: StyleSheet.hairlineWidth}
]}>
<IconC name="issue-closed" {...bottomIconStyle} color={"red"}>
</IconC>
<Text
style={[styles.smallText, styles.shadowText, {marginLeft: 5}]}>{I18n("weekClosed") + closed}</Text>
</View>
<View
style={[styles.flexDirectionRow, styles.centered]}
>
<IconC name="issue-opened" {...bottomIconStyle} color={"green"}>
</IconC>
<Text
style={[styles.smallText, styles.shadowText, {marginLeft: 5}]}>{I18n("weekOpened") + opened}</Text>
</View>
</View>
<Text
style={[styles.normalText, styles.shadowText, {marginTop: Constant.normalMarginEdge}]}>{I18n("thisWeek")}</Text>
<HTMLView
style={[{
backgroundColor: Constant.transparentColor,
marginBottom: Constant.normalMarginEdge * 2,
flex: 2,
paddingLeft: Constant.normalMarginEdge
}]}
numberOfLines={100}
value={statusText + infoText}
textComponentProps={{
style: styles.subSmallText,
numberOfLines: 100,
}}
selectable={true}
textComponent={() => {
return (
<Text/>
)
}}
/>
</View>
);
}
}
const propTypes = {};
RepositoryPulseItem.propTypes = propTypes;
RepositoryPulseItem.defaultProps = {};
export default RepositoryPulseItem;